mirror of
https://github.com/pithings/unkernel.git
synced 2026-12-05 05:49:50 +08:00
web: pin only Terminal and Settings in the Dock by default, on desktops and phones (the launcher's groups, glmark2 and Galculator are no longer pinned); the static first paint's Dock has the two in that order
This commit is contained in:
@@ -589,8 +589,8 @@ deploying the page needs no kernel toolchain.
|
||||
tile per other open window (`#dock-terminal-K`, `#dock-display`,
|
||||
`#dock-preview`, ...), and while wland's relay is connected
|
||||
`#dock-wayland` (Ctrl-A w). Pins (`pins.ts`): localStorage `kw.pins`, an
|
||||
ordered list of app ids and `group:<id>` (by default Terminal, the Browsers,
|
||||
AI, Desktop, Graphics and Games groups, and Settings), changed from the
|
||||
ordered list of app ids and `group:<id>` (by default Terminal and
|
||||
Settings), changed from the
|
||||
tiles' and the launcher's menus (Keep in Dock, Remove from Dock, Move
|
||||
Left, Move Right); an entry the registry no longer has is kept but not
|
||||
shown. A pinned app's tile stands for its window (`appwindows.ts`
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
module never runs, this is what shows: the desktop as components/App.tsx
|
||||
first draws it (inert): the console's window (Workspace.tsx) with its
|
||||
placeholder, the Dock (Dock.tsx: Apps, dimmed until the system runs,
|
||||
Settings, the console's tile) and the top bar (TopBar.tsx: the mark, the
|
||||
the console's tile, Settings) and the top bar (TopBar.tsx: the mark, the
|
||||
boot indicator, the power button); the failure card is for a failure
|
||||
before then. -->
|
||||
<div id="root">
|
||||
@@ -193,9 +193,7 @@
|
||||
<footer id="dock" class="relative flex flex-none items-center justify-center select-none">
|
||||
<nav class="dock-pill">
|
||||
<button type="button" class="dock-tile group relative flex-none" data-off aria-disabled="true"><span class="dock-face"><svg width="19" height="19" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4" y="4" width="4" height="4" rx="1" /><rect x="10" y="4" width="4" height="4" rx="1" /><rect x="16" y="4" width="4" height="4" rx="1" /><rect x="4" y="10" width="4" height="4" rx="1" /><rect x="10" y="10" width="4" height="4" rx="1" /><rect x="16" y="10" width="4" height="4" rx="1" /><rect x="4" y="16" width="4" height="4" rx="1" /><rect x="10" y="16" width="4" height="4" rx="1" /><rect x="16" y="16" width="4" height="4" rx="1" /></svg></span></button>
|
||||
<button type="button" class="dock-tile group relative flex-none"><span class="dock-face"><svg width="19" height="19" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="6.5" /><circle cx="12" cy="12" r="2.5" /><path d="M18.5 12H21M12 18.5V21M5.5 12H3M12 5.5V3M16.6 16.6l1.8 1.8M7.4 16.6l-1.8 1.8M7.4 7.4 5.6 5.6M16.6 7.4l1.8-1.8" /></svg></span></button>
|
||||
<span aria-hidden="true" class="dock-sep"></span>
|
||||
<div class="dock-apps"><button type="button" class="dock-tile group relative flex-none" aria-pressed="true"><span class="dock-face"><svg width="19" height="19" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 7 5 5-5 5M12.5 17H19" /></svg></span><span aria-hidden="true" class="dock-dot" data-dot="on"></span></button></div>
|
||||
<div class="dock-apps"><button type="button" class="dock-tile group relative flex-none" aria-pressed="true"><span class="dock-face"><svg width="19" height="19" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 7 5 5-5 5M12.5 17H19" /></svg></span><span aria-hidden="true" class="dock-dot" data-dot="on"></span></button><button type="button" class="dock-tile group relative flex-none"><span class="dock-face"><svg width="19" height="19" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="6.5" /><circle cx="12" cy="12" r="2.5" /><path d="M18.5 12H21M12 18.5V21M5.5 12H3M12 5.5V3M16.6 16.6l1.8 1.8M7.4 16.6l-1.8 1.8M7.4 7.4 5.6 5.6M16.6 7.4l1.8-1.8" /></svg></span></button></div>
|
||||
</nav>
|
||||
</footer>
|
||||
<header id="topbar">
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
// Ctrl-A o; dimmed while the system does not run: data-off, store.ts
|
||||
// isRunning);
|
||||
// - the apps and launcher groups kept in the Dock (pins.ts; by default
|
||||
// Terminal, Browsers, AI, Desktop, Graphics, Games and Settings; on phones
|
||||
// Terminal, glmark2, Galculator, Desktop and Settings), in their order. A
|
||||
// Terminal and Settings), in their order. A
|
||||
// group's tile (#dock-group-<id>, GroupFace: its icon in front of a small
|
||||
// fan of cards) opens its apps in a stack above it (DockStack.tsx
|
||||
// #dock-stack; useStackHover below: a mouse resting on the tile opens it,
|
||||
|
||||
@@ -24,18 +24,13 @@ import { APPS, GROUPS } from "./apps/index.ts";
|
||||
import type { App, Group } from "./apps/types.ts";
|
||||
import { createStore } from "./store.ts";
|
||||
import { store } from "./prefs.ts";
|
||||
import { isMobile } from "./config.ts";
|
||||
|
||||
/** The key under prefs.ts store()'s `kw.` prefix. */
|
||||
const KEY = "pins";
|
||||
/** A stored group entry's prefix. */
|
||||
const GROUP = "group:";
|
||||
/** A fresh profile's pins on a desktop: the console's Terminal, the Browsers, AI, Desktop, Graphics and Games folders and Settings. */
|
||||
const DESKTOP_PINS: readonly string[] = ["terminal", `${GROUP}browsers`, `${GROUP}agents`, `${GROUP}desktop`, `${GROUP}gl`, `${GROUP}games`, "settings"];
|
||||
/** A fresh profile's pins on a phone (config.ts isMobile()): the console's Terminal, glmark2, Galculator, the Desktop folder and Settings. */
|
||||
const MOBILE_PINS: readonly string[] = ["terminal", "glmark2", "galculator", `${GROUP}desktop`, "settings"];
|
||||
/** A fresh profile's pins: MOBILE_PINS on a phone, else DESKTOP_PINS. */
|
||||
export const DEFAULT_PINS: readonly string[] = isMobile() ? MOBILE_PINS : DESKTOP_PINS;
|
||||
/** A fresh profile's pins: the console's Terminal and Settings. */
|
||||
export const DEFAULT_PINS: readonly string[] = ["terminal", "settings"];
|
||||
|
||||
const BY_ID = new Map(APPS.map((a) => [a.id, a]));
|
||||
const GROUP_BY_ID = new Map(GROUPS.map((g) => [g.id, g]));
|
||||
|
||||
Reference in New Issue
Block a user