From 8c82631569399f83cfd3efb758aad3ec0ccf3765 Mon Sep 17 00:00:00 2001 From: Marcel Baumgartner Date: Mon, 16 Oct 2023 23:09:24 +0200 Subject: [PATCH] Implemented live chat ui --- .../Shared/Components/Partials/LiveChat.razor | 133 ++++++++++++++++++ Moonlight/Shared/Layouts/DefaultLayout.razor | 2 + 2 files changed, 135 insertions(+) create mode 100644 Moonlight/Shared/Components/Partials/LiveChat.razor diff --git a/Moonlight/Shared/Components/Partials/LiveChat.razor b/Moonlight/Shared/Components/Partials/LiveChat.razor new file mode 100644 index 00000000..c95aaf5e --- /dev/null +++ b/Moonlight/Shared/Components/Partials/LiveChat.razor @@ -0,0 +1,133 @@ +
+ @if (ShowLiveChat) + { + if (ShowChatsView) + { +
+
+ Chats +
+ +
+
+
+
+ +
+
+ M +
+
+ Melody Macy +
melody@altbox.com
+
+
+
+ 2 weeks +
+ +
+
+
+
+ Pic +
+
+ Max Smith +
max@kt.com
+
+
+
+ 1 day +
+
+
+
+
+ } + else + { +
+
+ Some chat +
+ +
+
+
+
+ @for (int i = 0; i < 9; i++) + { +
+
+
+
+ Pic +
+
+ Brian Cox + 2 mins +
+
+
+ How likely are you to recommend our company to your friends and family ? +
+
+
+
+
+
+
+ 5 mins + You +
+
+ Pic +
+
+
+ Hey there, we’re just writing to let you know that you’ve been subscribed to a repository on GitHub. +
+
+
+ } +
+
+ +
+ } + } + else + { + + } +
+ +@code +{ + private bool ShowLiveChat = false; + private bool ShowChatsView = true; + + private async Task ToggleShow() + { + ShowLiveChat = !ShowLiveChat; + await InvokeAsync(StateHasChanged); + } + + private async Task SetShowChats(bool state) + { + ShowChatsView = state; + await InvokeAsync(StateHasChanged); + } +} \ No newline at end of file diff --git a/Moonlight/Shared/Layouts/DefaultLayout.razor b/Moonlight/Shared/Layouts/DefaultLayout.razor index e97ff831..13e9f0c4 100644 --- a/Moonlight/Shared/Layouts/DefaultLayout.razor +++ b/Moonlight/Shared/Layouts/DefaultLayout.razor @@ -8,6 +8,8 @@
@ChildContent + +