diff --git a/frontend/src/lib/ban-store.ts b/frontend/src/lib/ban-store.ts new file mode 100644 index 0000000..e149e4c --- /dev/null +++ b/frontend/src/lib/ban-store.ts @@ -0,0 +1,18 @@ +// Whether the CURRENT guest is banned. +// +// The ban is deliberately read-only (see backend `handlers/host.rs`): the guest keeps the feed +// and the released keepsake, but every write — upload, like, comment, delete — is refused with +// 403 "Du bist gesperrt.". Until this store existed the client had no idea, so all of those +// controls rendered fully enabled and the guest discovered the ban one error toast at a time, +// with nobody at the party to ask. The event-lock case has always been surfaced live for +// exactly this reason (`event-state-store`); a ban simply never was. +// +// Seeded from `/me/context` (root layout on boot, and `refreshEventState` afterwards). Reset on +// identity change so a shared device does not carry one guest's ban to the next. + +import { writable } from 'svelte/store'; +import { onClearAuth } from './auth'; + +export const isBanned = writable(false); + +onClearAuth(() => isBanned.set(false)); diff --git a/frontend/src/lib/components/UploadQueue.svelte b/frontend/src/lib/components/UploadQueue.svelte index ac63cd1..167effc 100644 --- a/frontend/src/lib/components/UploadQueue.svelte +++ b/frontend/src/lib/components/UploadQueue.svelte @@ -4,6 +4,7 @@ isProcessing, retryItem, removeItem, + cancelItem, clearCompleted, rateLimitRetryAt } from '$lib/upload-queue'; @@ -121,6 +122,27 @@ Erneut {/if} + + {#if item.status === 'uploading'} + + {/if} {#if item.status === 'done' || item.status === 'error' || item.status === 'blocked'}