Commit Graph

202 Commits

Author SHA1 Message Date
Azareal bbfd3c51c7 Stop blocked users making profile comments too.
Hide the Send Message option on profiles for blocked users.
Move the profile reply routes to their own file.
Remove a redundant user initialisation.

Shorten things.
2019-10-19 20:33:59 +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 fd1d54c394 Wrestling with tests while pushing random changes. 2019-10-13 20:50:15 +10:00
Azareal 5404b6fdbe start laying down the skeletons for blocks and friends 2019-10-13 18:50:55 +10:00
Azareal df6e268a06 Speed up template compilation by not building the same parse trees multiple times.
Compile panel_debug.
Add the ability to print int8, int16, int32, uint, uint8, uint16, uint32 and uint64 in compiled templates.
Add the ability to pass string nodes to subtemplates in the template compiler.
Fix bunit in the template compiler.

Shorten some things.
2019-10-13 08:49:08 +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 30de658e15 Experiment with rehoming the plugins.
Shorten more things and eliminate unnecessary bytes.
2019-10-11 10:36:08 +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 ff48ec9d86 Shortening some things.
Fix the ordering of the lock in WsHubImpl.GuestCount.
2019-10-02 07:06:22 +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 a9a7501c05 Tighten validation on group promotion create. 2019-09-29 15:25:36 +10:00
Azareal 6efb7e7f28 Missed a spot. 2019-09-29 15:16:07 +10:00
Azareal 3ba977c75e Shorten things. 2019-09-29 15:10:05 +10:00
Azareal 78c5c62eee Basic group promotions.
Add the users_groups_promotions table.
Optimise ConvoViewPage.

Shortened some things.
Convo CSS fixes.
Make sure the user cache is flushed properly after the post stats change.

You will need to run the patcher / updater for this commit.
2019-09-29 14:56:39 +10:00
Azareal 57712e0cb5 Quick Convo Form.
Be more tolerant of spaces when inputting participant names.
Use a class instead of inline css for the Quick Topic Form Toggle.
2019-09-01 11:37:04 +10:00
Azareal f1bebb7326 Shorten the names of the IP fields.
Shorten some other things.
2019-09-01 08:34:43 +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 cae7e00b0c Show the users in a convo. 2019-08-21 11:31:13 +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 f8991e089a Basic conversations now work, although there is still testing and UI stuff to be done.
Simplify some header script / sheet bits.
2019-08-20 18:44:37 +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 377a5dc5ea Reduce boilerplate.
Prealloc in AnalyticsViews.
Remove some old debug code.
Normalise the URL ID error for CreateTopicSubmit.
Reduce the number of allocations for action posts.
Use aliases to shorten a few queries.
2019-07-29 09:19:46 +10:00
Azareal 7134dfdda5 Shorten some bits and pieces.
Stop users from making blank profile comments.
Normalise the forum edit URL ID error.
2019-07-28 20:42:30 +10:00
Azareal e9e527e76a Experimenting with request state in local errors.
Move the sheet and style declarations after the initial error on the profiles.
Use a global URL ID error message for the profiles.

Updates #51
2019-07-28 14:58:01 +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 22cb2701b2 Shorten a couple of attachment parameters.
Rename a mislabelled variable.
Prealloc in DefaultUserStore.BulkGetMap.
Prealloc in DefaultTopicStore.BulkGetMap.
Shorten the names of some temps.
Shorten a mssql querystring.
2019-07-25 17:00:49 +10:00
Azareal ed68c6fc04 Add a simple letter favicon.
Disable Gzip for favicons, it doesn't make them smaller anyway.
Eliminate an allocation for static files.

Fixes #59
2019-07-23 20:34:44 +10:00
Azareal cb8e83ec79 Removed dirsize from the control panel dashboard.
Experimenting with dirsize.
2019-07-21 09:09:26 +10:00
Azareal f7720575d5 Fix the superfluous header errors.
Shorten the query parameter for phrases.
Move the cache control header in the phrase route down to avoid caching errors improperly.

Fixes #53
2019-07-12 07:38:06 +10:00
Azareal 97fb4af723 Fix a bug where reloaded groups lost their CanSee data.
Remove a couple of redundant queries in group reload.
Exit from group reload early if there's an error.
Remove a couple of redundant assignments in the forum list.
Shorten some variable names.
2019-06-18 14:13:47 +10:00
Azareal a5441f18de More conversations progress, still not usable yet.
Flush the debug page incrementally.
Eliminate a tiny bit of code in PreparseMessage.
Shorten some of the pointer capture variables in the poll store.
Tweak the advanced installation instructions for EasyJSON to make it more repeatable.

Added the ConvoKey config setting.
Added /.git/ disk usage to the debug page, if it exists.
Added a UserStore.BulkGetMap multi-user test.
2019-06-16 16:30:58 +10:00
Azareal 7a27534153 Don't create a poll if no options are set. 2019-06-15 22:26:37 +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 9c19fc92ca Use a like store to abstract some things.
Provisional conversations.
2019-06-05 16:00:40 +10:00
Azareal ac0dd6d2cb The login and registration logs are pruned after a year now.
Add filter exclusions for the user agents analytics pane.
Shorten some of the variable names in qgen.

Add ComplexDelete to the query adapter.
Add DateCutoff and DateOlderThan to accDeleteBuilder.
2019-06-05 14:57:10 +10:00
Azareal 05a8adb25e Add the log tables to the debug page. 2019-06-05 11:46:45 +10:00
Azareal fb990c182c Fix the order of the stylesheets. 2019-06-05 01:33:44 +10:00
Azareal 757bc9874f Bump the number of logs on each page up slightly. 2019-06-04 21:51:15 +10:00
Azareal fdd223d9cf Rewrite the pagination algorithm so it works properly.
Shorten a few bits of JS.
Get the topic store methods to call BypassGet instead of duplicating logic.
2019-06-04 15:48:12 +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 05c2ac3ce4 Add the disk and database sections to the debug page.
Add the ActivityStream interface to abstract Get, Add and Count.
Rename the GlobalCount methods to Count for simplicity.
Simplify the variable names in the Count methods.
Rename the GlobalCount method to Count and rename the original Count method to CountUser in LoginLogStore.
Add a float64 case for bunit, sort of.
Theme.RunTmpl now returns ErrBadDefaultTemplate instead of panicking when an interpreted template doesn't exist.
Widget.Allowed now checks the zoneid.
Fire the alert off in the background in AddActivityAndNotifyTarget instead of blocking the request.
Use ErrBadDefaultTemplate instead of calling DefaultTemplates.Lookup directly for custom pages.
Split the page struct for the debug page into multiple structs to make things more organised.

Add the Count method to ProfileReplyStore.
Add the Count method to ReplyStore.
Add the DirSize utility function.

Add a few ActivityStream tests.

Secret gallery stuff.
2019-06-01 22:31:48 +10:00
Azareal 0d1e4e5993 Add super experimental support for per-forum templates.
Add the ExtraTmpls developer setting to config.json
Call ForumStore.BypassGet in ForumStore.Reload instead of duplicating it.
Fix a potential deadlock in ForumStore.Create.
Attempt to fix a weird installation bug.
Add a few more forum store test cases.

You will need to run the updater / patcher for this commit.
2019-05-27 19:00:40 +10:00
Azareal 515e607587 Mention, hashlink and URL Parser Rewrite Part 1.
Added 71 new test cases for the parser.
2019-05-22 14:45:07 +10:00