Archiv-Wiki im Panel: vier Tabs, FTS5-Suche, strukturierbares Archiv
- Archiv-Home pro Projekt (archiveHome in ai-control.json); archive_panel mit Ordner, Beschreibung und Schlagwörtern (Frontmatter + Zeitstempel-Stem) - Archiv-Index (archive_index.rs): Scan mit Frontmatter, Wikilinks, Backlinks; Wiki-Seiten als strukturierte Daten (Übersicht/Tag-Seiten) - FTS5-Suche (archive_search.rs, rusqlite bundled): in-memory-Index pro Anfrage; MCP search_archive und Panel-Suchfeld (search_run) teilen die Engine - Panel: vier Puffer/Ansichten (Dokument, Befehle, Suche, Wiki) mit Tabs im Fenster-Header; gemeinsame Verdrahtung panel-wiring.ts, Kachel-CSS, Wiki-View mit Tag-Chips, Ordner-Sektionen und Backlinks - Archivieren speichert offene Bearbeitung (flush); Tab-Wechsel speichert statt zu blockieren; Fehler sichtbar als Panel-Toast - Abgelöstes Fenster: rahmenlos (Linux), eigene Kopfleiste mit Tabs und Fensterknöpfen, Theme-Kopplung über gemeinsames themes.ts - MCP-Tools show_commands, show_archive; Befehls-History mit Kachel-Löschen
This commit is contained in:
+194
-17
@@ -2,7 +2,7 @@
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Entwurf</title>
|
||||
<title>Dokument</title>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
@@ -37,6 +37,140 @@
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
}
|
||||
/* Kopfzeile wie der Terminal-Header: eigene Leiste voller Höhe mit
|
||||
Tabs rechtsbündig vor den Fensterknöpfen (Andocken/Schließen). */
|
||||
.panel-topbar {
|
||||
height: 40px;
|
||||
flex: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 14px;
|
||||
background: #181825;
|
||||
border-bottom: 1px solid #313244;
|
||||
font:
|
||||
500 13px/1 -apple-system,
|
||||
system-ui,
|
||||
sans-serif;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
cursor: default;
|
||||
}
|
||||
.panel-topbar .panel-tabs {
|
||||
margin-left: auto;
|
||||
}
|
||||
/* Fensterknöpfe rechts, volle Header-Höhe — wie im Terminal-Fenster. */
|
||||
.winbtn {
|
||||
width: 44px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
cursor: default;
|
||||
transition: background 0.12s ease;
|
||||
}
|
||||
.winbtn svg {
|
||||
stroke: currentColor;
|
||||
stroke-width: 1.2;
|
||||
fill: none;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
opacity: 0.8;
|
||||
}
|
||||
.winbtn:hover {
|
||||
background: #313244;
|
||||
}
|
||||
.winbtn:hover svg {
|
||||
opacity: 1;
|
||||
}
|
||||
.winbtn.close:hover {
|
||||
background: #f38ba8;
|
||||
color: #11111b;
|
||||
}
|
||||
/* macOS hat native Fensterknöpfe — eigene Min/Max dort ausblenden. */
|
||||
:root[data-platform="mac"] .winbtn.osctl {
|
||||
display: none;
|
||||
}
|
||||
/* Resize-Zonen für das dekorationslose Fenster (nur Linux). */
|
||||
#resize-grips {
|
||||
display: none;
|
||||
}
|
||||
:root[data-platform="other"] #resize-grips {
|
||||
display: block;
|
||||
}
|
||||
.grip {
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
}
|
||||
.grip.n {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 4px;
|
||||
cursor: ns-resize;
|
||||
}
|
||||
.grip.s {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 4px;
|
||||
cursor: ns-resize;
|
||||
}
|
||||
.grip.w {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 4px;
|
||||
cursor: ew-resize;
|
||||
}
|
||||
.grip.e {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 4px;
|
||||
cursor: ew-resize;
|
||||
}
|
||||
.grip.nw {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
cursor: nwse-resize;
|
||||
z-index: 101;
|
||||
}
|
||||
.grip.ne {
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
cursor: nesw-resize;
|
||||
z-index: 101;
|
||||
}
|
||||
.grip.sw {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
cursor: nesw-resize;
|
||||
z-index: 101;
|
||||
}
|
||||
.grip.se {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
cursor: nwse-resize;
|
||||
z-index: 101;
|
||||
}
|
||||
.tab-sep {
|
||||
width: 1px;
|
||||
height: 16px;
|
||||
background: #45475a;
|
||||
margin: 0 6px;
|
||||
align-self: center;
|
||||
}
|
||||
.panel-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -110,17 +244,26 @@
|
||||
.panel-editor[hidden] {
|
||||
display: none;
|
||||
}
|
||||
.panel-tabs {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
}
|
||||
.panel-lang {
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
margin-right: auto;
|
||||
background: #313244;
|
||||
background: transparent;
|
||||
color: #a6adc8;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
padding: 3px 4px;
|
||||
padding: 6px 9px;
|
||||
font: inherit;
|
||||
font-size: 11px;
|
||||
cursor: default;
|
||||
}
|
||||
.panel-lang:hover {
|
||||
background: #313244;
|
||||
color: #cdd6f4;
|
||||
}
|
||||
#panel-content {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
@@ -195,16 +338,43 @@
|
||||
#panel-content.md a {
|
||||
color: #89b4fa;
|
||||
}
|
||||
.panel-btn[hidden],
|
||||
.panel-lang[hidden],
|
||||
#panel-content[hidden] {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="panel-topbar" data-tauri-drag-region>
|
||||
<div class="panel-tabs" id="panel-tabs">
|
||||
<button class="panel-btn" data-mode="commands" title="Befehls-History">Befehle</button>
|
||||
<span class="tab-sep"></span>
|
||||
<button class="panel-btn" data-mode="draft" title="Dokument">Dokument</button>
|
||||
<button class="panel-btn" data-mode="wiki" title="Archiv-Wiki">Wiki</button>
|
||||
<button class="panel-btn" data-mode="search" title="Suchtreffer">Suche</button>
|
||||
<span class="tab-sep"></span>
|
||||
</div>
|
||||
<button class="winbtn" id="panel-dock" title="Wieder andocken">
|
||||
<svg width="14" height="14" viewBox="0 0 16 16"><rect x="1.5" y="2.5" width="13" height="11" rx="1.5" /><path d="M9.5 2.5v11" /><path d="M4 8h3.4M6 6.2 7.8 8 6 9.8" /></svg>
|
||||
</button>
|
||||
<button class="winbtn osctl" id="win-min" aria-label="Minimieren">
|
||||
<svg width="12" height="12" viewBox="0 0 12 12"><line x1="2" y1="6.5" x2="10" y2="6.5" /></svg>
|
||||
</button>
|
||||
<button class="winbtn osctl" id="win-max" aria-label="Maximieren">
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none"><rect x="2.5" y="2.5" width="7" height="7" rx="1" /></svg>
|
||||
</button>
|
||||
<button class="winbtn close" id="panel-close" title="Panel schließen">
|
||||
<svg width="12" height="12" viewBox="0 0 12 12"><path d="M3 3l6 6M9 3l-6 6" /></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="panel-head">
|
||||
<div class="panel-titlerow" data-tauri-drag-region>
|
||||
<span class="panel-title">Entwurf</span>
|
||||
<button class="panel-btn panel-edit" id="panel-title-edit" title="Titel bearbeiten">✎</button>
|
||||
<span class="panel-title">Dokument</span>
|
||||
<button class="panel-btn panel-edit draft-only" id="panel-title-edit" title="Titel bearbeiten">✎</button>
|
||||
</div>
|
||||
<div class="panel-actions">
|
||||
<select class="panel-lang" id="panel-lang" title="Sprache der Rechtschreibprüfung">
|
||||
<select class="panel-lang draft-only" id="panel-lang" title="Sprache der Rechtschreibprüfung">
|
||||
<option value="de">DE</option>
|
||||
<option value="en">EN</option>
|
||||
<option value="en-GB">EN-GB</option>
|
||||
@@ -213,25 +383,32 @@
|
||||
<option value="it">IT</option>
|
||||
<option value="nl">NL</option>
|
||||
</select>
|
||||
<button class="panel-btn" id="panel-mode" title="Rohtext / gerendert">MD</button>
|
||||
<button class="panel-btn" id="panel-content-edit" title="Entwurf bearbeiten (Cmd/Ctrl+Enter speichert, Esc verwirft)">
|
||||
<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>
|
||||
</button>
|
||||
<button class="panel-btn" id="panel-copy" title="In die Zwischenablage kopieren">
|
||||
<button class="panel-btn draft-only" id="panel-copy" title="In die Zwischenablage kopieren">
|
||||
<svg width="14" height="14" viewBox="0 0 16 16"><rect x="5.5" y="5.5" width="8" height="8" rx="1.5" /><path d="M10.5 3.2V3A1.5 1.5 0 0 0 9 1.5H3A1.5 1.5 0 0 0 1.5 3v6A1.5 1.5 0 0 0 3 10.5h.2" /></svg>
|
||||
</button>
|
||||
<button class="panel-btn" id="panel-archive" title="In den Archiv-Ordner speichern">
|
||||
<button class="panel-btn draft-only" id="panel-archive" title="In den Archiv-Ordner speichern">
|
||||
<svg width="14" height="14" viewBox="0 0 16 16"><rect x="1.5" y="2.5" width="13" height="3.5" rx="1" /><path d="M2.8 6v6.5a1 1 0 0 0 1 1h8.4a1 1 0 0 0 1-1V6" /><path d="M6.3 9h3.4" /></svg>
|
||||
</button>
|
||||
<button class="panel-btn" id="panel-dock" title="Wieder andocken">
|
||||
<svg width="14" height="14" viewBox="0 0 16 16"><rect x="1.5" y="2.5" width="13" height="11" rx="1.5" /><path d="M9.5 2.5v11" /><path d="M4 8h3.4M6 6.2 7.8 8 6 9.8" /></svg>
|
||||
</button>
|
||||
<button class="panel-btn" id="panel-close" title="Panel schließen">
|
||||
<svg width="12" height="12" viewBox="0 0 12 12"><path d="M3 3l6 6M9 3l-6 6" /></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="panel-content" class="md"></div>
|
||||
<div id="commands-content" hidden></div>
|
||||
<div id="search-content" hidden></div>
|
||||
<div id="wiki-content" hidden></div>
|
||||
<div id="resize-grips" aria-hidden="true">
|
||||
<div class="grip n" data-dir="North"></div>
|
||||
<div class="grip s" data-dir="South"></div>
|
||||
<div class="grip w" data-dir="West"></div>
|
||||
<div class="grip e" data-dir="East"></div>
|
||||
<div class="grip nw" data-dir="NorthWest"></div>
|
||||
<div class="grip ne" data-dir="NorthEast"></div>
|
||||
<div class="grip sw" data-dir="SouthWest"></div>
|
||||
<div class="grip se" data-dir="SouthEast"></div>
|
||||
</div>
|
||||
<script type="module" src="/src/panel.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user