summaryrefslogtreecommitdiffhomepage
path: root/src/features/workspaces/ui/TileActionBar.svelte
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-09-20 16:55:12 +0900
committerAdam Malczewski <[email protected]>2026-09-20 16:55:12 +0900
commitcaf7060ec571039102acd7b4fd73008fdecbe8a9 (patch)
tree7eac6c55556d20021de4a6e19f63d8efaa21ce84 /src/features/workspaces/ui/TileActionBar.svelte
parent72663945ef0a0053fbfd83b168e90f12169a5c3a (diff)
downloaddispatch-web-caf7060ec571039102acd7b4fd73008fdecbe8a9.tar.gz
dispatch-web-caf7060ec571039102acd7b4fd73008fdecbe8a9.zip
feat(workspaces): archive option + archived-workspaces view
Consume the backend's archive contract (feature/archive-workspaces): - adapter/http: archive(id)/unarchive(id) (PUT/DELETE /workspaces/:id/archive); list(archived?) passes the ?archived= query - logic/view-model: pure applyArchived(list, id, archived) - store.svelte: setArchived(id, archived) (optimistic + revert-on-error + reconciling refresh); archivedList + refreshArchived() for the archived view - ui/TileActionBar: new Archive action (the right-click→select action bar) - ui/HomeHeader: new Archived button opens the archived view - ui/ArchivedWorkspaces (new): modal listing archived workspaces with Unarchive + View (navigates to /<id>) - ui/WorkspacesHome: wire the Archive action + the Archived modal - .dispatch/wire.reference.md + backend-handoff.md: record the contract delta
Diffstat (limited to 'src/features/workspaces/ui/TileActionBar.svelte')
-rw-r--r--src/features/workspaces/ui/TileActionBar.svelte4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/features/workspaces/ui/TileActionBar.svelte b/src/features/workspaces/ui/TileActionBar.svelte
index 0d8bef5..ffb8f1d 100644
--- a/src/features/workspaces/ui/TileActionBar.svelte
+++ b/src/features/workspaces/ui/TileActionBar.svelte
@@ -11,6 +11,7 @@
onToggleStar,
onDetails,
onPlugins,
+ onArchive,
onDelete,
onClose,
}: {
@@ -24,6 +25,8 @@
/** The details flyout (default cwd + default computer). */
onDetails: () => void;
onPlugins: () => void;
+ /** Archive the workspace (hide from the home grid; reversible). */
+ onArchive: () => void;
onDelete: () => void;
onClose: () => void;
} = $props();
@@ -53,6 +56,7 @@
{#if withPlugins}
<button type="button" class="btn btn-ghost btn-sm" onclick={onPlugins}>Plugins</button>
{/if}
+ <button type="button" class="btn btn-ghost btn-sm" onclick={onArchive}>Archive</button>
<button
type="button"
class="btn btn-ghost btn-sm text-error"