Fork colours in the panes view: each branch's curve runs on into the rule under its panes' titles
Seven hues at one OKLCH lightness and a low chroma, light and dark, ordered so neighbours stay apart for red-green and blue-yellow colour blindness. The focused branch at full strength, the others fainter; the active pane's ink rule as before. A tab's foot and a dash on a spine carry the colour too. /colors line|top|edge|off (and the menu) choose the line, a band across each pane's top, one down its left edge, or none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
1 parent
30957260ce
commit
9f4a5aae43
9 files changed
+105
-16
No files matched your search
+14
-1
@@ -126,6 +126,9 @@ export interface Menu {
|
||||
}
|
||||
/** Page layout: one column with a margin, or panes side by side. Auto picks panes on wide windows. */
|
||||
export type View = "auto" | "column" | "panes";
|
||||
/** Where a fork's colour shows in the panes view: along its curves and title rules, across its panes' tops, down their left edges, or nowhere. */
|
||||
export type Colors = "line" | "top" | "edge" | "off";
|
||||
const COLORS: Colors[] = ["line", "top", "edge", "off"];
|
||||
/** The narrowest window, in CSS px, on which `auto` chooses panes. */
|
||||
export const PANES_MIN_WIDTH = 1600;
|
||||
|
||||
@@ -231,7 +234,7 @@ class Store {
|
||||
branchFrom: Commit | null = null;
|
||||
/** A note being previewed on hover, and where to draw it. */
|
||||
popup: { note: NodeId; x: number; top: number; bottom: number } | null = null;
|
||||
settings: { auto: boolean; speculate: boolean; view: View; autolink: AutoMode; curves: boolean } = { auto: true, speculate: false, view: "auto", autolink: "suggest", curves: true, ...lsGet("ie:settings", {}) };
|
||||
settings: { auto: boolean; speculate: boolean; view: View; autolink: AutoMode; curves: boolean; colors: Colors } = { auto: true, speculate: false, view: "auto", autolink: "suggest", curves: true, colors: "line", ...lsGet("ie:settings", {}) };
|
||||
/** Link discovery: scans after writes, suggestions, Related, the background job. */
|
||||
links = new Linker({
|
||||
doc: () => this.doc,
|
||||
@@ -2179,6 +2182,7 @@ class Store {
|
||||
auto: () => this.set("auto", arg !== "off"),
|
||||
speculate: () => this.set("speculate", arg !== "off"),
|
||||
curves: () => (this.set("curves", arg !== "off"), this.emit()),
|
||||
colors: () => this.setColors(arg),
|
||||
view: () => (["auto", "column", "panes"].includes(arg) ? this.setView(arg as View) : this.say(`/view auto, column or panes (now ${this.settings.view}, showing ${this.panes ? "panes" : "column"})`)),
|
||||
resolve: () => this.resolveAll(),
|
||||
new: () => (arg ? this.newDoc(arg) : this.openMenu("new")),
|
||||
@@ -2964,6 +2968,15 @@ class Store {
|
||||
this.say(arg === "on" ? "autolink on: sure links are made at once (u undoes); the rest are suggested" : arg === "suggest" ? "autolink suggest: links are only suggested; y takes one, S reviews them" : "autolink off: nothing is scanned automatically");
|
||||
}
|
||||
|
||||
/** /colors: where each fork's colour shows in the panes view. */
|
||||
setColors(arg: string) {
|
||||
const c = COLORS.find((x) => x === arg);
|
||||
if (!c) return this.say(`/colors line|top|edge|off (now ${this.settings.colors}): each fork's colour along its curves and title rules, across its panes' tops, down their left edges, or none`);
|
||||
this.settings = { ...this.settings, colors: c };
|
||||
lsSet("ie:settings", this.settings);
|
||||
this.say(c === "off" ? "colors off: forks in plain ink" : `colors ${c}`);
|
||||
}
|
||||
|
||||
/** /linkdoc, /linkall: scan in the background on the server; progress shows in the status line. */
|
||||
async linkJob(scope: "doc" | "library", doc?: NodeId, quiet = false) {
|
||||
const r = await this.links.startJob(scope, doc);
|
||||
|
||||
Reference in new issue
Block a user