From 9ad3b04da5d8aae7dfd6f57147c04225a43484ab Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Thu, 3 Feb 2022 00:15:27 +0200 Subject: [PATCH] frontend: separate app component from chat view --- frontend/src/components/App.svelte | 42 +++-------------- frontend/src/components/ChatView.svelte | 46 +++++++++++++++++++ frontend/src/components/MessageEntry.svelte | 5 +- .../SelectedGuildInfoDisplay.svelte | 8 ---- 4 files changed, 56 insertions(+), 45 deletions(-) create mode 100644 frontend/src/components/ChatView.svelte delete mode 100644 frontend/src/components/SelectedGuildInfoDisplay.svelte diff --git a/frontend/src/components/App.svelte b/frontend/src/components/App.svelte index b265a29..a166374 100644 --- a/frontend/src/components/App.svelte +++ b/frontend/src/components/App.svelte @@ -1,8 +1,6 @@ - - -
-
- -
- -
-
- -
+ diff --git a/frontend/src/components/ChatView.svelte b/frontend/src/components/ChatView.svelte new file mode 100644 index 0000000..e33e6ec --- /dev/null +++ b/frontend/src/components/ChatView.svelte @@ -0,0 +1,46 @@ + + + + +
+
+ {(selectedGuild ? selectedGuild.name : "[no guild]")} • {(selectedChannel ? selectedChannel.name : "[no channel]")} +
+ +
+
+ +
diff --git a/frontend/src/components/MessageEntry.svelte b/frontend/src/components/MessageEntry.svelte index bd80bd5..284f709 100644 --- a/frontend/src/components/MessageEntry.svelte +++ b/frontend/src/components/MessageEntry.svelte @@ -1,6 +1,7 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/src/components/SelectedGuildInfoDisplay.svelte b/frontend/src/components/SelectedGuildInfoDisplay.svelte deleted file mode 100644 index 254776b..0000000 --- a/frontend/src/components/SelectedGuildInfoDisplay.svelte +++ /dev/null @@ -1,8 +0,0 @@ - - -{#if guild && channel} - {guild.name} • {channel.name} -{/if} \ No newline at end of file