diff --git a/web/src/Rail.tsx b/web/src/Rail.tsx index 849c95b..e160b23 100644 --- a/web/src/Rail.tsx +++ b/web/src/Rail.tsx @@ -1,10 +1,10 @@ -import { useState } from 'react' +import { ReactNode, useState } from 'react' import { Term } from './api' import { Spinner } from './ui' // A group is either a page (clicking the head opens it — Dashboard) or a folder of // leaves (Terminal). `soon` groups are inert placeholders for the roadmap. -export interface Group { id: string; label: string; icon: string; soon?: boolean; page?: boolean } +export interface Group { id: string; label: string; icon: ReactNode; soon?: boolean; page?: boolean } interface Props { groups: Group[]; terms: Term[]; active: string | null; view: string; creating?: boolean diff --git a/web/src/Shell.tsx b/web/src/Shell.tsx index bf16e93..5f88d97 100644 --- a/web/src/Shell.tsx +++ b/web/src/Shell.tsx @@ -12,6 +12,13 @@ import Files from './Files' import Power from './Power' import { Btn, NetBar, Toasts, toast } from './ui' +// Inline outline icon so it matches the monochrome glyphs in the rail (emoji would be full colour). +const FolderIcon = ( + +) + const GROUPS: Group[] = [ { id: 'dashboard', label: 'Dashboard', icon: '◔', page: true }, { id: 'terminal', label: 'Terminal', icon: '>_' }, @@ -19,7 +26,7 @@ const GROUPS: Group[] = [ { id: 'cron', label: 'Cron', icon: '⏱', page: true }, { id: 'updates', label: 'Updates', icon: '⇪', page: true }, { id: 'disks', label: 'Disks', icon: '▤', page: true }, - { id: 'files', label: 'Files', icon: '▧', page: true }, + { id: 'files', label: 'Files', icon: FolderIcon, page: true }, ] type View = 'terminal' | 'dashboard' | 'services' | 'cron' | 'updates' | 'disks' | 'files' diff --git a/web/src/styles.css b/web/src/styles.css index c9e7e62..ceacc74 100644 --- a/web/src/styles.css +++ b/web/src/styles.css @@ -43,7 +43,7 @@ button { font: inherit; color: inherit; background: none; border: 0; cursor: poi .group.soon .group-head { color: var(--muted); cursor: default; } .group.soon .group-head:hover { background: none; } .chev { width: 10px; color: var(--muted); font-size: 11px; } -.gicon { width: 18px; text-align: center; color: var(--accent2); font-family: ui-monospace, monospace; font-size: 12px; } +.gicon { width: 18px; text-align: center; color: var(--accent2); font-family: ui-monospace, monospace; font-size: 12px; display: inline-flex; justify-content: center; align-items: center; } .badge { margin-left: auto; font-size: 10px; text-transform: uppercase; border: 1px solid var(--border); border-radius: 3px; padding: 0 4px; } .leaves { padding: 2px 0 6px; } .leaf { display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 30px; cursor: pointer; width: 100%; text-align: left; }