summaryrefslogtreecommitdiffhomepage
path: root/src/features/workspaces/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/features/workspaces/ui')
-rw-r--r--src/features/workspaces/ui/WorkspaceCard.svelte10
-rw-r--r--src/features/workspaces/ui/WorkspacesHome.svelte10
2 files changed, 18 insertions, 2 deletions
diff --git a/src/features/workspaces/ui/WorkspaceCard.svelte b/src/features/workspaces/ui/WorkspaceCard.svelte
index 70cfda2..8c004aa 100644
--- a/src/features/workspaces/ui/WorkspaceCard.svelte
+++ b/src/features/workspaces/ui/WorkspaceCard.svelte
@@ -1,7 +1,7 @@
<script lang="ts">
import type { ComputerEntry, WorkspaceEntry } from "@dispatch/wire";
import { untrack } from "svelte";
- import { WorkspacePluginModal, type PluginsStore } from "../../plugins";
+ import { WorkspacePluginModal, type PluginsStore, type WorkspaceLayoutPort } from "../../plugins";
import type { WorkspaceStore } from "../store.svelte";
import { relativeTime } from "../logic/view-model";
import { workspacePath } from "../logic/route";
@@ -14,6 +14,7 @@
computers,
hasActive,
plugins,
+ layout,
}: {
ws: WorkspaceEntry;
store: WorkspaceStore;
@@ -33,6 +34,12 @@
* (tests) → no button.
*/
plugins?: PluginsStore;
+ /**
+ * Optional layout port (plan 04 §4.4): forwarded to the plugins modal
+ * for the "Reset layout to default" affordance. Absent → the modal's
+ * layout section doesn't render.
+ */
+ layout?: WorkspaceLayoutPort;
} = $props();
// Whether at least one conversation in this workspace is currently active
@@ -306,6 +313,7 @@
workspaceId={ws.id}
workspaceTitle={ws.title}
{plugins}
+ {...(layout ? { layout } : {})}
onClose={() => (pluginsOpen = false)}
/>
{/if}
diff --git a/src/features/workspaces/ui/WorkspacesHome.svelte b/src/features/workspaces/ui/WorkspacesHome.svelte
index 548d733..5a4d88f 100644
--- a/src/features/workspaces/ui/WorkspacesHome.svelte
+++ b/src/features/workspaces/ui/WorkspacesHome.svelte
@@ -1,7 +1,7 @@
<script lang="ts">
import { onMount } from "svelte";
import type { ComputerEntry } from "@dispatch/wire";
- import { PluginManager, type PluginsStore } from "../../plugins";
+ import { PluginManager, type PluginsStore, type WorkspaceLayoutPort } from "../../plugins";
import type { WorkspaceStore } from "../store.svelte";
import { isValidSlug, workspacePath } from "../logic/route";
import WorkspaceCard from "./WorkspaceCard.svelte";
@@ -12,6 +12,7 @@
computers,
hasActive,
plugins,
+ layout,
}: {
store: WorkspaceStore;
onNavigate: (path: string) => void;
@@ -29,6 +30,12 @@
* plugins) → the buttons don't render.
*/
plugins?: PluginsStore;
+ /**
+ * The layout port (plan 04 §4.4): forwarded to each {@link WorkspaceCard}
+ * for the plugins modal's "Reset layout to default" affordance. Absent →
+ * the modal's layout section doesn't render.
+ */
+ layout?: WorkspaceLayoutPort;
} = $props();
onMount(() => {
@@ -128,6 +135,7 @@
{computers}
{...(hasActive ? { hasActive } : {})}
{...(plugins ? { plugins } : {})}
+ {...(layout ? { layout } : {})}
/>
{/each}
</ul>