Commit graph

284 commits

Author SHA1 Message Date
Josh
a528c65445
Fix pagination for banned users in the mod panel (#1043)
Some checks failed
Continuous Integration / Build & Test (push) Has been cancelled
Upload Translations to Crowdin / crowdin-sync (push) Has been cancelled
Build Docker Image / Build and Publish (push) Has been cancelled
Qodana / qodana (push) Has been cancelled
2025-01-11 05:19:14 +00:00
github-actions[bot]
376e1464a2
Update the localization files (#1084)
* [skip ci] Update the localization files

* Make website work with languages without an associated CultureInfo

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Slendy <josh@slendy.pw>
2025-01-10 22:02:17 -06:00
FeTetra
8b8756e6de
Implement checkboxes in slot settings to toggle various slot properties (#1063)
Some checks failed
Continuous Integration / Build & Test (push) Has been cancelled
Upload Translations to Crowdin / crowdin-sync (push) Has been cancelled
Build Docker Image / Build and Publish (push) Has been cancelled
Qodana / qodana (push) Has been cancelled
* Implement checkboxes in slot settings to toggle various slot properties

* Fix UI inconsistencies in checkboxes

* Update ProjectLighthouse.Servers.Website/Pages/SlotSettingsPage.cshtml

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse.Servers.Website/Pages/SlotSettingsPage.cshtml

Co-authored-by: Josh <josh@slendy.pw>

* Fix missing end quote and add extra margin

* Update SlotSettingsPage.cshtml.cs

Resolve file conflict

---------

Co-authored-by: Josh <josh@slendy.pw>
2024-12-11 04:40:40 +00:00
FeTetra
f059b20489
Fix missing filtering, filter inconsistencies, and filter logging (#1082)
Some checks are pending
Continuous Integration / Build & Test (push) Waiting to run
Upload Translations to Crowdin / crowdin-sync (push) Waiting to run
Build Docker Image / Build and Publish (push) Waiting to run
Qodana / qodana (push) Waiting to run
* Fix missing filtering, filter inconsistencies, and filter logging

* Remove unused import and replace removed logger

* Make filter log arguments optional

* Update ProjectLighthouse.Servers.GameServer/Controllers/MessageController.cs

Co-authored-by: sudokoko <sudo@koko.rip>

* Update ProjectLighthouse.Servers.Website/Pages/Debug/FilterTestPage.cshtml.cs

Co-authored-by: sudokoko <sudo@koko.rip>

* Replace filter location strings with enum

* Rename enum to FilterLocation for readability

---------

Co-authored-by: sudokoko <sudo@koko.rip>
2024-12-11 01:01:37 +00:00
sudokoko
a3022ff5b4
Refactor web-based comment deletion routine (#1079)
Some checks failed
Continuous Integration / Build & Test (push) Has been cancelled
Upload Translations to Crowdin / crowdin-sync (push) Has been cancelled
Build Docker Image / Build and Publish (push) Has been cancelled
Qodana / qodana (push) Has been cancelled
* Refactor web-based comment deletion routine

* Apply suggestions from code review
2024-11-07 15:44:41 -05:00
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
FeTetra
917cccb3b0
Add button and controller to remove user avatar (#1057)
Some checks failed
Upload Translations to Crowdin / crowdin-sync (push) Has been cancelled
Continuous Integration / Build & Test (map[database:true fullName:ubuntu-latest prettyName:Linux webTest:true]) (push) Has been cancelled
Build Docker Image / Build and Publish (push) Has been cancelled
* Add button and controller to remove user avatar

* Update ProjectLighthouse.Servers.Website/Controllers/Admin/AdminUserController.cs

Suggestion provided to add logging, a return, and sending a notification to the affected user

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse.Servers.Website/Controllers/Admin/AdminUserController.cs

Co-authored-by: Josh <josh@slendy.pw>

---------

Co-authored-by: Josh <josh@slendy.pw>
2024-09-02 21:27:27 +00:00
jackcaver
0fd76f1662
Remove license check (#1035)
* remove license check

* removed IsDirty

---------

Co-authored-by: jackcaver <jackcaver@users.noreply.github.com>
2024-06-23 01:38:59 +00:00
Kat
be11e138f0
Implement the ability for moderators to delete all scores/comments by a user (#1027)
* Implement delete all scores/comments

* Fix formatting in AdminUserController.cs

* Move logging out of loop

* Batch delete scores based on UserId

* Batch update comments instead of using a foreach

* Use html entity instead of apostrophe character

* Confirm before deleting all comments/scores

* Remove unnecessary database.SaveChanges
2024-06-15 02:27:18 +00:00
sudokoko
e89a4c27fa
Fix mismatch between user/targetedUser in force verify endpoint 2024-05-31 18:40:59 -04:00
sudokoko
3546f60f4f
Disallow forced email verification of users with no email 2024-05-31 18:28:37 -04:00
sudokoko
643cb8e816
Implement the ability to forcibly verify a user's email (#1022)
* Implement the ability to forcibly verify a user's email

* Apply suggestions from code review
2024-05-31 22:10:05 +00:00
sudokoko
262ada37ae
Bump dependencies 2024-05-31 13:53:41 -04:00
Slendy
9348d58158
Fix infinite redirect for users with empty usernames 2024-04-15 14:11:47 -05:00
sudokoko
da8322e01a
Fix errant line breaks in landing page announcement view 2024-03-29 23:17:01 -04: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
975fcab100
Revert "Display the latest announcement (if any) on the landing page"
This reverts commit a5ba5844f8.

Commit was intended for the `read-only` branch and was pushed to `main` in error.
2024-03-28 13:43:21 -04:00
sudokoko
a5ba5844f8
Display the latest announcement (if any) on the landing page 2024-03-28 13:27:30 -04:00
Slendy
8ed755759f
Fix compilation errors in Debug configuration 2024-03-24 20:50:19 -05:00
sudokoko
5283001511
Remove IP addresses from game tokens and matchmaking 2024-03-17 21:41:10 -04:00
sudokoko
c8f9087501
Prevent displaying user/slot bio when privacy settings are enabled 2024-02-27 15:52:54 -05:00
sudokoko
01e6fa191a
Update to .NET 8 and C# 12 (#952)
* Initial SDK and dependency bumps

* Bump Pomelo.EntityFrameworkCore.MySql to 8.0.0-beta.2

Should fix the MissingMethodException error in unit tests

* Update CI workflow to use .NET 8

* Apply suggested change from compile time warnings

* Fix digest tests

* Bump dependencies once more

* Update xunit

* Remove obsolete ISystemClock from TokenAuthHandler

* Update dependencies

* Add digest debug preprocessors back

* Maybe don't break #966

* Bump EF Driver and update various NET7 references

* Fix warnings in digest middleware tests

---------

Co-authored-by: Slendy <josh@slendy.pw>
2024-02-26 20:08:48 +00:00
Josh
a2eaedc85b
Sort team picks by the time they were team picked (#980) 2024-02-23 14:38:02 +00:00
Josh
092f8bc5a2
Use UtcNow instead of Now for internal time keeping (#965) 2024-01-20 21:24:28 +00:00
sudokoko
25eaae1542
Add confirmation for level deletions 2024-01-17 19:57:18 -05:00
sudokoko
e29ca6cdcb
Show rootlevel hash to moderators on slot page (#964) 2024-01-11 00:32:47 +00:00
Slendy
9dc7ce27e1
Fix infinite redirect when slot name generates empty slug 2023-12-23 20:07:52 -06:00
Slendy
48a4202ba1
Revert slug hotfix and change comment links to use relative urls 2023-10-30 15:53:51 -05:00
sudokoko
30133f592c
Hotfix notification recipient IDs and fix errant photo removal notifications (#942) 2023-10-30 16:16:00 -04:00
sudokoko
69855406f5
Miscellaneous website/moderation/notification fixes (#940) 2023-10-30 17:46:05 +00:00
Slendy
0de5edca6e
Fix link generation for source code footer link 2023-10-30 03:22:48 -05:00
Josh
b8324d0c10
Migrate to GitInfo for embedding git information (#911)
* Migrate to GitInfo for embedding git information

* Adjust gitignore to reflect new git system

* Fix changes from broken merge

* Remove vestigial code in VersionHelper

---------

Co-authored-by: sudokoko <koko@drones.gay>
2023-10-29 23:50:16 +00:00
sudokoko
aa3caea363
Add missing moderation notification calls (#937)
* Add missing moderation notifications

* Shorten temporary variable "commentEntity" to "c" for consistency

Didn't catch this when rider inserted these include statements

* Fix incorrect access of TargetUser

* Remove excess indent and random semicolon
2023-10-29 19:49:48 -04:00
Josh
3c76dfa434
Fix extra whitespace in slot slugs (#938)
* Fix extra whitespace in slot slugs

* Add slug route parameter to slot and user pages
2023-10-29 18:16:36 -05:00
Josh
1eb3bfa2ec
Implement URL slugs (#931)
* Implement URL slugs for Users and Slots

* Fix extra spaces in slot slugs
2023-10-29 20:30:43 +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
Slendy
b274310192
Bump dependencies 2023-10-24 17:28:20 -05:00
Josh
58664a2c7e
Add checks for resource strings (#930)
* Add checks for resource strings

* Don't use resource regex against png files
2023-10-24 22:14:52 +00:00
sudokoko
153bd75e26
Bump project dependencies (#922) 2023-10-12 11:37:41 -05:00
sudokoko
e0ce9066d9
Do not show mod-hidden levels on landing page (#916) 2023-10-07 16:48:32 -05:00
Molly Phillips
248f141c65
Add links to license and source code in footer (#909)
* Display link to source code and license in footer

* Remove " (fetch)" suffix in remote URL

* Use split instead of replace for getting the clean remote URL

* Open license link in new tab as well

* LINQ-ify things and handle potential errors

* Properly detect remote URL type and parse accordingly

Squashed 3 commits:

* Properly detect remote URL type and parse accordingly
* Actually fix broken source code link...maybe
* Attempt to fix broken source code link

* Fix a kokoism

Perhaps we should actually utilize the firstRemoteUnparsedUrl variable instead of getting the FirstOrDefault remote over and over

* Fix missing slash when using an SSH remote

* Assign null to parsed URL variable by default

Thank you clyde discord

* Only perform the null check on the unparsed URL once

Thank you again clyde discord

* Handle exception when there are no defined remotes

* Move remote determination to VersionHelper and format file

Squashed 4 commits:

* Nitpick variable naming and add XML doc
* Use preferred braces style
* Return null directly if unparsed URL is null
* Move remote determination to VersionHelper and format file

* Add param to include HTTPS prefix in DetermineRemoteUrl method

* Remove warnings from XML doc

Not needed as of c63284cb37

* Properly insert HTTPS prefix into SSH remotes

* Fix license layout and improve git remote parsing

---------

Co-authored-by: Slendy <josh@slendy.pw>
2023-10-04 00:08:23 +00:00
koko
3a2cdc9afe
Improve moderation case page and case partial (#900)
* Add pagination to moderation cases list and tweak case dismissal task

* Clean up case partial and add extended case status indicators

* Redirect back to cases list after dismissing a case

* Fix typo on cases list queue counter

* Fix dismissal queue counter

* Convert dismiss button check into pattern

* Turn down case dismissal task repeat interval to every 1 hour

* Use page 0 for case searching

* Implement pagination on the admin users list <3

* Fix pagination button padding and update colors to match existing role colors

* Fix typo in admin search placeholder

* Make cases searchable by user/slot ID instead of reason

Due to the current state of the moderation case entity, I can't directly query against the affected user name, so I've added the ability to search for the affected user/slot ID instead of reason.

* Actually apply the desired changes instead of just fixing the counts

* Grammatical nitpick in the search box placeholder
2023-09-22 18:53:53 +00:00
dependabot[bot]
2fa9d0767a
Bump Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation from 7.0.10 to 7.0.11 (#895)
Bump Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation

Bumps [Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation](https://github.com/dotnet/aspnetcore) from 7.0.10 to 7.0.11.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](https://github.com/dotnet/aspnetcore/compare/v7.0.10...v7.0.11)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 15:12:00 +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
Josh
a316c866c5
Add proper relationships to Comments (#838)
* Add specific foreign keys for comment targets

* Remove inheritdoc tags from migration

* Fix punctuation of deleted comment message and add mod deletion message

* Fix broken merge

* Cleanup comment queries
2023-08-24 18:58:03 +00:00
Josh
70a66e6034
Migrate scores to use proper relationships (#830)
* Initial work for score migration

* Finish score migration

* Implement suggested changes from code review

* Make Score Timestamp default the current time

* Chunk insertions to reduce packet size and give all scores the same Timestamp

* Fix serialization of GameScore

* Break score ties by time then scoreId

* Make lighthouse score migration not dependent on current score implementation
2023-08-19 07:32:38 +00:00
dependabot[bot]
38d1197237
Bump Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation from 7.0.9 to 7.0.10 (#866)
Bump Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation

Bumps [Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation](https://github.com/dotnet/aspnetcore) from 7.0.9 to 7.0.10.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](https://github.com/dotnet/aspnetcore/compare/v7.0.9...v7.0.10)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-16 14:56:26 +00:00
koko
1d89f7c548
Fix rendering issues with case creation page (#863) 2023-08-08 19:24:03 -05:00
koko
027173b9c7
Redesign case creation page (#854)
* Redesign case creation page

* Fix user id placeholder text

* Handle empty moderation history

* Mod history dropdown nitpick

* Fix styling issue with dropdown

ui fluid dropdown inherits from ui form

* Potentially fix NRE

* Un-require reason/mod notes

* Display username in moderation history view

* Order mod history by creation time descending

* Nitpick no moderation history string

* Handle AffectedUser null check within controller

* Fix styling issues

* Move moderation history segment above create case button segment

* Link back to affected user

* Move expiration field in with the other entries

* Grammatical consistency nitpick in history dropdown

* Handle empty case reasons in mod history

* This is the last nitpick, I swear!

* I lied. Variable naming consistency :trollface:

* Consolidate setPermanent function into button onclick

* Use HTML details and Fomantic list instead of dropdown

* Fix padding issue with details list

* Format history and user/id nicely

* Styling fixes and nitpicks of list items/links

* Apply suggestions from code review

* Clarification with code review suggestion
2023-08-07 04:45:46 +00:00
Josh
65f317d9bd
Improve website tests (#842)
* Improve website tests

* Use DefaultLang instead of hard coding English
2023-08-03 20:09:32 -05:00