From 9215cb448e6e25c491167b82b3190fdf87c82ce0 Mon Sep 17 00:00:00 2001 From: Gagan Suie Date: Tue, 14 Feb 2023 14:07:31 -0600 Subject: [PATCH 1/2] Feat: added send-message websockets --- src/lib/assets/icons/channel/IconChatDrawer.svelte | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/lib/assets/icons/channel/IconChatDrawer.svelte diff --git a/src/lib/assets/icons/channel/IconChatDrawer.svelte b/src/lib/assets/icons/channel/IconChatDrawer.svelte new file mode 100644 index 00000000..bd795451 --- /dev/null +++ b/src/lib/assets/icons/channel/IconChatDrawer.svelte @@ -0,0 +1,12 @@ + + + From 7ca353c6aee17d4b06671c2a9eeddb962e6213c4 Mon Sep 17 00:00:00 2001 From: Gagan Suie Date: Tue, 14 Feb 2023 14:08:00 -0600 Subject: [PATCH 2/2] Feat: added send-message websockets --- .../Browse/CreateChannelDrawer.svelte | 4 +-- .../components/Channel/Chat/ChatDrawer.svelte | 33 +++++++++++++---- .../components/Channel/Chat/ChatInput.svelte | 16 +++++++-- src/routes/+layout.svelte | 1 - .../channel/[channelId]/+page.server.ts | 35 +++++++++++++++++-- src/routes/channel/[channelId]/+page.svelte | 21 ++++++----- 6 files changed, 85 insertions(+), 25 deletions(-) diff --git a/src/lib/components/Browse/CreateChannelDrawer.svelte b/src/lib/components/Browse/CreateChannelDrawer.svelte index 537bbc4f..89be5625 100644 --- a/src/lib/components/Browse/CreateChannelDrawer.svelte +++ b/src/lib/components/Browse/CreateChannelDrawer.svelte @@ -161,12 +161,12 @@ {/if} -
+
diff --git a/src/lib/components/Channel/Chat/ChatDrawer.svelte b/src/lib/components/Channel/Chat/ChatDrawer.svelte index 5ad79deb..d8210562 100644 --- a/src/lib/components/Channel/Chat/ChatDrawer.svelte +++ b/src/lib/components/Channel/Chat/ChatDrawer.svelte @@ -1,18 +1,39 @@ -
- -
+
+ +
-
(showDrawer = false)} class="drawer-overlay" /> -
+

{channel.title || 'Chat'}

diff --git a/src/lib/components/Channel/Chat/ChatInput.svelte b/src/lib/components/Channel/Chat/ChatInput.svelte index 1fd2c48b..35e78740 100644 --- a/src/lib/components/Channel/Chat/ChatInput.svelte +++ b/src/lib/components/Channel/Chat/ChatInput.svelte @@ -4,9 +4,16 @@ // import IconChatGif from '$lib/assets/icons/chat/IconChatGif.svelte' // import IconChatCode from '$lib/assets/icons/chat/IconChatCode.svelte' import IconChatSendMessage from '$lib/assets/icons/chat/IconChatSendMessage.svelte' + import { enhance } from '$app/forms' + let form: HTMLFormElement -
+