From 607a9b83a4d24e28cf64be5dbb1e8ff746f39885 Mon Sep 17 00:00:00 2001 From: James Tervit Date: Mon, 30 Nov 2026 13:31:22 +0800 Subject: [PATCH] Home links to System; System opens maximised The empty Apps state is dropped from this change: main now has its own "No apps yet" state with a Find apps button. Co-Authored-By: Chronara AI --- web/src/desktop/Desktop.tsx | 7 ++++--- web/src/screens/Home.tsx | 15 ++++++++++----- web/src/styles.css | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/web/src/desktop/Desktop.tsx b/web/src/desktop/Desktop.tsx index 067c6fe5..636fd437 100644 --- a/web/src/desktop/Desktop.tsx +++ b/web/src/desktop/Desktop.tsx @@ -104,7 +104,8 @@ const CELL_H = 112 // `bg` is the icon in the colourful themes; `tone` is the palette colour it takes in the others // (Midnight, Neon, Ember, Daylight and the Omarchy desktop's own theme), see .sys-ico in styles.css. -export const SYS: Record = { +// `max`: the window opens maximised; Restore still works. +export const SYS: Record = { home: {title: 'Home', icon: 'home-filled', bg: 'linear-gradient(150deg,#93c5fd,#1d4ed8 70%)', tone: 'var(--blue)', w: 860, h: 720}, files: {title: 'Files', icon: 'folder-filled', bg: 'linear-gradient(150deg,#7cb4ff,#2563eb 70%)', tone: 'var(--blue)', w: 960, h: 660}, apps: {title: 'Apps', icon: 'apps-filled', bg: 'linear-gradient(150deg,#c4b5fd,#7c3aed 70%)', tone: 'var(--mauve)', w: 800, h: 680}, @@ -113,7 +114,7 @@ export const SYS: Record)[kind]?.max ? 'max' : null, born: Date.now(), workspace, float: false} if (cfg.shell === 'hyprland') { const focused = topTileOn(workspace) setTrees((ts) => ({...ts, [workspace]: insertTile(ts[workspace] ?? null, focused?.id ?? firstLeaf(ts[workspace] ?? null), id, usable(), GAP, hiddenIds(workspace))})) diff --git a/web/src/screens/Home.tsx b/web/src/screens/Home.tsx index 8560375c..02a57d97 100644 --- a/web/src/screens/Home.tsx +++ b/web/src/screens/Home.tsx @@ -76,7 +76,7 @@ function machineIcon(member: FleetMember): IconName { return 'devices' } -export function Home({onOpenApp}: {onOpenApp: (app: UserApp) => void; go: (tab: 'apps' | 'more' | 'store') => void; onTerminal?: () => void; onAssistant?: () => void}) { +export function Home({onOpenApp, go}: {onOpenApp: (app: UserApp) => void; go: (tab: 'apps' | 'more' | 'store') => void; onTerminal?: () => void; onAssistant?: () => void}) { const {tempUnit} = useStatView() const user = useUser() const apps = useApps() @@ -205,14 +205,19 @@ export function Home({onOpenApp}: {onOpenApp: (app: UserApp) => void; go: (tab: ) )} - + + + {swarmList.length > 0 && ( diff --git a/web/src/styles.css b/web/src/styles.css index 5f321848..3a6411ac 100644 --- a/web/src/styles.css +++ b/web/src/styles.css @@ -12868,3 +12868,35 @@ input.temp-unit-box.fallback:checked { -webkit-touch-callout: default; overscroll-behavior: contain; } + +/* Home facts: tiles side by side; the ones that open a page look and act like buttons. */ +.facts:has(.fact-link) { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); +} +.fact-link { + cursor: pointer; + font: inherit; + font-size: 12.5px; + font-weight: 550; + transition: + background 0.15s, + border-color 0.15s; +} +.fact-link:hover { + background: var(--glass-2); + border-color: var(--line-2); +} +.fact-link:focus-visible { + outline: 2px solid var(--accent-text); + outline-offset: 2px; +} +.fact-system { + color: var(--accent-text); +} +/* On a phone the two facts share a row and System takes its own full row, not half of one. */ +@media (max-width: 520px) { + .facts:has(.fact-link) .fact-system { + grid-column: 1 / -1; + } +}