diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 6357562..9896c4b 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -7,6 +7,7 @@ import VaultSelection from './lib/shell/VaultSelection.svelte'; import WorkbenchHost from './lib/shell/WorkbenchHost.svelte'; import WorkspaceHost from './lib/shell/WorkspaceHost.svelte'; + import TodaySurface from './lib/shell/TodaySurface.svelte'; import * as App from '../wailsjs/go/api/App'; import { debug } from './lib/log/debug.js'; import { onMount } from 'svelte'; @@ -74,33 +75,20 @@ if (err || !workspaces || workspaces.length === 0) { workspaceNodes = []; selectedWorkspaceName = ''; - currentView = 'workspace-empty'; + currentView = 'today'; emitWorkspaceActive(''); return; } workspaceNodes = workspaces.map(workspaceAsNode); - let currentWorkspace = null; - try { - currentWorkspace = await App.GetCurrentWorkspace(); - } catch { - currentWorkspace = null; - } - const currentName = workspaceName(currentWorkspace); - const selected = workspaces.find((workspace) => workspaceName(workspace) === currentName) || workspaces[0]; - selectedWorkspaceName = workspaceName(selected); - if (selectedWorkspaceName) { - try { await App.SetCurrentWorkspace(selectedWorkspaceName); } catch {} - currentView = 'workspace'; - } else { - currentView = 'workspace-empty'; - } - emitWorkspaceActive(selectedWorkspaceName); + selectedWorkspaceName = ''; + currentView = 'today'; + emitWorkspaceActive(''); } catch (e) { debug.log('[App] openDefaultWorkspaceRoute ERROR', String(e)); workspaceNodes = []; selectedWorkspaceName = ''; - currentView = 'workspace-empty'; + currentView = 'today'; emitWorkspaceActive(''); } } @@ -394,6 +382,12 @@ {:else if currentView === 'workbench'} + {:else if currentView === 'today'} + {:else if currentView === 'workspace' || currentView === 'workspace-empty'} {/if} + {#if vaultOpen} + + {/if} + {#if sidebarItems.length > 0}