Commit Graph

275 Commits

Author SHA1 Message Date
Azareal 494b4967c5 sneak in a secret gallery... 2019-05-28 13:29:31 +10:00
Azareal dc4bda7c77 happy? x.x 2019-05-28 09:58:25 +10:00
Azareal 7e7f9e46bd Remove the previous and next links we don't use in topic_alt.
Fix the attachment manager not appearing for opening posts.
Fix rels in the wrong tags.
2019-05-27 18:50:47 +10:00
Azareal a56ed113dd You can now filter the active memory pane by type.
Add excludes for the analytics language pane too.
Try to avoid rid queries when we already have the rids.
Use GetListByCanSee instead of GetList for preloads to increase the chances of getting something useful.
Provisionally extend topic preloading to the first three topic list pages.

Add the panel_statistics_memory_type_total phrase.
Add the panel_statistics_memory_type_stack phrase.
Add the panel_statistics_memory_type_heap phrase.
2019-05-19 11:01:11 +10:00
Azareal b44f7bc157 Hide spammy referrers by default.
Added the panel_statistics_spam_hide phrase.
Added the panel_statistics_spam_show phrase.
2019-05-18 10:33:35 +10:00
Azareal 182a5640eb Add the cache capacities to the debug page. 2019-05-17 20:38:46 +10:00
Azareal b9973719a5 Added a small reply cache.
Preloaded a small number of users and topics.
Use cache.Set instead of cache.Add in a few spots for topics to avoid issues with the counter falling out of sync with the cache length.
Embed Reply in ReplyUser instead of duplicating the same fields.
Add the missing AttachCount and ActionType fields to Reply.
Add the missing Poll field to TopicsRow.
Added the TopicUser.Replies method to better abstract the reply list generation logic.
Shortened some common.s to c.s
Moved memStuff out of the analytics memory panes and into analytics.js
Removed the temporary preStats fix for label overflow now that we have a better solution.
Added the panel_analytics_script_memory template to help de-dupe logic in the analytics memory panes.
Added the Topic method to TopicsRow.
Added the GetRidsForTopic method to help cache replies in a small set of scenarios.

Added the ReplyCache config.json setting.
Added the ReplyCacheCapacity config.json setting.

Added a parser test case.
Added more Reply and ReplyStore related test cases.
2019-05-17 18:40:41 +10:00
Azareal 9cd3cbadab Expanded upon the control panel debug page and improved the UI a bit.
Trying to de-dupe the phrase strings to avoid allocating as much memory and creating as many pointers.
Shortened topic.status_closed_aria slightly.
Moved some things that should have been in various panel.css' into those panel.css'
Fixed the MemUsed dashboard item on Cosora.

Added the bunit template function.
2019-05-13 19:17:44 +10:00
Azareal e57e2f69b2 Comment out supermod_only as we don't really use it anywhere.
Remove inline CSS for lock icon on topic_alt.
Reduce duplication for add_like / remove_like.
Update this query for mssql too...
2019-05-12 12:23:48 +10:00
Azareal c2f2dd7f10 Reduce the amount of data sent for alert resumes in preparation for moving resumes to the WebSockets endpoint.
Remove a bit of superfluous information from the avatar alt attributes.
Improved upon the meta store tests.
Move float: right; out of the footer and into the Tempra Simple and Shadow stylesheets.
Added a missing level label to Shadow.
2019-05-12 09:07:24 +10:00
Azareal f10fdcb40c Added the active memory analytics pane. More to come here.
Added the meta store.

Added the panel_menu_statistics_active_memory phrase.
Added the panel_statistics_active_memory_head phrase.

Added the panel_analytics_time_range_month template.

Added Go 1.12 to the Travis list.

Added the stack and heap columns to the memchunks table.
Added the createdAt column to the activity_stream table.
Added the meta table.

You will need to run the patcher / updater for this commit.
2019-05-09 16:58:55 +10:00
Azareal 1fd980bf56 Reduce the number of labels to reduce the amount of clutter another way. 2019-05-08 15:56:18 +10:00
Azareal 3023f3c138 Try to avoid crushing labels in the analytics chart. WIP. 2019-05-08 15:26:38 +10:00
Azareal 839df17de3 Experimenting with speeding up the installer.
Added support for foreign keys to the MySQL adapter.
activity_stream_matches now has a foreign key to help enforce referential integrity.
Added the AddForeignKey method to the database adapters.
Shortened a couple of API bits to ever slow slightly reduce the lengths of the strings.

Fixed a phrase group I missed for logged out users in init.js
Fixed a bug where deleting a topic would break the alert list when there is an alert event relating to it.

You will need to run the updater / patcher for this commit.
2019-05-06 14:04:00 +10:00
Azareal d321c40290 Add the guest ones too...
Remove unneccesary indentation from a bunch of templates.
2019-05-03 21:07:31 +10:00
Azareal a1161e20f3 The rest of the Control Panel (exc. the Group Editor) now uses dyntmpl.
Improved the noavatar cacheability by constraining them in a range.
Improved the noavatar cacheability by serving a small subset from Gosora.
Improved the formatting of bytes in the memory analytics pane.
Static resources with checksums will now have their caches expire in a week rather than a day.

Tweaked the padding on the sub_heads on Nox.
Moved a block of CSS out of a template and into panel.css in Tempra Simple and Shadow.

Added the panel_themes_menus_items_suffix phrase.

Added the DisableNoavatarRange config setting.
Added the DisableDefaultNoavatar config setting.
2019-05-03 18:34:18 +10:00
Azareal a8e1076f7c Do proper averaging and collect more samples for the memory analytics pane.
Added an ETag for the alerts endpoint when you're not logged to save bandwidth.
The Page Manager now uses dyntmpl.
The Setting Manager now uses dyntmpl.
The Word Filter Manager now uses dyntmpl.
Fixed the padding on the noavatar alerts for Nox.

Tweaked the panel_word_filters_to phrase.
Tweaked the panel_statistics_memory_head phrase.
Added the panel_statistics_memory_chart_aria phrase.
Added the panel_statistics_memory_table_aria phrase.
Added the panel_statistics_memory_no_memory phrase.
2019-05-02 09:14:07 +10:00
Azareal 5dc238f196 Added Mem to the dashboard and added a historic process memory use analytics pane.
Added the memchunks table.
Eliminated some unnecessary indentation in the analytics templates.

Added the panel_menu_statistics_memory phrase.
Added the panel_dashboard_memused phrase.
Added the panel_dashboard_memused_desc phrase.
Added the panel_statistics_memory_head phrase.

You will need to run the updater / patcher for this commit.
2019-05-01 16:59:51 +10:00
Azareal a52d9cc371 Use <h1> instead of <a> in more spots in the control panel.
Eliminate more instances of excessive indentation in the analytics panes.
2019-04-29 23:21:53 +10:00
Azareal 48a993d067 The Forum Manager now uses dyntmpl.
The User Manager now uses dyntmpl.
panel_groups.html now uses dyntmpl.

HTMLID is now optional in panel.html
Moved the inline JS in panel_forum_edit.html into panel_forum_edit.js
Removed the legacy indents from panel_analytics_referrers.
2019-04-29 18:17:12 +10:00
Azareal 6bed36b8c6 Use dyntmpl for the analytics panes.
Localised a few more things on the dashboard.
Use questions marks instead of numbers for placeholders on the dashboard.

Added the panel_dashboard_cpu phrase.
Added the panel_dashboard_ram phrase.
2019-04-29 16:11:26 +10:00
Azareal d14a7f028f Panel Dashboard now uses dyntmpl to make it a little bit faster.
Fixed a bug in the dashboard where report stats were being fetched by day rather than by week.
Reduced the amount of boilerplate in the dashboard with the GE type alias.
Tweaked the colour of hguides on Cosora.

Added the panel template.

Added the panel_dashboard_cpu_desc phrase.
Added the panel_dashboard_ram_desc phrase.
Added the panel_dashboard_online_desc phrase.
Added the panel_dashboard_guests_online_desc phrase.
Added the panel_dashboard_users_online_desc phrase.
Added the panel_dashboard_coming_soon phrase.
2019-04-29 11:28:55 +10:00
Azareal fd68578ed1 A notice is now shown when the menu is updated.
Re-added the missing padding above notices in the Control Panel for Nox.
Moved the inline menu item JS to it's own JS file.

Added the panel.themes_menus_items_order_updated phrase.
2019-04-29 08:17:08 +10:00
Azareal c1e74f9af6 Use <h1> for headers in analytics panes instead of <a>
Fixed the padding in the analytics panes.
Don't load the status phrases in the control panel as they're not really needed there.
2019-04-28 12:57:25 +10:00
Azareal 27a4a74840 You can now re-order forums by dragging them in the Forum Manager.
Added some visual and textual hints to make it clearer that Menu Items and Forums can be dragged.
Added a hint to flush the page after pushing the <head>
Added the notice client template and pushNotice client function.

Used a pointer instead of a struct for AnalyticsTimeRange in the analytics routes.
Caught a potential missing error check in InitPhrases.
Use struct{} instead of bool in some of the user mapping maps for WebSockets to save space.
Added the buildUserExprs function to eliminate a bit of duplication.
Fixed a typo in ForumsEdit where it referenced a non-existent notice phrase.
Client hooks can now sort of return things.
Panel phrases are now fetched by init.js, but only in the control panel.
Reduced the number of unused phrases loaded in both the front-end and the control panel.

Plugin hyperdrive should handle Gzip better now.

Added the panel.ForumsOrderSubmit route.

Added the panel_hints_reorder phrase.
Moved the panel_forums phrases into the panel. namespace.
Added the panel.forums_order_updated phrase.
Renamed the panel_themes_menus_item_edit_button_aria phrase to panel_themes_menus_items_edit_button_aria
Renamed the panel_themes_menus_item_delete_button_aria phrase to panel_themes_menus_items_delete_button_aria
Added the panel_themes_menus_items_update_button phrase.

You will need to run the patcher / updater for this commit.
2019-04-27 16:32:26 +10:00
Azareal d0e40ae81b Split some of the member only logic out of global.js and into member.js
Moved the script in register.html into an external file.
Client hooks can now be dynamically created thus reducing the burden on init.js to pre-define all of them.
The current user is now passed in as an argument to the action_end_create_topic hook.
Shorted more common. to c.

Added the almost_end_init client hook.
2019-04-25 16:02:51 +10:00
Azareal 114afe0b13 Fix the control panel scripts. 2019-04-20 12:22:57 +10:00
Azareal 2d366ce6a0 Move action posts now show the forum the topic has been moved to.
Move modlog events now show the forum the topic has been moved to.

Moved the .action_icon styling from topic.html into the theme stylesheets.

Added the topic.action_topic_move_dest phrase.
2019-04-17 20:12:35 +10:00
Azareal 86885dd4bb Removed some obsolete inline styles. 2019-04-17 14:01:40 +10:00
Azareal 2e2b3c6067 Fixed a bug where users couldn't post non-image attachments.
Fixed a visual padding bug for .uploadItem on Nox.
#upload_files now uses .auto_hide instead of an inline style.
2019-04-17 13:30:02 +10:00
Azareal 7d14b4afbb Added the attachment managers to Cosora.
The attachment manager now takes up less vertical space when there aren't any attachments on a post.

Fixed a bug where opening the topic editor would open all of the attachment managers on the page.
Removed the inline style for #upload_files_op.
2019-04-17 11:57:31 +10:00
Azareal 4df0313961 Very basic non-image attachment embeds. 2019-04-16 21:45:55 +10:00
Azareal adb7babc02 Fixed a bug where hitting delete on one post would affect selected attachments on other posts.
Fixed a bug where attachments couldn't be deleted after being added with the attachment manager without refreshing.
Fixed a bug where an attachment can't be reuploaded with the attachment manager after being uploaded and deleted without refreshing.
Improved the error message for RemoveAttachFromReplySubmit when there aren't any aids.

The delete button is now hidden when there aren't any attachments to delete.
2019-04-16 19:42:20 +10:00
Azareal 546aa5f845 The attachment managers for replies are now rendered with client templates
Avoid loading the topic phrases when the user isn't logged in.
Don't load the topic_c_edit_post and topic_c_attach_item client templates when the user isn't logged in.
Fixed a bug where multiple attachment managers wouldn't load.

Added the topic_c_attach_item template.
2019-04-15 11:54:13 +10:00
Azareal d61ec9a6fe Editing replies now uses a client template instead of inline HTML in global.js
Added the topic_c_edit_post template.
2019-04-11 15:46:57 +10:00
Azareal 3db09c6a1f Give users access to the attachment manager without having to upload any files.
Added the action_end_add_attach_to_reply hook.
Added the action_end_remove_attach_from_reply hook.
2019-04-11 14:22:03 +10:00
Azareal 5808f1d0ba Improved the poll UIs slightly.
Polls without any votes should look a little nicer now.
.hide_on_edit and other similar classes should now override other classes on Cosora.
Added <red> to avoid having to use inline styles for parser errors.
Reorganised a few elements in topic.html and topic_alt.html
Split topic_poll.html out of topic.html

Fixed a bug where attachments were getting assigned to the wrong reply / topic.

Added the router_after_filters hook.
Added the topic.poll_no_results phrase.

Added two parser tests.
2019-04-10 17:40:47 +10:00
Azareal 733a802357 Use the langpack's isocode in header.html instead of en.
Added the GetLangPack function.
2019-04-09 17:21:00 +10:00
Azareal e9f1a3c677 Added support for <h1>, <h2>, and <h3> to the core post parser.
Changed a span to a div in Tempra Simple and Shadow so that nested divs will work properly.

Added four parser tests.
2019-04-09 15:33:39 +10:00
Azareal af9a56a9a9 Server push is back. But only for Chrome and Firefox.
Added the DisableServerPush and EnableCDNPush config.json settings.
2019-04-02 17:43:11 +10:00
Azareal 167bb230b4 The main menu for Nox should handle overflow better now.
Added the menu_more phrase.
2019-04-02 10:59:29 +10:00
Azareal e1dfebf090 main.css should be invalidated properly too. 2019-03-25 14:01:50 +10:00
Azareal f11f85a1f4 You can now quote posts with the quote button.
Back to Site now links back to the site again.
Localised what to do with this topic for a single topic.
Improved the margins before and after blockquotes for various scenarios including one on it's own, one with content after and one with content before.
Don't bother rendering the opening post source block if it's a guest viewing the page in topic.html
Removed some obsolete inline styles from topic.html

Added the topic.quote_button_text phrase.
Added the topic_list.what_to_do_single phrase.
Added the topic.quote_tooltip phrase.
Added the topic.quote_aria phrase.
2019-03-25 13:30:56 +10:00
Azareal 23a0bf3f41 Try hash based cache busting with stylesheets too.
Use a semantic blockquote element instead of span in plugin_bbcode for [quote]
You can now use <blockquote> elements directly in posts.
Added styling for quotes to Shadow, Cosora and Nox.
Experimenting with the padding on Nox's Control Panel Menu.
Tweaked the padding for the User Manager items on Nox.
Fixed #back filling up all the space it can on Tempra Simple.
Added a bit of padding below the last element before the footer on Tempra Simple.

Tempra Simple's misc.js is now loaded asynchronously.
Shadow's misc.js is now loaded asynchronously.
profile_member.js is now loaded asynchronously.
account.js is now loaded asynchronously.
2019-03-24 17:23:38 +10:00
Azareal 660f24acff Experimenting with Nox's Control Panel.
Experimenting with better cache busting for static resources.
HTTPSRedirect requests are now counted in the route analytics.
More scripts are loaded asynchronously now.
Upped the default ReadTimeout to eight seconds.
Reduce the number of unneccesary NewAcc calls.
Added panel_before_head as an injection point for themes.
Themes can now declare scripts to be loaded asynchronously.
Tweaked the WS resumption algorithm to mae the backoffs a little less aggressive.
Fixed an ordering issue in the WS resumption algorithm where backoffs weren't expiring as fast as they should have.
Fixed a bug where template logs weren't being written due to a panic.
You can now use byte slices in more places in the transpiled templates.
Fixed a bug where Cosora's misc.js seemed to be erroring out.
Fixed a bug where YT embeds were getting blocked by the CSP.

Added the panel_back_to_site phrase.
Added the panel_welcome phrase.
2019-03-22 08:59:41 +10:00
Azareal cb58c1c83f The number of unread alerts now appears in the page title.
Added the Back to Site link to Nox's Control Panel.
Added the panel_group_menu template and used it to de-dupe the group menu HTML.
Fixed a potential race condition with dismiss alert.
Fixed a strange bug where new alerts wouldn't appear.
Fixed a race condition where client templates sometimes wouldn't load.
Dramatically cut down on the number of DOM rebuilds for the alert list.
Added some missing error handling for ajax page block loads.
Fixed a bug where the dimiss alert endpoint wasn't sending a success payload.

Made the register_might_be_machine phrase more descriptive.
Added the panel_menu_aria phrase.
2019-03-16 21:31:10 +10:00
Azareal 414d9c4817 Tighter ratelimiting for password resets.
Eliminated a line in agents.go
Added the DateCutoff method to accCountBuilder.
Function columns should now work for ComplexSelect.
Added type=search to the Search and Filter Widget search box.

Began cleaning some prebuilder logic up.
Began work on the generic ratelimit interface.
2019-03-12 19:13:57 +10:00
Azareal e22ddfec40 Added support for password resets.
Sha256 hashes are now stored in the SFile structures, this will come of use later.
Rows should be properly closed in DefaultTopicStore.BulkGetMap.
All errors should be properly reported now in DefaultTopicStore.BulkGetMap.
Rows should be properly closed in DefaultUserStore.BulkGetMap.
All errors should be properly reported now in DefaultUserStore.BulkGetMap.
Don't have an account on the login page should now be linkified.
Renamed tempra-simple to tempra_simple to avoid breaking the template transpiler.
Fixed up bits and pieces of login.html on every theme.
Removed an old commented code chunk from template_init.go
widget_wol widgets should now get minified.
bindToAlerts() should now unbind the alert items before attempting to bind to them.
Tweaked the SendValidationEmail phrase.
Removed a layer of indentation from DefaultAuth.ValidateMFAToken and added the ErrNoMFAToken error for when MFA isn't setup on the specified account.
Email validation now uses a constant time compare to mitigate certain classes of timing attacks.

Added the /accounts/password-reset/ route.
Added the /accounts/password-reset/submit/ route.
Added the /accounts/password-reset/token/ route.
Added the /accounts/password-reset/token/submit/ route.
Added the password_resets table.

Added the password_reset_email_fail phrase.
Added the password_reset phrase.
Added the password_reset_token phrase.
Added the password_reset_email_sent phrase.
Added the password_reset_token_token_verified phrase.
Added the login_forgot_password phrase.
Added the password_reset_head phrase.
Added the password_reset_username phrase.
Added the password_reset_button phrase.
Added the password_reset_subject phrase.
Added the password_reset_body phrase.
Added the password_reset_token_head phrase.
Added the password_reset_token_password phrase.
Added the password_reset_token_confirm_password phrase.
Added the password_reset_mfa_token phrase.
Added the password_reset_token_button phrase.

You will need to run the updater or patcher for this commit.
2019-03-11 18:47:45 +10:00
Azareal 3cb5896316 Tighten the content security policies for profiles.
Use template variables instead of CSS variables in Nox for better browser backwards compatibility.
Emit a local error instead of an internal error when submitting an activation token as a guest or invalid user.
Moved the inline profile scripts into profile_member.js
2019-03-04 16:43:07 +10:00
Azareal e9b46e1cd6 Email errors should be logged now.
Reordered the registration logic so the session is created before any, if any, email errors fire.
Fixed a bug where the analytics phrases would load after the graph is drawn.
2019-03-03 13:19:32 +10:00