diff --git a/src/lib/components/ActionStatus.svelte b/src/lib/components/ActionStatus.svelte
new file mode 100644
index 0000000..4427266
--- /dev/null
+++ b/src/lib/components/ActionStatus.svelte
@@ -0,0 +1,24 @@
+
+
+
+
+
{status?.text ?? ''}
+
+
diff --git a/src/lib/components/FolderSyncForm.svelte b/src/lib/components/FolderSyncForm.svelte
index fc0a3eb..09346c0 100644
--- a/src/lib/components/FolderSyncForm.svelte
+++ b/src/lib/components/FolderSyncForm.svelte
@@ -1,11 +1,29 @@
@@ -55,13 +56,10 @@
}}
>
{unavailable ?? message ?? ''}
@@ -73,9 +71,12 @@
gap: 0.3rem;
}
+ /* Always two lines tall, so a message appearing doesn't push the page down. */
.run-now p {
- max-width: 22rem;
+ width: 22rem;
+ max-width: 100%;
text-align: right;
- min-height: 1.2em;
+ height: 3em;
+ overflow: hidden;
}
diff --git a/src/lib/components/StableText.svelte b/src/lib/components/StableText.svelte
new file mode 100644
index 0000000..c707da7
--- /dev/null
+++ b/src/lib/components/StableText.svelte
@@ -0,0 +1,30 @@
+
+
+
+ {text}
+ {#each options as option (option)}
+ {option}
+ {/each}
+
+
+
diff --git a/src/lib/server/forms.ts b/src/lib/server/forms.ts
index 60807db..40f793b 100644
--- a/src/lib/server/forms.ts
+++ b/src/lib/server/forms.ts
@@ -20,6 +20,20 @@ export async function attempt(
}
}
+/**
+ * `attempt` for pages with several forms. Success and failure both carry the action's name,
+ * so the page can show the message beside the button that was used.
+ */
+export function attemptAction(
+ action: string,
+ work: () => Promise,
+ echo?: E
+) {
+ return attempt(async () => ({ action, message: await work() }), { action, ...echo } as {
+ action: string;
+ } & E);
+}
+
/** A form field as a string (empty if missing or a file). */
export function field(data: FormData, name: string): string {
const value = data.get(name);
diff --git a/src/lib/styles/app.css b/src/lib/styles/app.css
index 57a1698..f70b1da 100644
--- a/src/lib/styles/app.css
+++ b/src/lib/styles/app.css
@@ -59,6 +59,9 @@
html {
-webkit-text-size-adjust: 100%;
+ /* Keep room for the scrollbar even when the page is short, so filtering or collapsing a
+ list never shifts everything sideways. */
+ scrollbar-gutter: stable;
}
body {
diff --git a/src/routes/admin/login/+page.svelte b/src/routes/admin/login/+page.svelte
index 550a53f..e9ea05d 100644
--- a/src/routes/admin/login/+page.svelte
+++ b/src/routes/admin/login/+page.svelte
@@ -1,5 +1,6 @@