From f17ff9246dc67950a9bc8d53f6bab219aaff6140 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Mon, 8 Jan 2024 08:32:39 +0100 Subject: [PATCH] Implemented input disable on closed tickets for users --- .../TicketPopup/TicketPopupView.razor | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/Moonlight/Shared/Components/TicketPopup/TicketPopupView.razor b/Moonlight/Shared/Components/TicketPopup/TicketPopupView.razor index 56dc9d9..4875d6a 100644 --- a/Moonlight/Shared/Components/TicketPopup/TicketPopupView.razor +++ b/Moonlight/Shared/Components/TicketPopup/TicketPopupView.razor @@ -66,22 +66,34 @@ @code { - [CascadingParameter] - public TicketPopupMain TicketPopupMain { get; set; } + [CascadingParameter] public TicketPopupMain TicketPopupMain { get; set; } private bool HasStarted = false; - + private ChatFileSelect FileSelect; private string MessageContent = ""; @@ -89,11 +101,11 @@ { await lazyLoader.SetText("Starting chat client"); - // Initialize chat service and start it + // Initialize chat service and start it TicketService.Chat.OnUpdate = OnUpdate; await TicketService.Chat.Start(TicketPopupMain.CurrentTicket); - // Let the ui know that we are ready + // Let the ui know that we are ready HasStarted = true; await InvokeAsync(StateHasChanged); } @@ -119,7 +131,7 @@ string.IsNullOrEmpty(MessageContent) ? $"Upload of {FileSelect.SelectedFile.Name}" : MessageContent, FileSelect.SelectedFile.OpenReadStream(1024 * 1024 * 5), FileSelect.SelectedFile.Name - ); + ); await FileSelect.RemoveSelection(); }