Commit Graph

185 Commits

Author SHA1 Message Date
Azareal 5db5bc0c7e Reply attachments can be managed too now.
Added eight database indices.
Fixed a bug where the second tick wouldn't fire.
Tweaked the .topic_forum in Nox by a pixel.
Replaced some _installer strings with blank strings for consistency with the builders.
Greatly reduced the number of allocations in the user agent parser.
Added ampersand entities in more attachment URLs to avoid accidental mangling.
.edit_source is now hidden for guests.
Guest noavatars are now pre-calculated to reduce the number of allocations.
Lazily initialised a couple of maps in ViewTopic to reduce the number of unnecessary allocations slightly.

Added the unsafe BytesToString function. Please don't use this, if you don't have to.
Added the AddIndex method to the adapter and associated components.
Added the /reply/attach/add/submit/ route.
Added the /reply/attach/remove/submit/ route.
Added the topic_alt_userinfo template.
Replaced Attachments.MiniTopicGet with MiniGetList.
Added Attachments.BulkMiniGetList.

Added a quick test for ReplyStore.Create.
Added BenchmarkPopulateTopicWithRouter.
Added BenchmarkTopicAdminFullPageRouteParallelWithRouter.
Added BenchmarkTopicGuestFullPageRouteParallelWithRouter.

You will need to run the updater or patcher for this commit.
2018-12-31 19:03:49 +10:00
Azareal bf2af0ae96 Laid the foundations for better reply attachments.
The attachment manager introduced in the previous patch is now properly localised.

Repurposed AttachmentStore.CountInTopic as a more general CountIn method.
Added an & entity in attachment URLs so that the characters don't get mutated into something weird.
Tried to make the linebreaks a little glitchy in the inline editor, we have a better solution in a mind soon!
Fixed a bug where replies used .ContentHTML instead of .Content which led to a lot of HTML getting in the way of reply edits.
Fixed a bug where reply attachments used the topicID rather than the replyID for their originID entries.
Fixed a bug where the topic attachment counts weren't getting incremented.

Added the topic.select_button_test, topic.copy_button_test and topic.upload_button_test phrases.

Added the attachCount column to the replies table. This commit requires you to run the patcher / updater.
2018-12-27 19:12:30 +10:00
Azareal 3465e4c08f You can now manage the attachments for an opening post by hitting edit.
The update system now uses the database as the source of truth for the last version rather than lastSchema.json
Refactored several structs and bits of code, so we can avoid allocations for contexts where we never use a relative time.
Clicking on the relative times on the topic list and the forum page should now take you to the post on the last page rather than just the last page.
Added the reltime template function.
Fixed some obsolete bits of code.
Fixed some spelling mistakes.
Fixed a bug where MaxBytesReader was capped at the maxFileSize rather than r.ContentLength.
All of the client side templates should work again now.
Shortened some statement names to save some horizontal space.
accUpdateBuilder and SimpleUpdate now use updatePrebuilder behind the scenes to simplify things.
Renamed selectItem to builder in AccSelectBuilder.
Added a Total() method to accCountBuilder to reduce the amount of boilerplate used for row count queries.
The "_builder" strings have been replaced with empty strings to help save memory, to make things slightly faster and to open the door to removing the query name in many contexts down the line.
Added the open_edit and close_edit client hooks.
Removed many query name checks.
Split the attachment logic into separate functions and de-duplicated it between replies and topics.
Improved the UI for editing topics in Nox.
Used type aliases to reduce the amount of boilerplate in tables.go and patches.go
Reduced the amount of boilerplate in the action post logic.
Eliminated a map and a slice in the topic page for users who haven't given any likes. E.g. Guests.
Fixed some long out-dated parts of the update instructions.
Updated the update instructions to remove mention of the obsolete lastSchema.json
Fixed a bug in init.js where /api/me was being loaded for guests.
Added the MiniTopicGet, GlobalCount and CountInTopic methods to AttachmentStore.
Added the MiniAttachment struct.
Split the mod floaters out into their own template to reduce duplication.
Removed a couple of redundant ParseForms.

Added the common.skipUntilIfExistsOrLine function.
Added the NotFoundJS and NotFoundJSQ functions.
Added the lastReplyID and attachCount columns to the topics table.
2018-12-27 15:42:41 +10:00
Azareal 543ad8a018 Added the login log.
Added a better paginator for view topic.
The last post on the topic list and forum pages now link to the last page of a topic for quicker navigation.
The Account Manager now utilises dyntmpl in more areas.
More tooltips.
Tweaked the colour for the validated emails in the Email Manager so it looks nicer on dark themes.
Moved some inline styles from the Email Manager into the stylesheets and removed obsolete ones.
Added the mixed BenchmarkTopicGuestAdminRouteParallelWithRouter benchmark.
The bad route benchmark should no longer abort when erroring, something which doesn't make sense as it's always expected to error.
Reduce a bit more boilerplate with renderTemplate()
Added the *CTemplateSet.addText method and used it to optimise the generated templates a tiny bit more.
The forums route now has guest and member variants generated for it.
Turned the experimental template optimisation back on for more data.

Added the routes.AccountLogins route.

Added the account_logins phrase.
Added the account_menu_logins phrase.
Added the account_logins_head phrase.
Added the account_logins_success phrase.
Added the account_logins_failure phrase.

You need to run the patcher / updater for this commit.
2018-12-17 14:58:55 +10:00
Azareal 40064f9e27 Removed the Tempra Conflux Theme. 2018-12-14 14:11:02 +10:00
Azareal bdf7fa40d5 Improved the datetimes on the log pages.
Added an experimental template fragment optimisation.
The template generator can handle time.Time
The forum and profile templates now have guest and member variants generated for them.
Interpreted templates are no longer loaded, if there's a generated version of it.

Added absolute time on hover to the topic, topics, forum, and forums templates.
We now use lang instead of index in the stylesheets for phrases.
Renamed the .trash_label CSS class to .delete_label
Use the new toArr and concat template functions to reduce the amount of boilerplate in the theme stylesheets.
Removed bits of redundant code here and there in the stylesheets.
Added a .CurrentUser.Loggedin to profiles to make them slightly faster.
Shortened some themeStmt names.
Moved GzipResponseWriter, theme.RunTmpl and theme.GetTmpl from theme_list.go to theme.go
The fallback theme now falls back onto the last theme loaded, if the fallback theme doesn't exist.
Added the abstime template function for formatting absolute times a little more nicely.

Began work on the login logs.

Removed the alerts_no_new_alerts phrase.
Renamed the forums_topics_suffix phrase to forums.topics_suffix.
2018-12-14 14:08:53 +10:00
Azareal dc974cf72b Improved mobile usability for Nox in the topic list, profiles, account manager and control panel. More to come.
Fixed a bug in the template generator where fragment indices would sometimes become negative.
Forum pages are now considered to be part of /forums/ instead of /topics/ in the menu tab highlighter.
Fixed a bug in the forum page in Nox where the forum options weren't aligned to the right.
Switched out a couple of {{if ne .CurrentUser.ID 0}}s for {{if .CurrentUser.Loggedin}}s
Moved the filter opt separator into it's own DOM node for easier styling.

Added the quick_topic.create_topic_button_short phrase.
Added the topic_list.moderate_short phrase.
2018-12-08 16:49:14 +10:00
Azareal a20078d83b Revamped the IP Search Page for Nox.
Revamped the Word Filter Manager for Nox.
Revamped the Setting Manager for Nox and Cosora.
Upped the number of items in the User Manager.
Upped the number of items in the Group Manager.
Upped the number of items in the Page Manager.
Swap a fmt.Println for a DebugLog in hold.ScanItem.
EQCSS.js should ignore panel.css in Cosora now.
Added the lang template function for stylesheet templates to reduce the amount of boilerplate.
Localised a couple of spots in the Nox Theme which got overlooked.
Tweaked the grid CSS for Nox.
The Control Panel Dashboard items now change colour in Nox like in the other themes.
Use Site.Host instead of req.Host for www redirects for security reasons.
Removed a superfluous function call in WriterIntercept.WriteHeader.
Tweaked several bits and pieces of CSS like the padding on a few items in the Forum Editor.

Added the topic_list.moderate phrase.
Added the panel_word_filters_to phrase.
2018-12-06 21:09:10 +10:00
Azareal 14884ebb14 Quasi mod group-forum presets now show up as Custom rather than blank on all themes.
Forum permission group-forum presets now show up on Nox.
Fixed levels breaking onto multiple lines in Nox.

Added the panel_perms_quasi_mod phrase.
2018-12-03 22:32:46 +10:00
Azareal 255dd92a65 Fixed a data race in the client side alert logic.
misc.js should now be loaded for guests too in Nox.
Fixed the msgCount property not being set for guests in alerts.

Added the alerts.no_alerts_short phrase.
2018-11-30 13:02:20 +10:00
Azareal 2e1916f3c9 Don't forget to push this too or it won't work. 2018-11-29 10:51:17 +10:00
Azareal 266f17c23d Revamped the Nox Account Manager and Control Panel Menus.
The topics list template is now generated by loggedin.
Replaced some uses of {{if ne .CurrentUser.ID 0}} with {{if .CurrentUser.Loggedin}}
Fixed a bug in the profiles where the comment creation form was shown to guests.
Added the profile_comments_form_guest phrase.
2018-11-29 07:46:53 +10:00
Azareal 826330035f Fixed text flowing out of the boxes on the forums page on Nox. 2018-11-23 18:58:34 +10:00
Azareal d99fd01ed9 Rewrote the template generator to make it more flexible and easier to debug.
The template generator now has better support for pointers to primitives.
Tweaked some CSS.
2018-11-18 15:28:27 +10:00
Azareal 17f85ceccf The time it took for the route to be processed is shown in the footer in the Nox Theme for admins now
Don't waste queries on groups without any users for the topic list.
Bypass the GzipResponseWriter in RunThemeTemplate, so we get indirected through fewer layers of Write calls.
Added an experimental flag for disabling fsnotify.
Refactored the topic benchmarks to make them a little more flexible.
Refactored a couple of benchmarks to reduce the amount of boilerplate.
Fixed a bug in the forum list for Nox where topic titles broke onto multiple lines.
Refactored the template transpiler to reduce the amount of boilerplate for generating template functions.
2018-11-17 12:36:02 +10:00
Azareal bf851bd9fc We now use Go 1.11 modules. This should help with build times, deployment and development, although it does mean that the minimum requirement for Gosora has been bumped up from Go 1.10 to Go 1.11
Added support for dyntmpl to the template system.
The Account Dashboard now sort of uses dyntmpl, more work needed here.
Renamed the pre_render_view_topic hook to pre_render_topic.
Added the GetCurrentLangPack() function.
Added the alerts_no_new_alerts phrase.
Added the account_level_list phrase.

Refactored the route rename logic in the patcher to cut down on the amount of boilerplate.
Added more route renames to the patcher. You will need to run the patcher / updater in this commit.
2018-10-27 13:40:36 +10:00
Azareal 35b1613005 Make the level bars in the profiles look less ugly. 2018-10-24 22:54:07 +10:00
Azareal 34b8d8dc3c Fixed a bug where group permissions didn't update until Gosora was restarted.
The profile titles can now be localised.
The profile owner tag can now be localised.

Added some changes I forgot to push in the previous commit.
2018-10-14 16:09:25 +10:00
Azareal c451358156 Improved the level UI on the Account Dashboard.
The new level UI shouldn't be broken on the other themes now.
2018-10-11 19:50:48 +10:00
Azareal 96a5a9e872 Fixed a bug where phrases would sometimes get entitised.
Fixed a couple of spots which didn't have phrases.
Removed inline CSS in a couple of places and added a missing tooltip.

Added the account_username_save phrase.
2018-10-11 07:29:38 +10:00
Azareal 05ab585d41 Added the level list page.
Levels can now be localised individually.
Added the level template function.
Fixed the padding on alerts without avatars.
The level data is now in it's own block in the profiles.
Removed three level phrases and replaced them with the new Level API.
2018-10-10 17:33:51 +10:00
Azareal 436c53f653 The user box on Nox should be highlighted now when there's a new alert.
Removed some notes as they're not really needed now that I've refactored the alert builder.
2018-10-06 16:35:53 +10:00
Azareal 859ed2c730 Finished the Most Viewed Page for Nox.
Added three phrases for topic_list.
Moved the topic_middle_inside suffix phrases from the CSS files into the template proper.
Removed a newline in topic_middle_inside and used flex instead.
The link_select drop-down is now only visible when someone clicks on the link.
Tweaked the .topic_forum line height for Cosora.
Tweaked the .topic_view_count font size for Cosora.
2018-09-26 17:46:30 +10:00
Azareal a4117d1cf8 Move the inline filter opt styles into Nox's main.css 2018-09-25 19:24:22 +10:00
Azareal 80657813da Made the filter opt visible again and started work on the filter drop-down menu. 2018-09-25 19:24:22 +10:00
Azareal 1d17e7f334 Preliminary topic view counts for the Cosora Theme.
Added the topic.view_count_suffix phrase.
2018-09-25 19:22:20 +10:00
Azareal 28dedf987b Tweak the header size and hide these bits momentarily so we can merge back into master. 2018-09-24 17:49:19 +10:00
Azareal cb9f067ff4 Maybe this? Hm.
I also tweaked the padding on the forum quick topic forms.
2018-09-21 14:23:25 +10:00
Azareal 06f20c3e1f Linkified the username in the userbox in Nox.
We don't need two profile menu items.
Removed some excessive padding from the Nox profiles.
2018-09-20 22:39:03 +10:00
Azareal 7de911d78c Alerts now work in Nox. 2018-09-20 20:45:33 +10:00
Azareal 787108ceda Fixed a bug where the alerts list would appear under a side menu in Cosora. 2018-09-07 21:32:32 +10:00
Azareal ab6a44cf53 Revamped Cosora's Control Panel Menu.
Fixed a bunch of forms which didn't have backgrounds in Nox's Control Panel.
Fixed a bunch of double background buttons in Nox's Control Panel.
You can no longer resize textareas horizontally on Nox.
Fixed the profile comment input width on Nox.
Fixed buttons appearing when they shouldn't in Nox's Control Panel.
Improved the permissions styling in Nox's Control Panel.
Fixed the styling on action posts for Nox.
Fixed the padding on the powered by message on Nox.
Added styling for .account_soon and .dash_security, I'm not quite happy with it and I might change more things up there.
Tweaked a bit of permissions preset padding on Cosora.
The edit_fields handler now uses CSS classes rather than inline CSS for hiding and showing elements.

Experimented with position: sticky in Cosora.
Experimented with the Control Panel Menu styling on Nox.
2018-09-02 15:43:17 +10:00
Azareal 6ecbc18831 Basic profiles for Nox.
Added the styling for the IP Search Page to Nox.
Moved the bgavatars related styling from Nox's panel.css to main.css

Hide the Extended Notifications Page from the Account Manager as it's a distraction for now.
2018-09-01 18:03:26 +10:00
Azareal 7a1df79686 Sorting out the button segment of the topics on the Nox Theme.
Fixed a small padding issue in the topics page on mobile in the Cosora Theme.
Fixed the parent forum CSS in the topics page on mobile in the Cosora Theme.
2018-09-01 16:53:50 +10:00
Azareal a34e8f0e4e Momentarily remove the forum link and view counter on mobile for Nox until we make them look not awful.
Fixed a media query block ordering bug in Nox.
2018-08-31 16:25:13 +10:00
Azareal 39adc2e606 Per-topic views are now visible in the topic pages for the Nox Theme.
The parent forum of a topic is now visible on the topic pages for the Cosora and Nox Themes.
Added basic styling for polls to the Nox Theme.
Improved the styling for topic title editing in the Nox Theme.
2018-08-30 20:31:21 +10:00
Azareal 465d5c7835 The Topic page is nearly done for Nox, just the buttons and a few little things now.
Fixed the paginator in the Nox Panel.
Eliminated a redundant class="" in the registration logs when the registration is a success.

Part-way through fixing the analytics page header.
2018-08-30 15:53:21 +10:00
Azareal 8bd1925e83 Finished the topic pages for small mobiles for the Nox Theme.
Eliminate some boilerplate in the super experimental sendmail plugin.
2018-08-25 19:32:00 +10:00
Azareal 7b8943517b Upped the compression level for static files.
Experimenting with compressing everything.
Fixed the live things.

Playing around with topic buttons in Nox.
2018-08-21 18:00:35 +10:00
Azareal bc7982952d Making topics in the Nox Theme mobile friendly. 2018-08-19 16:25:59 +10:00
Azareal 6f5065c854 Almost finished up the buttons on the User Manager for Nox. 2018-08-16 21:16:02 +10:00
Azareal 0305571cb3 Eliminated some JS errors for guests on Cosora.
Fixed the build tags for the alt database engines.
Tweaked the quotes on the PgSQL adapter. Still not functional.
Removed the SQLite build tag as it's unlikely that it'll ever be implemented.
2018-08-15 17:02:57 +10:00
Azareal 18c5223143 Pin Docker to 1.10 not the patch version, otherwise things could go horribly wrong.
Added the_form to the Page Editor.
Added a phrase for the Menu Editor title rather than reusing the Menu Manager's one.
Replaced a dotted border I missed in Tempra Simple.
Fixed a floater in the User Manager for Shadow.
Tweaked the form CSS for Nox.
Tweaked panel_submitrow in Nox.

Continued work on the User Manager for Nox.
2018-08-11 22:09:26 +10:00
Azareal 06d6715c47 Many HTML / CSS / Template changes.
Added the grid_stat_head CSS class to Panel Debug.
Added the panel_plugin_meta CSS class to the Plugin Manager.
Added some missing panel_right_button classes to the buttons for the rows in the Plugin Manager.
Added some missing the_form CSS classes for Nox.
Added a missing phrase for an update button in panel_themes_menus_items.
Replaced a legacy float: right; in the User Manager with to_right.
Removed some superfluous legacy inline CSS in the User Manager.
Tweaked the amount of padding for the title in the Account Manager for Nox.
Tweaked the amount of padding for the title in the Control Panel for Nox.
Tweaked the padding for panel_right_button for Nox.
Fixed the UI for the Plugin Manager in Nox.
Tweaked the padding for the grid heads in Panel Debug for Nox.

Began work on a nicer looking User Manager in Nox.
2018-08-10 17:58:25 +10:00
Azareal b8681524f3 Added a mitigation for polyglot attacks.
.panel_floater is now floated to the right on Nox.
2018-08-06 12:36:24 +10:00
Azareal 01a692ab5b Added the word filter store and moved the word filter routes into the route package.
Added tests for the word filter store.
Added qgen.NewAcc() to reduce the amount of boilerplate needed for creating an accumulator.
Exposed the RecordError method on the accumulator.
Added an Add method to PluginList and removed AddPlugin() in favour of that.

More panel buttons on Nox should be styled now.
Added the panel_update_button_text phrase for future use.

More errors might be caught in the thumbnailer now.
Removed ls from .travis.yml, it was there for debugging Code Climate.
2018-08-04 21:46:36 +10:00
Azareal 05e916ce2a Fixing up the user dashboard on Tempra Simple.
Missed a spot of CC.
2018-07-30 19:00:41 +10:00
Azareal d73ece6445 Start phasing out Tempra Conflux. 2018-07-30 12:51:22 +10:00
Azareal 0a628f7201 PNG and JPG avatars are now encoded as JPG images leading to a dramatic drop in the amount of bandwidth used.
Did some work on image thumbnailing, but our dependencies are acting up delaying this from being released.

Fixed the positions of the topic list bits for Nox on mobile.
Removed APNG as an accepted image format, as we don't currently have a good way of optimising these images.
Added a comment regarding the constant time compare for sessions.
Added a warning about putting Gosora in www folders.
Noavatars can now take a width parameters.
Added a bit of missing validation for the avatar uploader.
Refactored the multiple file detector for the avatar uploader.

Added a Run method to accDeleteBuilder.
Added an EachInt method to AccSelectBuilder.
Added a Run method to accInsertBuilder.

Added the users_avatar_queue table, you will need to run the patcher / update script.
You might also want to update the Noavatar field in your config.json file with the new one.
2018-07-28 22:52:23 +10:00
Azareal affdf67273 Made progress on Nox, fixed a phrase, and added a couple of missing phrases.
Nox now supports bulk moderations.
Began work on mobile with Nox.
Made several visual improvements for Nox.
Updated the service example.
2018-07-24 15:41:08 +10:00