Refinement-Runde Panel/Wiki: Bedienung, Themes, Archiv-Wahl, Frontend-Tests

- Slug transliteriert Umlaute/ß (fuer statt f-r); aktiver Tab mit Akzent +
  Unterstrich; kein aktiver Tab bei zugeklapptem Panel (mode.clear)
- Suche: Live-Update auch beim Löschen (<3 Zeichen: Hinweis), #tag-Filter in
  der Query, Treffer öffnen im Dokument-Tab (panel_load, ohne Frontmatter);
  Wiki-Sprung-Button im Dokument; Wiki-Fehler sichtbar als Toast
- Archiv-Formular am Archiv-Button (Ordner/Beschreibung/Schlagwörter);
  panel_archive_cmd nimmt Meta entgegen
- Wiki-Übersicht: Zuletzt-Sektion, Backlink-Zähler, Wurzel-Eyebrow
- Themes: Panel-Farben über CSS-Variablen, applyTheme leitet sie aus dem
  jeweiligen Theme ab (auch helle); gemeinsames themes.ts
- Fenster: Doppelklick maximiert; gelöstes Fenster merkt Größe/Position
  (Window-ACL: set-position/outer-position/inner-size ergänzt);
  open_panel_window async (GTK-Deadlock-Vorgabe); Panel-Fenster spiegelt
  JS-Fehler ins Dev-Log
- Archiv pro Projekt wähl-/abwählbar (Einstellungsdialog, setzt/entfernt
  Permissions); require_archive_home legt den Ordner an; ohne Archiv nur
  Befehle+Dokument im Panel
- Frontend-Tests: vitest + happy-dom, 27 Tests über Modus-, Such-, Wiki-,
  Editor- und Formular-Logik (npm test)
This commit is contained in:
marcus hinz
2026-07-19 17:08:05 +02:00
parent 81a663e020
commit 286513def8
27 changed files with 1653 additions and 190 deletions
+66 -34
View File
@@ -4,11 +4,26 @@
<meta charset="UTF-8" />
<title>Terminal</title>
<style>
/* Theme-Variablen — Defaults sind Mocha; applyTheme (themes.ts) überschreibt. */
:root {
--bg: #1e1e2e;
--surface: #181825;
--tile: #11111b;
--line: #313244;
--line-strong: #45475a;
--text: #cdd6f4;
--muted: #a6adc8;
--faint: #6c7086;
--accent: #89b4fa;
--ok: #a6e3a1;
--warn: #f9e2af;
--err: #f38ba8;
}
html,
body {
height: 100%;
margin: 0;
background: #1e1e2e;
background: var(--bg);
overflow: hidden;
}
body {
@@ -18,7 +33,7 @@
/* Feiner Fensterrahmen fürs dekorationslose Fenster (nur Linux). */
:root[data-platform="other"] body {
box-sizing: border-box;
border: 1px solid #313244;
border: 1px solid var(--line);
}
header {
height: 40px;
@@ -28,9 +43,9 @@
gap: 10px;
/* Linux: schmaler Rand links; macOS: Ampel-Platz (Override unten) */
padding: 0 0 0 16px;
background: #181825;
border-bottom: 1px solid #313244;
color: #cdd6f4;
background: var(--surface);
border-bottom: 1px solid var(--line);
color: var(--text);
font:
500 13px/1 -apple-system,
system-ui,
@@ -59,16 +74,23 @@
header .panel-tabs {
margin-left: auto;
}
header .panel-tabs[hidden] {
display: none;
}
/* Ohne Tabs (Panel abgelöst) rückt das Pool-Badge selbst nach rechts. */
header .panel-tabs[hidden] + #pool {
margin-left: auto;
}
.tab-sep {
width: 1px;
height: 16px;
background: #45475a;
background: var(--line-strong);
margin: 0 6px;
align-self: center;
}
#pool {
background: #313244;
color: #a6adc8;
background: var(--line);
color: var(--muted);
border-radius: 999px;
padding: 4px 12px;
font-size: 11px;
@@ -103,14 +125,14 @@
opacity: 0.8;
}
.winbtn:hover {
background: #313244;
background: var(--line);
}
.winbtn:hover svg {
opacity: 1;
}
.winbtn.close:hover {
background: #f38ba8;
color: #11111b;
background: var(--err);
color: var(--tile);
}
/* Resize-Zonen für das dekorationslose Fenster (nur Linux). */
#resize-grips {
@@ -199,7 +221,7 @@
width: 8px;
}
#term .xterm-viewport::-webkit-scrollbar-thumb {
background: #313244;
background: var(--line);
border-radius: 4px;
}
#term .xterm-viewport::-webkit-scrollbar-track {
@@ -210,7 +232,7 @@
flex: none;
width: 5px;
cursor: col-resize;
background: #313244;
background: var(--line);
}
#panel {
flex: none;
@@ -218,8 +240,8 @@
min-width: 0;
display: flex;
flex-direction: column;
background: #181825;
color: #cdd6f4;
background: var(--surface);
color: var(--text);
}
#panel[hidden],
#splitter[hidden] {
@@ -231,7 +253,7 @@
flex-direction: column;
gap: 2px;
padding: 6px 8px 8px 12px;
border-bottom: 1px solid #313244;
border-bottom: 1px solid var(--line);
font:
500 12px/1 -apple-system,
system-ui,
@@ -261,7 +283,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #a6adc8;
color: var(--muted);
}
.panel-title[contenteditable="true"] {
overflow: visible;
@@ -273,7 +295,7 @@
.panel-btn {
border: none;
background: transparent;
color: #a6adc8;
color: var(--muted);
cursor: default;
border-radius: 6px;
padding: 5px 8px;
@@ -282,14 +304,14 @@
align-items: center;
}
.panel-btn:hover {
background: #313244;
color: #cdd6f4;
background: var(--line);
color: var(--text);
}
.panel-btn.copied {
color: #a6e3a1;
color: var(--ok);
}
.panel-btn.error {
color: #f38ba8;
color: var(--err);
}
.panel-btn svg {
display: block;
@@ -300,11 +322,18 @@
stroke-linejoin: round;
}
.panel-btn.active {
background: #313244;
color: #cdd6f4;
background: var(--line);
color: var(--text);
}
/* Aktiver Tab: Akzentfarbe + Unterstrich statt nur Flächenwechsel. */
.panel-tabs .panel-btn.active {
background: transparent;
color: var(--accent);
border-radius: 0;
box-shadow: inset 0 -2px 0 currentColor;
}
.panel-btn.changed {
color: #f9e2af;
color: var(--warn);
}
.panel-editor {
flex: 1;
@@ -331,7 +360,7 @@
-webkit-appearance: none;
margin-right: auto;
background: transparent;
color: #a6adc8;
color: var(--muted);
border: none;
border-radius: 6px;
padding: 6px 9px;
@@ -339,8 +368,8 @@
cursor: default;
}
.panel-lang:hover {
background: #313244;
color: #cdd6f4;
background: var(--line);
color: var(--text);
}
#panel-content {
flex: 1;
@@ -357,7 +386,7 @@
width: 8px;
}
#panel-content::-webkit-scrollbar-thumb {
background: #313244;
background: var(--line);
border-radius: 4px;
}
#panel-content.raw {
@@ -394,12 +423,12 @@
#panel-content.md code {
font-family: "JetBrains Mono", Menlo, monospace;
font-size: 0.9em;
background: #313244;
background: var(--line);
border-radius: 4px;
padding: 1px 5px;
}
#panel-content.md pre {
background: #11111b;
background: var(--tile);
border-radius: 8px;
padding: 12px 14px;
overflow: auto;
@@ -409,12 +438,12 @@
padding: 0;
}
#panel-content.md blockquote {
border-left: 3px solid #313244;
border-left: 3px solid var(--line);
padding-left: 12px;
color: #a6adc8;
color: var(--muted);
}
#panel-content.md a {
color: #89b4fa;
color: var(--accent);
}
.panel-btn[hidden],
.panel-lang[hidden],
@@ -473,6 +502,9 @@
<option value="it">IT</option>
<option value="nl">NL</option>
</select>
<button class="panel-btn draft-only" id="panel-wiki-jump" title="Im Wiki öffnen">
<svg width="14" height="14" viewBox="0 0 16 16"><path d="M8 3.5C6.6 2.4 4.6 2 2.5 2v11c2.1 0 4.1.4 5.5 1.5 1.4-1.1 3.4-1.5 5.5-1.5V2c-2.1 0-4.1.4-5.5 1.5z" /><path d="M8 3.5v11" /></svg>
</button>
<button class="panel-btn draft-only" id="panel-mode" title="Rohtext / gerendert">MD</button>
<button class="panel-btn draft-only" id="panel-content-edit" title="Entwurf bearbeiten (Cmd/Ctrl+Enter speichert, Esc verwirft)">
<svg width="14" height="14" viewBox="0 0 16 16"><path d="M10.8 2.6 13.4 5.2 6 12.6l-3.1.5.5-3.1z" /><path d="M9.7 3.7 12.3 6.3" /></svg>