diff --git a/panel.html b/panel.html index ca83ef5..7d2d3dc 100644 --- a/panel.html +++ b/panel.html @@ -16,6 +16,11 @@ display: flex; flex-direction: column; } + /* Feiner Fensterrahmen fürs dekorationslose Fenster (nur Linux). */ + :root[data-platform="other"] body { + box-sizing: border-box; + border: 1px solid #313244; + } .panel-head { flex: none; display: flex; diff --git a/src/panel.ts b/src/panel.ts index 397a1c9..3efbcc1 100644 --- a/src/panel.ts +++ b/src/panel.ts @@ -43,6 +43,7 @@ const picked = THEMES[projects.find((p) => p.name === project)?.terminal.theme ? document.documentElement.style.background = picked.header; document.body.style.background = picked.header; document.body.style.color = picked.xterm.foreground; +document.body.style.borderColor = picked.border; const topbar = document.querySelector(".panel-topbar") as HTMLElement; topbar.style.background = picked.header; topbar.style.borderBottomColor = picked.border; diff --git a/src/search-view.ts b/src/search-view.ts index 3cd242f..d65f89e 100644 --- a/src/search-view.ts +++ b/src/search-view.ts @@ -34,9 +34,23 @@ export function initSearchView( bar.className = "hit-search"; const input = document.createElement("input"); input.type = "search"; - input.placeholder = "Archiv durchsuchen — Enter startet"; + input.placeholder = "Archiv durchsuchen"; + // Live-Suche ab 3 Zeichen, entprellt (300 ms Debounce); endet die Eingabe + // mitten im Wort, wird das letzte Wort als Präfix gesucht (arch → arch*). + // Enter sucht sofort und wörtlich — für exakte FTS-Syntax (Phrasen, OR/NOT). + let pending: number | undefined; + input.addEventListener("input", () => { + clearTimeout(pending); + const q = input.value.trim(); + if (q.length < 3) return; + const live = /[\p{L}\p{N}]$/u.test(q) ? `${q}*` : q; + pending = window.setTimeout(() => onSearch(live), 300); + }); input.addEventListener("keydown", (e) => { - if (e.key === "Enter" && input.value.trim()) onSearch(input.value.trim()); + if (e.key === "Enter" && input.value.trim()) { + clearTimeout(pending); + onSearch(input.value.trim()); + } }); bar.append(input); const results = document.createElement("div"); diff --git a/src/terminal.ts b/src/terminal.ts index 3bdfa55..9988f8f 100644 --- a/src/terminal.ts +++ b/src/terminal.ts @@ -93,6 +93,7 @@ const theme = picked.xterm; // Seitenfarben ans Theme anpassen (Defaults in terminal.html sind Mocha). document.documentElement.style.background = theme.background; document.body.style.background = theme.background; +document.body.style.borderColor = picked.border; const header = document.querySelector("header") as HTMLElement; header.style.background = picked.header; header.style.borderBottomColor = picked.border; diff --git a/terminal.html b/terminal.html index f068388..14abc31 100644 --- a/terminal.html +++ b/terminal.html @@ -15,6 +15,11 @@ display: flex; flex-direction: column; } + /* Feiner Fensterrahmen fürs dekorationslose Fenster (nur Linux). */ + :root[data-platform="other"] body { + box-sizing: border-box; + border: 1px solid #313244; + } header { height: 40px; flex: none;