Commit graph

273 commits

Author SHA1 Message Date
Slendy
8f91875f7c
Merge branch 'main' into recent-activity
# Conflicts:
#	.config/dotnet-tools.json
#	ProjectLighthouse.Servers.Website/Pages/Partials/ReviewPartial.cshtml
2024-04-01 14:45:59 -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
1737a16f38
Use SQLite in-memory in lieu of EF In-Memory for testing
Also replaces usages of DateTime.Now with DateTime.UtcNow for internal time storage
2024-03-24 20:52:39 -05:00
Slendy
23cb1bef1c
Initial implementation of recent activity
DB migrations intentionally left out since they aren't finalized
2024-03-24 20:51:02 -05: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
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
f084189a29
Add workaround for the clickable user links in a grief report (#846) 2023-07-21 14:55:04 +00:00
Slendy
282fd4e073
Bump dependencies and fix digest unit tests 2023-07-14 16:41:15 -05:00
koko
25bb2ecfc1
Add the ability for moderators to forcibly lock levels (#831)
* Add the ability for moderators to forcibly lock levels

* Prevent forcibly locking an already locked level

I had to rollback and re-commit this because I was getting some weird error within Rider.

* Correct moderation notice header styling & remove errant text
2023-07-07 22:44:05 +00:00
koko
872a161459
Fix null case bug in BannedUserPage and properly add no expiration text (#825)
* Fix null case bug in BannedUserPage and properly add no expiration text

* Correct maximum expiration hour to 23 (uses 24-hour)

* Improve wording for do not expire string

* Handle empty case reason string

* Move list to it's own div per HTML spec

* Move maximum expiration DateTime to the model

* Correct linq statement chaining style

* Use lambda operator instead of explicit accessor for MaximumExpiration
2023-07-05 21:15:34 +00:00
dependabot[bot]
3115030c11
Bump Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation from 7.0.7 to 7.0.8 (#814)
Bump Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation

Bumps [Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation](https://github.com/dotnet/aspnetcore) from 7.0.7 to 7.0.8.
- [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.7...v7.0.8)

---
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-07-04 15:25:22 +00:00
Slendy
4098a710c3
Fix a kokoism
Move autocorrect attribute to correct input
2023-06-29 00:39:13 -05:00
koko
88f8eec8a0
Do not autocomplete admin command form values (#822) 2023-06-28 22:49:31 +00:00
Slendy
5c66b0f713
Improve input validation for story level moderation 2023-06-26 23:41:30 -05:00
koko
f965be88b7
Website announcements fixes and additions (#818)
* Render line breaks in announcement content

* Track announcement publisher

* Change paragraph tag to a div for consistency

* Fix bottom padding for announcement content

* Track publisher user entity rather than just the username

* Potentially fix a migration failure

* Final code cleanup

* Fix linq statement chaining style

---------

Co-authored-by: Dagg <daggintosh@outlook.com>
2023-06-27 03:02:11 +00:00
Josh
14ebad07f3
Allow moderators to moderate story levels (#809)
* Allow moderators to view story levels on website
Show comments to moderators on in-game story levels that show the levels id

* Only show LH ID comment on the first page
2023-06-26 23:52:15 +00:00