Files
DemonGatanjieuandClaude Opus 5.5 46facb9115 feat(shell): icon rail, per-page list column and a home page
The browser now navigates from one narrow icon rail on the left: Home, Models,
Gallery, Workflows, Materials, then Voices and Audio, then scan, Model Doctor,
Node Assistant and the toolbox, with settings at the bottom. It replaces the
header tabs, the image/audio toggle and the tool bar under the folder list, so
the list column holds only a list and can close without hiding a command.

- ui_shell_rail.js builds the rail; ui_shell_nav.js owns goTo(page), which page
  has a list and whether it is open (remembered per page; below 760 px it starts
  closed and overlays), the page title in the header and the page reopened next
  time. Clicking the current page's icon toggles its list (from a model's detail
  it returns to the grid).
- ui_home.js: task cards and first steps; the first open lands there.
- Window drag/resize moved to ui_shell_frame.js and scan polling to
  ui_scan_watch.js; ui_sidebar.js goes from 864 to 464 lines.
- Workspaces (recipes, notes, materials) keep the rail visible; the list steps
  aside while one is open.
- Removed what the rail replaced: sidebar_actions.js (bottom-bar hover labels and
  tooltip bubble), the domain toggle button, their CSS and unused text keys.
- Spotlight tour: the rail step replaces the header-tabs step, cards open to the
  right of rail items, and the audio tour points at the rail's Audio entry.
- Decision record AD-017; architecture map, frontend and update-guide docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 23:08:16 +08:00

23 lines
630 B
JavaScript

/**
* Which side the browser is on (image or audio): decides the list column and the "!" guide.
* The rail's pages switch it (`ui_shell_nav.js`).
*/
const STORAGE_KEY = 'anomalous_active_domain';
export function getActiveDomain() {
try {
return localStorage.getItem(STORAGE_KEY) === 'audio' ? 'audio' : 'visual';
} catch (_) {
return 'visual';
}
}
export function setActiveDomain(domain) {
try {
localStorage.setItem(STORAGE_KEY, domain === 'audio' ? 'audio' : 'visual');
} catch (_) {
// Private windows may refuse storage; the switch still applies to this page.
}
}