Skip to content

Commit ae1af8a

Browse files
authored
fix: open workspace creation from quick access (core#210) (#231)
1 parent 57fd0cb commit ae1af8a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

frontend/src/lib/widgets/dashboard/QuickAccessWidget.svelte

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
function go(workspace) {
1616
navigate(`/workspaces/${workspace.id}`);
1717
}
18+
19+
function createWorkspace() {
20+
window.dispatchEvent(new CustomEvent('show-create-modal', {
21+
detail: { type: 'workspace' },
22+
}));
23+
}
1824
</script>
1925

2026
{#if workspaces.length === 0}
@@ -25,7 +31,7 @@
2531
<button
2632
class="mt-3 inline-flex items-center gap-1 text-xs font-medium px-2 py-1 rounded"
2733
style="color: var(--ds-link);"
28-
onclick={() => navigate('/workspaces/new')}
34+
onclick={createWorkspace}
2935
>
3036
<Plus class="w-3.5 h-3.5" /> {t('dashboard.states.createWorkspace')}
3137
</button>

0 commit comments

Comments
 (0)