mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-16 10:11:28 +00:00
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
This commit is contained in:
parent
24225d5ef5
commit
027173b9c7
3 changed files with 103 additions and 21 deletions
|
@ -1,4 +1,5 @@
|
|||
using LBPUnion.ProjectLighthouse.Types.Entities.Level;
|
||||
using LBPUnion.ProjectLighthouse.Types.Moderation.Cases;
|
||||
using LBPUnion.ProjectLighthouse.Types.Users;
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Servers.Website.Extensions;
|
||||
|
@ -7,6 +8,21 @@ public static class FormattingExtensions
|
|||
{
|
||||
public static string GetLevelLockIcon(this SlotEntity slot) => slot.InitiallyLocked ? "ui icon lock" : "";
|
||||
|
||||
public static string GetCaseTypeIcon(this CaseType caseType)
|
||||
{
|
||||
return caseType switch
|
||||
{
|
||||
CaseType.UserBan => "ui icon ban",
|
||||
CaseType.UserRestriction => "ui icon user alternate slash",
|
||||
CaseType.UserSilence => "ui icon volume off",
|
||||
CaseType.UserDisableComments => "ui icon comment slash",
|
||||
CaseType.LevelHide => "ui icon eye slash",
|
||||
CaseType.LevelLock => "ui icon lock",
|
||||
CaseType.LevelDisableComments => "ui icon comment slash",
|
||||
_ => "ui icon question",
|
||||
};
|
||||
}
|
||||
|
||||
public static string ToHtmlColor(this PermissionLevel permissionLevel)
|
||||
{
|
||||
return permissionLevel switch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue