From fbde9efd51c342cbfea810b75779e35ea83b3c5d Mon Sep 17 00:00:00 2001 From: eti Date: Thu, 3 Sep 2026 14:14:17 +0200 Subject: [PATCH] web/strings: improve string creation page Signed-off-by: eti --- .../components/auth/AccountSelector.svelte | 10 ++- .../profile/StringCardContent.svelte | 26 +++--- .../lib/components/strings/StringForm.svelte | 87 ++++++++++--------- web/src/lib/components/ui/Card.svelte | 4 +- web/src/lib/components/ui/Dropdown.svelte | 6 +- web/src/lib/components/ui/Field.svelte | 6 +- web/src/routes/strings/new/+page.svelte | 12 +-- 7 files changed, 84 insertions(+), 67 deletions(-) diff --git a/web/src/lib/components/auth/AccountSelector.svelte b/web/src/lib/components/auth/AccountSelector.svelte index 8f05a879f..7c820c1a8 100644 --- a/web/src/lib/components/auth/AccountSelector.svelte +++ b/web/src/lib/components/auth/AccountSelector.svelte @@ -4,7 +4,7 @@ export const accountSelector = tv({ slots: { chevron: "size-3 shrink-0", - header: "border-b-0 px-2 py-1.5" + header: "font-medium px-2 py-1.5" } }); @@ -12,7 +12,7 @@ -
-
-
+
+ - {#if entry.description} -

- {entry.description} -

- {/if} + {#if entry.description} +

+ {entry.description} +

+ {/if} +
-
+
{entry.lines} line{entry.lines === 1 ? "" : "s"} {compactRelativeTime(entry.createdAt)} diff --git a/web/src/lib/components/strings/StringForm.svelte b/web/src/lib/components/strings/StringForm.svelte index a4b309139..10b1223bf 100644 --- a/web/src/lib/components/strings/StringForm.svelte +++ b/web/src/lib/components/strings/StringForm.svelte @@ -16,6 +16,7 @@ import { putString } from "$lib/api/strings"; import type { StringRecord } from "$lib/api/records"; import { createAction } from "$lib/action.svelte"; + import Field from "$lib/components/ui/Field.svelte"; interface Props { mode?: "create" | "edit"; @@ -74,49 +75,57 @@ }); - -
-
+ + +
- + + + + + +
+ + +