Commit Graph

129 Commits

Author SHA1 Message Date
Azareal 8bdd1c8787 Add modlog phrase for delete posts. 2020-01-14 20:42:01 +10:00
Azareal 69a2430e5a Add option to delete all of a user's posts.
Add limited dynanicism to langf.
Eliminate a few queries when updating user stats.
Minor clean-up.

Namespace the profile language strings.
2020-01-14 15:07:00 +10:00
Azareal 0fa9a3fca1 Revamp reglog UI to handle spambots better.
Shorten some reglog phrase names.
Shorten some modlog phrase names.

Add account_privacy phrase.
Tweak account_blocked phrase.
Add account_menu_privacy phrase.
Add account_privacy_head phrase.
Add account_privacy_profile_comments phrase.
Add account_privacy_button phrase.
2019-12-06 09:57:44 +10:00
Azareal 430df1e325 Add blocklist page.
Add account_blocked phrase.
Add account_menu_blocked phrase.
Add account_blocked_head phrase.
Add account_blocked_remove phrase.
Add account_blocked_no_users phrase.
2019-11-12 16:17:46 +10:00
Azareal 1044518e74 Finish up the adminlogs.
Throw an error instead of updating a word filter that doesn't exist.
Track a bit of extra data for word filter updates.

Shorten the prefixes of the adminlog phrases from panel_logs_administration_ to panel_logs_admin_
Add a bunch of new adminlog phrases.
Tweak the word filter phrases.

Add the extra column to the moderation_logs and administration_logs tables.

You need to run the updater / patcher for this commit.
2019-11-10 12:37:53 +10:00
Azareal ffdc9e7705 Adminlogs: Custom pages, settings, word filters and backups.
WordFilters.Create now returns the ID.
Add the WordFilters.Get method.
Reduce the boilerplate in the backup page and page store.

Sanitise the names and titles in the Page Manager.

Add page_unknown phrase.
Add setting_unknown phrase.
Add panel_logs_administration_action_page_create phrase.
Add panel_logs_administration_action_page_delete phrase.
Add panel_logs_administration_action_page_edit phrase.
Add panel_logs_administration_action_setting_edit phrase.
Add panel_logs_administration_action_word_filter_create phrase.
Add panel_logs_administration_action_word_filter_delete phrase.
Add panel_logs_administration_action_word_filter_edit phrase.
Add panel_logs_administration_action_backup_download phrase.
2019-11-09 07:46:50 +10:00
Azareal 7e1372b0b4 Adminlogs: Forum Manager Actions.
Shave off a few bytes in the templates.

Add forum_unknown phrase.
Add panel_logs_administration_action_forum_reorder phrase.
Add panel_logs_administration_action_forum_create phrase.
Add panel_logs_administration_action_forum_delete phrase.
Add panel_logs_administration_action_forum_edit phrase.
2019-11-08 20:08:37 +10:00
Azareal 20984f7ea3 Adminlogs: More user edit logs, groups, and group promotions.
Shorten the group form field names.

Add group_unknown phrase.
Add panel_logs_administration_action_group_create phrase.
Add panel_logs_administration_action_group_edit phrase.
Add panel_logs_administration_action_group_promotion_create phrase.
Add panel_logs_administration_action_group_promotion_delete phrase.
2019-11-08 17:52:30 +10:00
Azareal 5441adb7fc Very incomplete adminlogs. Only user edit so far.
Inline error when there aren't any reglogs, modlogs or adminlogs.
Hide the email on a reglog, if the user didn't insert one.

Add panel_logs_registration_no_logs phrase.
Add panel_logs_moderation_no_logs phrase.
Add panel_logs_administration_action_user_edit phrase.
Add panel_logs_administration_action_unknown phrase.
Add panel_logs_administration_no_logs phrase.
2019-11-06 12:00:44 +10:00
Azareal 0403b2e1fa Add panel_user_show_email phrase.
Add account_email_create_email_label phrase.
Add account_email_create_email phrase.
Add account_email_create_button phrase.
2019-11-05 09:35:35 +10:00
Azareal 142359ce11 Add SslSchema config setting.
Reject URL usernames on registration.

Reduce length of char variable name.
2019-11-04 21:55:52 +10:00
Azareal 8f98708087 This too.
Rename VerifyEmailSubject phrase to ActivateEmailSubject.
Rename VerifyEmailBody phrase to ActivateEmailBody.
Add ValidateEmailSubject phrase.
Add ValidateEmailBody phrase.
Tweak menu_forums_aria phrase.
2019-10-30 16:41:05 +10:00
Azareal d2be6b220e Support for optional emails.
Reduce boilerplate and allocations.
Fix the error shown on AccountEditEmailTokenSubmit when there aren't any emails rows.

Add register_account_email_optional phrase.
Add account_email_none phrase.
2019-10-30 08:13:45 +10:00
Azareal 8720de83d8 Rudimentary user convo blocking.
Simplify some things.

Add create_block title phrase.
Add remove_block title phrase.
Add create_block_msg phrase.
Add remove_block_msg phrase.
Add profile_unblock phrase.

Add the users_blocks table.

You will need to run the updater / patcher for this commit.
2019-10-18 10:35:13 +10:00
Azareal f76af39a11 Finish playing with panel_debug for now.
Eliminate unnecessary indentation in panel_plugins.

Add panel_debug_subhead template.

Add panel_debug_memory_stats_mcachesys phrase.
Add panel_debug_memory_stats_gcsys phrase.
Add panel_debug_memory_stats_othersys phrase.
Add panel_debug_database_post_analytics phrase.
Add panel_debug_database_topic_analytics phrase.
2019-10-11 19:33:01 +10:00
Azareal cc986965fb Almost finished adding phrases to panel debug.
Add the panel_debug_memory_stats_mspaninuse phrase.
Add the panel_debug_memory_stats_mcacheinuse phrase.
Add the panel_debug_memory_stats_mspansys phrase.
Add the panel_debug_database_profile_replies phrase.
Add the panel_debug_database_activity_stream phrase.
Add the panel_debug_database_likes phrase.
Add the panel_debug_database_attachments phrase.
Add the panel_debug_database_polls phrase.
Add the panel_debug_database_login_logs phrase.
Add the panel_debug_database_reg_logs phrase.
Add the panel_debug_database_mod_logs phrase.
Add the panel_debug_database_admin_logs phrase.
Add the panel_debug_database_views phrase.
Add the panel_debug_database_views_agents phrase.
Add the panel_debug_database_views_forums phrase.
Add the panel_debug_database_views_langs phrase.
Add the panel_debug_database_views_referrers phrase.
Add the panel_debug_database_views_systems phrase.
Add the panel_debug_disk_static_files phrase.
Add the panel_debug_disk_attachments phrase.
Add the panel_debug_disk_avatars phrase.
Add the panel_debug_disk_log_files phrase.
Add the panel_debug_disk_backups phrase.
Add the panel_debug_disk_git phrase.
2019-10-11 18:45:09 +10:00
Azareal 65b4fef40e WIP Add more language strings for panel debug.
Shorten more things.
Sneak draft tables in.

Add the profile_block phrase.
Add the panel_debug_memory_stats phrase.
Add the panel_debug_memory_stats_sys phrase.
Add the panel_debug_memory_stats_heapsys phrase.
Add the panel_debug_memory_stats_heapalloc phrase.
Add the panel_debug_memory_stats_heapidle phrase.
Add the panel_debug_memory_stats_heapobjects phrase.
Add the panel_debug_memory_stats_stackinuse phrase.
Add the panel_debug_caches phrase.
Add the panel_debug_caches_topic phrase.
Add the panel_debug_caches_user phrase.
Add the panel_debug_caches_reply phrase.
Add the panel_debug_caches_topic_list phrase.
Add the panel_debug_database phrase.
Add the panel_debug_database_topics phrase.
Add the panel_debug_database_users phrase.
Add the panel_debug_database_replies phrase.
Add the panel_debug_disk phrase.
2019-10-11 10:57:33 +10:00
Azareal 84cd10a8c9 Fix a bug where the convos page would 404.
Friendly message when there are no convos.
Fix the convo input css.
Hide elapsed on mobile for Nox.

Added convos_none phrase.
2019-10-08 07:22:33 +10:00
Azareal 3798838ece Update the group promotion UI.
Invert the direction of the query to make promotions a little less exacting.
Make sure admins can't set the from group as the to group in a group promotion.
Shorten a field name in the word filter manager.

Add panel_group_promotions_level_prefix phrase.
Add panel_group_promotions_posts_prefix phrase.
Add panel_group_promotions_delete_button phrase.
2019-10-07 08:54:09 +10:00
Azareal 2e28ae39f3 Add posts as a criteria for group promotions.
Load the posts column when loading users.
Make DefaultUserStore.Reload a wrapper around DefaultUserStore.BypassGet.
Use the OO style query builder more in common/user.go
GroupPromotions is now bound to an interface rather than the concrete type.
Fix some issues in the GroupPromotionStore interface.
Improve error handling for table creation and reduce boilerplate.
Shorten some more things.

Add panel_group_promotions_posts phrase.

You will need to run the patcher / updater for this commit.
2019-10-07 08:20:37 +10:00
Azareal a5f77c376b Users can now delete their own posts.
Merge GlobalPerms and LocalPerms phrase spaces into Perms.
Shorten more things and eliminate boilerplate.
2019-10-06 21:32:00 +10:00
Azareal 5705252029 Add UseConvos permission.
Use UseConvos permission instead of ban flags in convo perm checks.
Stop users without the UseConvos permission from editing convo replies, although they can still delete them for privacy reasons.

Shorten some things and reduce the amount of boilerplate.
Add a few misc parser test cases.
Fix footer and tweak indentation.
2019-10-06 10:34:09 +10:00
Azareal 764b9904f1 Tighten validation on group promotion delete.
Shorten some variable names.
Reduce the amount of duplication in the panel group routes.
Rename isJs to js here and there.
Localise group promotions.

Phrases:

Rename create_topic_create_topic_button to create_topic_create_button
Rename quick_topic.create_topic_button to quick_topic.create_button
Rename quick_topic.create_topic_button_short to quick_topic.create_button_short
Rename panel_groups_create_create_group_button to panel_groups_create_button
Rename panel_word_filters_create_create_word_filter_button to panel_word_filters_create_button
Rename panel_pages_create_submit_button to panel_pages_create_button
Add panel_group_promotions_create_head
Add panel_group_promotions_from
Add panel_group_promotions_to
Add panel_group_promotions_two_way
Add panel_group_promotions_level
Add panel_group_promotions_create_button
2019-09-30 20:15:50 +10:00
Azareal ec22af716e Add a couple of basic convo phrases.
Fix a few bits of convo ui.
2019-09-01 11:58:30 +10:00
Azareal ddb917761f Show the names of the participants on the convo list instead of the placeholder text.
Shorten some things to save a bit of memory and to standardise things.
2019-08-28 16:47:54 +10:00
Azareal 0e9c459446 Adjust convo permissions.
Speed up convo_view.html
Make ContentLines in ConvoViewRow an int as it should be.
Shorten common. in the generated templates.
Fix the page titles for the convo panes.
Stop non-present users from editing their convo posts but still allow them to delete them, if they somehow have a way to do that.
Reduce the amount of boilerplate in the currently broken guilds plugin.
2019-08-21 08:32:10 +10:00
Azareal 4d8c97812d More conversations work.
Add support for AS in columns for SimpleInnerJoin.
Add a referrer policy to improve privacy a little.
Shorten /static/ to /s/ since it comes up so much.
Remove some obsolete code.
Shorten some variable names.
Reduce the amount of boilerplate in the patcher.

Added the RefNoTrack and RefNoRef privacy config settings.

You may need to run the updater / patcher for this commit.
2019-08-14 20:39:04 +10:00
Azareal a287ccc3d6 WIP Conversations templates.
WIP Conversations structs.
WIP Unbound conversations routes.
Shorten more variable names.
Eliminate a few characters here and there.
Track down widget tick errors more easily.

Add the convos_head title phrase.
Add the convo_head title phrase.
Add the unit phrase.
Add the account_menu_messages phrase.
Add the convos_head phrase.
Add the convo_head phrase.
Add the create_convo_head phrase.
Add the create_convo_button phrase.
Add the profile_send_message phrase.
Add the panel_dashboard_disk_unknown phrase.
2019-07-27 09:29:42 +10:00
Azareal 89ca5ee823 langf now works in transpiled templates, albeit a little inefficiently.
Removed the quick_topic.add_poll_option phrase.
Added the quick_topic.add_poll_option_first phrase.
Changed the topic.reply_add_poll_option phrase.
Added the topic.reply_add_poll_option_first phrase.
2019-06-17 09:36:31 +10:00
Azareal 89c8f4e775 Use a client template for poll input.
Tweak the poll input phrase.
Increase the padding on .pollinput for Nox.
2019-06-16 17:26:31 +10:00
Azareal f7780098db Localise the avatar bits too in the User Manager. 2019-06-11 14:36:03 +10:00
Azareal ee3c29b136 Let admins change and revoke user avatars.
Linkify avatars in the user manager too.

Add the panel_user_avatar phrase.
2019-06-11 08:00:57 +10:00
Azareal 199a841bc3 Add the UploadAvatars permission.
Let users revoke their own avatars, work in progress.
Reduce boilerplate in debug.go

Add the UploadAvatars phrase.
Add the account_penalties phrase.
Add the account_menu_penalties phrase.
Add the account_avatar_revoke_button phrase.

More Vue and Conversations Work.
2019-06-09 13:21:48 +10:00
Azareal 5b5b8339d6 Add instance disk usage to the Control Panel Dashboard.
Split the dashboard grid into two.
Add more analytics tables to the debug page.
Add flushes to the Control Panel Dashboard.
Fix some templates not transpiling properly.
Reduce duplication in the debug route.
Fix the link styling in the Control Panel Dashboard for Tempra Simple.

Transpile the Control Panel Dashboard.

Added the panel_dashboard_disk phrase.
Added the panel_dashboard_disk_desc phrase.
2019-06-03 15:26:27 +10:00
Azareal 9caef90d72 Add more tables to the Debug Page.
Localise more parts of the Control Panel Dashboard.

Added 11 new phrases.
2019-06-03 10:35:25 +10:00
Azareal 3f6966d541 Added the AppleBot user agent.
Added the topic.topic_info_aria phrase to explain the meta block in topics correctly to screen readers.
Added a missing phrase for the FacebookBot user agent.
2019-06-01 12:03:04 +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 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 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 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 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 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 29d14a4a4a Added ten new plugin hooks and split topic_unknown out of the user_unknown phrase.
Added the user parameter to the action hooks to give plugins more contextual information.

Added the action_end_edit_topic plugin hook.
Added the action_end_delete_topic plugin hook.
Added the action_end_lock_topic plugin hook.
Added the action_end_unlock_topic plugin hook.
Added the action_end_stick_topic plugin hook.
Added the action_end_unstick_topic plugin hook.
Added the action_end_move_topic plugin hook.
Added the action_end_like_topic plugin hook.

Added the action_end_like_reply plugin hook.

Added the tasks_tick_topic_list plugin hook.
2019-04-19 11:02:33 +10:00
Azareal 9179eb9711 The moderation logs can now be localised.
Error pages which call CustomError should now stick on the theme the user chose rather than the global fallback theme.
Move the theme fetching logic out of userCheck and panelUserCheck and into it's own function.
Split prepResources out of userCheck, so that errors can make use of it.

Fixed a bug where no scripts or stylesheets would run on error pages.
Fixed a bug where unknown topics would point to /user/ rather than /topic/

Added the panel_logs_moderation_action_topic_stick phrase.
Added the panel_logs_moderation_action_topic_unstick phrase.
Added the panel_logs_moderation_action_topic_lock phrase.
Added the panel_logs_moderation_action_topic_unlock phrase.
Added the panel_logs_moderation_action_topic_delete phrase.
Added the panel_logs_moderation_action_topic_move phrase.
Added the panel_logs_moderation_action_topic_move_dest phrase.
Added the panel_logs_moderation_action_topic_unknown phrase.
Added the panel_logs_moderation_action_reply_delete phrase.
Added the panel_logs_moderation_action_user_ban phrase.
Added the panel_logs_moderation_action_user_unban phrase.
Added the panel_logs_moderation_action_user_activate phrase.
Added the panel_logs_moderation_action_unknown phrase.
Added the user_unknown phrase.
2019-04-18 11:00:39 +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