diff --git a/Moonlight/Moonlight.csproj b/Moonlight/Moonlight.csproj index d79b7ef5..00875d8b 100644 --- a/Moonlight/Moonlight.csproj +++ b/Moonlight/Moonlight.csproj @@ -44,20 +44,4 @@ - - - <_ContentIncludedByDefault Remove="storage\config.json" /> - <_ContentIncludedByDefault Remove="Shared\Components\Partials\TicketPopup\LiveChatCreate.razor" /> - <_ContentIncludedByDefault Remove="Shared\Components\Partials\TicketPopup\LiveChatMain.razor" /> - <_ContentIncludedByDefault Remove="Shared\Components\Partials\TicketPopup\LiveChatOverview.razor" /> - <_ContentIncludedByDefault Remove="Shared\Components\Partials\TicketPopup\LiveChatView.razor" /> - - - - - - - - - diff --git a/Moonlight/Shared/Components/Auth/MailVerify.razor b/Moonlight/Shared/Components/Auth/MailVerify.razor index 15bbe1a3..b80bca7c 100644 --- a/Moonlight/Shared/Components/Auth/MailVerify.razor +++ b/Moonlight/Shared/Components/Auth/MailVerify.razor @@ -28,7 +28,7 @@ - + } diff --git a/Moonlight/Shared/Views/Admin/Tickets/View.razor b/Moonlight/Shared/Views/Admin/Tickets/View.razor index 3b305178..2d298803 100644 --- a/Moonlight/Shared/Views/Admin/Tickets/View.razor +++ b/Moonlight/Shared/Views/Admin/Tickets/View.razor @@ -30,85 +30,110 @@
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Ticket ID - @(Ticket.Id)
- User - - @(Ticket.Creator.Username) -
- Service - - @if (Ticket.Service == null) - { - None - } - else - { - @(Ticket.Service.Nickname ?? $"Service {Ticket.Service.Id}") - } -
- Status - -
- -
-
- Priority - - -
- Created at - - @(Formatter.FormatDate(Ticket.CreatedAt)) -
- -
-
+ @if (ShowDetails) + { +
+ @(Ticket.Name) +
+ + + Description + + +

+ @(Formatter.FormatLineBreaks(Ticket.Description)) +

+ + + Tries: + + +

+ @(Formatter.FormatLineBreaks(Ticket.Tries)) +

+ } + else + { +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Ticket ID + @(Ticket.Id)
+ User + + @(Ticket.Creator.Username) +
+ Service + + @if (Ticket.Service == null) + { + None + } + else + { + @(Ticket.Service.Nickname ?? $"Service {Ticket.Service.Id}") + } +
+ Status + +
+ +
+
+ Priority + + +
+ Created at + + @(Formatter.FormatDate(Ticket.CreatedAt)) +
+ +
+
+ }
@@ -185,9 +210,10 @@ { [Parameter] public int Id { get; set; } - + private Ticket? Ticket; private bool HasStarted = false; + private bool ShowDetails = false; // Message compose cache private ChatFileSelect FileSelect; @@ -204,7 +230,7 @@ .Include(x => x.Creator) .Include(x => x.Service) .FirstOrDefault(x => x.Id == Id); - + return Task.CompletedTask; } @@ -216,7 +242,7 @@ TicketService.Chat.OnUpdate += OnUpdate; await TicketService.Chat.Start(Ticket, true); - + EditOpen = TicketService.Chat.Ticket.Open; EditPriority = TicketService.Chat.Ticket.Priority; @@ -249,19 +275,25 @@ MessageContent = ""; await InvokeAsync(StateHasChanged); } - + private async Task Save() { await TicketService.Chat.Update(EditOpen, EditPriority); await ToastService.Success("Successfully updated ticket"); } + private async Task SetShowDetails(bool b) + { + ShowDetails = b; + await InvokeAsync(StateHasChanged); + } + private async Task OnUpdate() { - // Overwrite current cached data + // Overwrite current cached data EditOpen = TicketService.Chat.Ticket.Open; EditPriority = TicketService.Chat.Ticket.Priority; - + await InvokeAsync(StateHasChanged); }