Commit graph

30 commits

Author SHA1 Message Date
Josh
baaee86e67
Allow users to manually setup two factor with secret key (#1071)
* Allow users to manually setup two factor with secret key

* Remove empty lines in markup
2024-09-30 00:11:43 +00:00
sudokoko
0ee8970c64
Implement read-only mode (#1001)
* Implement read-only mode

* Use localized string under default language for announce text

* Redirect to user page rather than returning blank 400

* Protect call to `ParseBase64Image`

* Add protections to SlotSettingsPage and nitpick format

* Display the latest announcement (if any) on the landing page

* Fix a kokoism

Accidentally tried to use markdown within the landing page... I'm rather smart aren't I

* Prevent possible XSS

* Separate truncated announcement text and link with "..."

* Apply suggestion from code review

* Add read-only check to /postComment in slot page controller

* Fix inconsistent tabbing
2024-03-30 02:51:12 +00:00
sudokoko
aea66b4a74
Implement in-game and website notifications (#932)
* Implement notifications logic, basic calls, and admin command

* Remove unnecessary code

* Add ability to stack notifications and return manually created XML

* Remove test that is no longer needed and is causing failures

* Apply suggestions from code review

* Merge notifications with existing announcements page

* Order notifications by descending ID instead of ascending ID

* Move notification send task to moderation options under user

Also restyles the buttons to line up next to each other like in the slot pages.

* Style/position fixes with granted slots/notification partials

* Fix incorrect form POST route

* Prevent notification text area from breaking out of container

* Actually use builder result for notification text

* Minor restructuring of the notifications page

* Add notifications for team picks, publish issues, and moderation

* Mark notifications as dismissed instead of deleting them

* Add XMLdoc to SendNotification method

* Fix incorrect URL in announcements webhook

* Remove unnecessary inline style from granted slots partial

* Apply suggestions from code review

* Apply first batch of suggestions from code review

* Apply second batch of suggestions from code review

* Change notification icon depending on if user has unread notifications

* Show unread notification icon if there is an announcement posted

* Remove "potential" wording from definitive fixes in error docs

* Remove "Error code:" from publish notifications

* Send notification if user tries to unlock a mod-locked level

* Change notification timestamp format to include date

* Add clarification to level mod-lock notification message

* Change team pick notifications to moderation notifications

Apparently the MMPick type doesn't show a visual notification.

* Apply suggestions from code review

* Add obsolete to notification types that display nothing in-game

* Remove unused imports and remove icon switch case in favor of bell icon

* Last minute fixes

* Send notification upon earth wipe and clarify moderation case notifications

* Add check for empty/too long notification text
2023-10-29 20:27:41 +00:00
koko
be5a29d3c9
Simplify rank badges and implement profile tags (#880)
* Simplify website rank badges to use semantic classes

* Fix ambiguity between partial display types

* Add profile vanity tags and needed migration

* Make form field read only to non-administrators

* Display lock icon if user is not admin to minimize confusion

* Also display lock icon for username field since it's readonly

* Fix up naming consistency issues and edit migration accordingly

* Apply suggestions from code review

* Add space between placeholder property and ternary operator
2023-08-28 20:37:06 +00:00
koko
6558d09c8d
Implement profile and level privacy settings (#841)
* Create interactions management page and basic GET logic

* Fix client side query and add blocked count as well as comments nitpick

* Implement basic backend logic for interactions management

* Remove errant null/whitespace checks and add border to blocked users partials

* Implement user page's respect to profile privacy settings

* Fix issue where user can't view their own profile if privacy settings are tightened

* Fix other issues with profile access

* Remove excess conditional expression from PSN privtype check

* Check if access is allowed within request handler and hide bio/RA if private

* Fix PSN privacy level check

* Display private users in search and add base UI class to level lock icon

* Rename everything from interactions to privacy for clarity

* Dagg requested an eyeball

Co-authored-by: vilijur <69403080+vilijur@users.noreply.github.com>

* Clarify profile settings page title

* Implement level privacy settings

* Formatting nitpicks within UserPrivacyPage

* Add discard changes buttons

* Apply suggestion from code review

* Consolidate privacy settings areas together

* Grammar nitpick for comments enable/disable dropdown

* Remove un-needed blue UI segment

* Allow mods to issue disable comments case regardless of privacy settings

Also addresses a few frontend and backend nitpicks left unaddressed by previous commits

* Remove limiting AND operator expression

* Grammar clarity on disable comments button

* Add missing hidden button divider under Wipe Earth Decorations

* No eyeball -m88youngling

Removes eyeball from actual privacy settings page to match styling

* Use long-text description for privacy type dropdowns

* Use long-text description for comments toggle dropdown

* Implement slot page privacy

* Grammar nitpicks with Daggintosh

* Daggintosh grammar review second edition

* Once again put request handler arguments on one line

* Rename LevelsPrivate variable to SlotsPrivate for internal consistency

* Fix issue with PSN slot privacy type

* Un-break comments

* Apply most of the suggestions from code review

* Correct form dropdown values for privacy types

* Potentially fix broken privacy type extension

* Slightly rework access calculation extension method

* Fix issues with if statements

* Apply suggestions from code review

* Make everything translatable

---------

Co-authored-by: vilijur <69403080+vilijur@users.noreply.github.com>
2023-07-22 21:49:56 +00:00
koko
689ebd3791
Optimize GameServer /announce and add website announcements (#810)
* Improve game server announce by using StringBuilder

* Implement web announcements (condensed commit)

* Implement discord webhook support

* Display a separate message if there are no announcements

* Fix announcement string unit tests

* Fix header admin button unit test

* Clarify announcement id variable name

* Increase webhook truncation limit to 250 chars

* Convert announce text to string when returning 200

* Fix announcement unit tests ... again

* Make announcement text input a textarea rather than a simple input

* Fix styling discrepancy

* Clarify submission button

* Improve announcement webhook & set default textarea row amount
2023-06-23 03:49:22 +00:00
koko
2a85b6a136
Disallow moderators/administrators from issuing cases against each other (#781)
* Disallow moderators/administrators from issuing cases against each other

* Resolve suggestions from reviewers

* Only request user from db if id is valid
2023-06-05 21:45:25 +00:00
koko
21dbdff20a
Add proper ban page when logging in (#773)
* Add proper ban page upon logging in

* Remove two extra line break tags that don't need to be there

* Fix timestamp formatting

* Properly display timestamps in correct timezone

* Fix formatting issues with ban page

* Remove extra parenthesis which would be rendered on-page

* Add to redirect middleware to prevent navigating to other pages

* Small nitpick, renaming UserBannedPage to BannedUserPage

* Resolve nitpicks from reviewers

* Remove un-necessary log message in LoginForm

* Fix ban reason translatable string argument

* Word choice nitpick ("Ban Created" -> "Ban Issued")

* Final adjustments and nitpicks, visual and grammatical

* Resolve requested changes from reviewers
2023-05-30 19:25:31 +00:00
koko
586c161c71
String fix with login/register button (#755)
* Display "Login" only when registration is off, remove unused BaseLayoutStrings

* Remove un-used strings from BaseLayout
2023-04-29 03:44:33 +00:00
Josh
14d2f0305e
Implement 2FA (#577)
* Initial work for TOTP 2FA

* Fix bug in 2FA code script

* Add translations for two factor and /disable2fa

* Fix compilation error

* Add TwoFactorLoginPage

* Add two factor login process

* Little bit of backup code work

* Finish two factor

* Fix unit tests

* ??? goofy ahh code

* Use SHA-256 instead of SHA-512

* I guess SHA-256 doesn't work either

* Fix comments in Base32 helper

* Move QRCoder package to website

* Add name to endregion comment in css

* Fix bug with redirects
2022-12-12 21:11:39 -06:00
Josh
ee11798dc6
Login with email and confirm age on registration (#493)
* Implement login with email

* Add confirm age checkbox to register page

* Fix registration unit tests

* Fix registration unit tests for real this time

Co-authored-by: Dagg <32235163+daggintosh@users.noreply.github.com>
2022-09-29 17:34:22 -05:00
Josh
d640c000aa
Implement LBP1 tags, stricter resource checking, and more (#463)
* Add LBP1 tags, more strict resource checking, and more.

* Fix unit tests

* Add more length checking to dependency parser

* Online editor problems

* Fix tests pt 2

* Self code review and fixed digest bugs

* Don't add content length if it was already set

* Fix status endpoint

* Fix review bug and simplify review serialization

* Fix a typo in review serialization

* Remove duplicated code and fix search

* Remove duplicate database call
2022-08-31 20:38:58 -05:00
jvyden
67bad4fd1e
Add banned users and hidden levels page to mod panel 2022-08-14 18:39:19 -04:00
jvyden
b6da930e20
Merge main into mod-panel 2022-08-05 17:02:19 -04:00
jvyden
3e1d5da3a9
Translate BaseLayout warnings 2022-08-02 09:47:31 -04:00
jvyden
018d9d2b9f
Translate profile page 2022-08-01 18:29:43 -04:00
jvyden
d9e299ac00
Translate errors in forms 2022-08-01 18:09:12 -04:00
jvyden
98a444499e
Add notice about usernames in register form 2022-08-01 17:49:34 -04:00
jvyden
bc998b1ba9
Translate mod panel 2022-07-27 17:05:41 -04:00
jvyden
1d5fdc5b7c
Merge branch 'main' into mod-panel 2022-07-27 16:56:30 -04:00
jvyden
7bb851a575
Fix StatusStrings TranslationArea 2022-07-27 16:56:21 -04:00
jvyden
cc7022cf48
Merge branch 'main' into mod-panel 2022-07-27 16:55:16 -04:00
jvyden
f0befef31f
Translate UserStatus, titles of pages in header 2022-07-27 16:37:38 -04:00
jvyden
ea25751e71
Merge branch 'main' into mod-panel 2022-07-26 19:31:02 -04:00
jvyden
443b285253
Translate login and logout pages 2022-07-26 17:01:48 -04:00
jvyden
1e9f672d6c
Finish translation of landing page 2022-07-26 16:44:19 -04:00
jvyden
528d3b1335
Add language mappings for non-standard language names 2022-04-16 19:29:31 -04:00
jvyden
197aab1ba3
Add landing page strings 2022-04-14 17:06:13 -04:00
jvyden
1b48a71062
Add strings for entire baselayout 2022-04-14 16:50:30 -04:00
jvyden
3e18d79fa5
Add translation support to website, read user's language from settings 2022-04-14 16:24:17 -04:00