mirror of
https://github.com/Blah-IM/Weblah.git
synced 2025-07-15 10:15:33 +00:00
feat: chat list (joined)
This commit is contained in:
parent
48c5ed4687
commit
9e899bbb27
10 changed files with 162 additions and 126 deletions
|
@ -28,7 +28,7 @@
|
|||
<div class="flex h-full w-full flex-col items-center justify-center">
|
||||
{#if server}
|
||||
{@const { info, messages, sendMessage } = useChat(server, roomId)}
|
||||
<ChatPage {info} {messages} on:sendMessage={sendMessage} />
|
||||
<ChatPage {info} {messages} on:sendMessage={(e) => sendMessage(e.detail)} />
|
||||
{:else}
|
||||
<ServiceMessage>
|
||||
To view this chat, you need to connect to chat server
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</script>
|
||||
|
||||
<form
|
||||
class="flex items-end gap-2 border-t border-ss-secondary bg-sb-primary p-2 shadow-sm"
|
||||
class="flex w-full items-end gap-2 border-t border-ss-secondary bg-sb-primary p-2 shadow-sm"
|
||||
bind:this={form}
|
||||
on:submit|preventDefault={submit}
|
||||
>
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
export let info: Readable<Chat>;
|
||||
export let messages: Readable<Message[]>;
|
||||
|
||||
type $$Events = {
|
||||
sendMessage: BlahRichText;
|
||||
};
|
||||
interface $$Events {
|
||||
sendMessage: CustomEvent<BlahRichText>;
|
||||
}
|
||||
</script>
|
||||
|
||||
<ChatHeader info={$info} outsideUnreadCount={263723} />
|
||||
<BgPattern class="flex-1" pattern="charlieBrown">
|
||||
<BgPattern class="w-full flex-1" pattern="charlieBrown">
|
||||
<ChatHistory messages={$messages} mySenderId={$currentKeyPair?.id} />
|
||||
</BgPattern>
|
||||
<ChatInput on:sendMessage />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue