From 14dc9e1c1581fa04b37e81d76499f705512660b2 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 6 Nov 2024 18:42:38 -0500 Subject: Split message runs after ten minutes' silence. I've also refactored how runs are processed, to avoid re-splitting runs every time the channel view is rendered. They're generated when messages are ingested into the `$messages` store, instead. --- ui/lib/components/ActiveChannel.svelte | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'ui/lib/components') diff --git a/ui/lib/components/ActiveChannel.svelte b/ui/lib/components/ActiveChannel.svelte index a4ccd24..f939dbd 100644 --- a/ui/lib/components/ActiveChannel.svelte +++ b/ui/lib/components/ActiveChannel.svelte @@ -1,34 +1,11 @@
- {#each chunkBy(messageList, (msg) => msg.sender) as [sender, messages]} + {#each messageRuns as { sender, messages }}
-- cgit v1.2.3 From 1d4d4ca4832a49b50f382647327706bb50c9981d Mon Sep 17 00:00:00 2001 From: Kit La Touche Date: Thu, 7 Nov 2024 10:18:30 -0500 Subject: Backport multiline logic from prop/multiline-shift --- ui/lib/components/MessageInput.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/lib/components') diff --git a/ui/lib/components/MessageInput.svelte b/ui/lib/components/MessageInput.svelte index 907391c..c071bea 100644 --- a/ui/lib/components/MessageInput.svelte +++ b/ui/lib/components/MessageInput.svelte @@ -18,7 +18,8 @@ } function onKeyDown(event) { - if (!event.altKey && event.key === 'Enter') { + let modifier = event.shiftKey || event.altKey || event.ctrlKey || event.metaKey; + if (!modifier && event.key === 'Enter') { onSubmit(event); } } -- cgit v1.2.3 From ae9f3889de763d7841ab0acc7d7589da5bb830ff Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 6 Nov 2024 17:12:25 -0500 Subject: Sort out padding and wrapping for the chat input --- ui/lib/components/MessageInput.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/lib/components') diff --git a/ui/lib/components/MessageInput.svelte b/ui/lib/components/MessageInput.svelte index c071bea..26521e1 100644 --- a/ui/lib/components/MessageInput.svelte +++ b/ui/lib/components/MessageInput.svelte @@ -31,7 +31,7 @@ bind:value {disabled} type="search" - class="flex-auto h-6 input rounded-r-none" + class="flex-auto h-6 py-0 input rounded-r-none text-nowrap" >
-- cgit v1.2.3 From 9f0ba2e243be772a7677f8250893f5da7b2acbfe Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 6 Nov 2024 17:42:02 -0500 Subject: Factor out the elements of the `/me` page, and style them a little. --- ui/lib/components/ChangePassword.svelte | 60 +++++++++++++++++++++++ ui/lib/components/Invite.svelte | 5 +- ui/lib/components/Invites.svelte | 13 ++--- ui/lib/components/LogOut.svelte | 18 +++++++ ui/routes/(app)/me/+page.svelte | 84 +++++---------------------------- 5 files changed, 97 insertions(+), 83 deletions(-) create mode 100644 ui/lib/components/ChangePassword.svelte create mode 100644 ui/lib/components/LogOut.svelte (limited to 'ui/lib/components') diff --git a/ui/lib/components/ChangePassword.svelte b/ui/lib/components/ChangePassword.svelte new file mode 100644 index 0000000..1e48bee --- /dev/null +++ b/ui/lib/components/ChangePassword.svelte @@ -0,0 +1,60 @@ + + +
+ + + + + + + +
diff --git a/ui/lib/components/Invite.svelte b/ui/lib/components/Invite.svelte index 35e00b4..381f483 100644 --- a/ui/lib/components/Invite.svelte +++ b/ui/lib/components/Invite.svelte @@ -5,8 +5,5 @@ let inviteUrl = $derived(new URL(`/invite/${id}`, document.location)); - + {inviteUrl} diff --git a/ui/lib/components/Invites.svelte b/ui/lib/components/Invites.svelte index cc14f3b..314782a 100644 --- a/ui/lib/components/Invites.svelte +++ b/ui/lib/components/Invites.svelte @@ -4,7 +4,7 @@ let invites = $state([]); - async function onSubmit(event) { + async function onsubmit(event) { event.preventDefault(); let response = await createInvite(); if (response.status == 200) { @@ -13,11 +13,12 @@ } -