1fa9ffcf1b
Uebersetzt waren bisher nur die Vue-Fenster; Terminal, Panel und Popup hatten ihre Beschriftungen hart auf Deutsch im Markup und in den Views -- ein englisches UI blieb zur Haelfte deutsch. Die Tabellen ziehen nach messages.ts um, dazu ein Vue-freier t() und ein applyI18n(), das statisches Markup ueber data-i18n-Marker beschriftet. i18n.ts bleibt der vue-i18n-Wrapper fuer die Vue-Fenster. So kommt kein Vue in die Terminal- und Panel-Bundles (Terminal 657,02 -> 657,06 kB). Neue Namensraeume: panel, popup, commands, archiveForm, search, wiki. toLocaleTimeString folgt der Sprache statt fest 'de'. Zwei Funde nebenbei: - window.localStorage wird ueber try/catch gelesen. Gesperrter Storage (privater Modus) wirft schon beim Lesen, und unter Node 22 ueberschattet ein undefiniertes globales localStorage das der Testumgebung. - Die Frontend-Tests liefen unbemerkt gegen happy-doms en-US. test-setup.ts nagelt die Sprache fest. 49 Tests (39 bestehende, 10 neue fuer Tabellen-Paritaet, t() und applyI18n).
445 lines
13 KiB
HTML
445 lines
13 KiB
HTML
<!doctype html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title data-i18n="panel.windowDocument">Dokument</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: var(--bg);
|
|
color: var(--text);
|
|
overflow: hidden;
|
|
}
|
|
body {
|
|
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 var(--line);
|
|
}
|
|
.panel-head {
|
|
flex: none;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 3px;
|
|
padding: 7px 8px 9px 14px;
|
|
background: var(--surface);
|
|
border-bottom: 1px solid var(--line);
|
|
font:
|
|
500 12px/1 -apple-system,
|
|
system-ui,
|
|
sans-serif;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
}
|
|
.panel-titlerow {
|
|
display: flex;
|
|
align-items: center;
|
|
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: var(--surface);
|
|
border-bottom: 1px solid var(--line);
|
|
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: var(--line);
|
|
}
|
|
.winbtn:hover svg {
|
|
opacity: 1;
|
|
}
|
|
.winbtn.close:hover {
|
|
background: var(--err);
|
|
color: var(--tile);
|
|
}
|
|
/* 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: var(--line-strong);
|
|
margin: 0 6px;
|
|
align-self: center;
|
|
}
|
|
.panel-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: 2px;
|
|
}
|
|
.panel-title {
|
|
flex: 0 1 auto;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
color: var(--muted);
|
|
}
|
|
.panel-title[contenteditable="true"] {
|
|
overflow: visible;
|
|
text-overflow: clip;
|
|
outline: none;
|
|
color: inherit;
|
|
cursor: text;
|
|
}
|
|
.panel-btn {
|
|
border: none;
|
|
background: transparent;
|
|
color: var(--muted);
|
|
cursor: default;
|
|
border-radius: 6px;
|
|
padding: 6px 9px;
|
|
font: inherit;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
.panel-btn:hover {
|
|
background: var(--line);
|
|
color: var(--text);
|
|
}
|
|
.panel-btn.copied {
|
|
color: var(--ok);
|
|
}
|
|
.panel-btn.error {
|
|
color: var(--err);
|
|
}
|
|
.panel-btn svg {
|
|
display: block;
|
|
stroke: currentColor;
|
|
stroke-width: 1.3;
|
|
fill: none;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round;
|
|
}
|
|
.panel-btn.active {
|
|
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: var(--warn);
|
|
}
|
|
.panel-editor {
|
|
flex: 1;
|
|
min-height: 0;
|
|
resize: none;
|
|
border: none;
|
|
outline: none;
|
|
padding: 16px 20px;
|
|
background: transparent;
|
|
color: inherit;
|
|
font-family: "JetBrains Mono", Menlo, monospace;
|
|
font-size: 12px;
|
|
line-height: 1.55;
|
|
}
|
|
.panel-editor[hidden] {
|
|
display: none;
|
|
}
|
|
.panel-tabs {
|
|
display: flex;
|
|
gap: 2px;
|
|
}
|
|
.panel-lang {
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
margin-right: auto;
|
|
background: transparent;
|
|
color: var(--muted);
|
|
border: none;
|
|
border-radius: 6px;
|
|
padding: 6px 9px;
|
|
font: inherit;
|
|
cursor: default;
|
|
}
|
|
.panel-lang:hover {
|
|
background: var(--line);
|
|
color: var(--text);
|
|
}
|
|
#panel-content {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow: auto;
|
|
padding: 16px 20px;
|
|
user-select: text;
|
|
-webkit-user-select: text;
|
|
cursor: text;
|
|
font-size: 13px;
|
|
line-height: 1.55;
|
|
}
|
|
#panel-content::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
#panel-content::-webkit-scrollbar-thumb {
|
|
background: var(--line);
|
|
border-radius: 4px;
|
|
}
|
|
#panel-content.raw {
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
font-family: "JetBrains Mono", Menlo, monospace;
|
|
font-size: 12px;
|
|
}
|
|
#panel-content.md h1,
|
|
#panel-content.md h2,
|
|
#panel-content.md h3 {
|
|
line-height: 1.25;
|
|
margin: 1em 0 0.4em;
|
|
}
|
|
#panel-content.md h1 {
|
|
font-size: 1.4em;
|
|
}
|
|
#panel-content.md h2 {
|
|
font-size: 1.2em;
|
|
}
|
|
#panel-content.md h3 {
|
|
font-size: 1.05em;
|
|
}
|
|
#panel-content.md :first-child {
|
|
margin-top: 0;
|
|
}
|
|
#panel-content.md p,
|
|
#panel-content.md ul,
|
|
#panel-content.md ol,
|
|
#panel-content.md pre,
|
|
#panel-content.md blockquote {
|
|
margin: 0 0 0.7em;
|
|
}
|
|
#panel-content.md code {
|
|
font-family: "JetBrains Mono", Menlo, monospace;
|
|
font-size: 0.9em;
|
|
background: var(--line);
|
|
border-radius: 4px;
|
|
padding: 1px 5px;
|
|
}
|
|
#panel-content.md pre {
|
|
background: var(--tile);
|
|
border-radius: 8px;
|
|
padding: 12px 14px;
|
|
overflow: auto;
|
|
}
|
|
#panel-content.md pre code {
|
|
background: none;
|
|
padding: 0;
|
|
}
|
|
#panel-content.md blockquote {
|
|
border-left: 3px solid var(--line);
|
|
padding-left: 12px;
|
|
color: var(--muted);
|
|
}
|
|
#panel-content.md a {
|
|
color: var(--accent);
|
|
}
|
|
.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" data-i18n-title="panel.tabCommandsTitle" data-i18n="panel.tabCommands">Befehle</button>
|
|
<span class="tab-sep"></span>
|
|
<button class="panel-btn" data-mode="draft" data-i18n-title="panel.tabDraftTitle" data-i18n="panel.tabDraft">Dokument</button>
|
|
<button class="panel-btn" data-mode="wiki" data-i18n-title="panel.tabWikiTitle" data-i18n="panel.tabWiki">Wiki</button>
|
|
<button class="panel-btn" data-mode="search" data-i18n-title="panel.tabSearchTitle" data-i18n="panel.tabSearch">Suche</button>
|
|
<span class="tab-sep"></span>
|
|
</div>
|
|
<button class="winbtn" id="panel-dock" data-i18n-title="panel.dock">
|
|
<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" data-i18n-aria="panel.minimize">
|
|
<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" data-i18n-aria="panel.maximize">
|
|
<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" data-i18n-title="panel.closePanel">
|
|
<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" data-i18n="panel.tabDraft">Dokument</span>
|
|
<button class="panel-btn panel-edit draft-only" id="panel-title-edit" data-i18n-title="panel.editTitle">✎</button>
|
|
</div>
|
|
<div class="panel-actions">
|
|
<select class="panel-lang draft-only" id="panel-lang" data-i18n-title="panel.spellcheckLang">
|
|
<option value="de">DE</option>
|
|
<option value="en">EN</option>
|
|
<option value="en-GB">EN-GB</option>
|
|
<option value="fr">FR</option>
|
|
<option value="es">ES</option>
|
|
<option value="it">IT</option>
|
|
<option value="nl">NL</option>
|
|
</select>
|
|
<button class="panel-btn draft-only" id="panel-wiki-jump" data-i18n-title="panel.openInWiki">
|
|
<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" data-i18n-title="panel.toggleRaw" data-i18n="panel.rendered">MD</button>
|
|
<button class="panel-btn draft-only" id="panel-content-edit" data-i18n-title="panel.editDraft">
|
|
<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 draft-only" id="panel-copy" data-i18n-title="panel.copy">
|
|
<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 draft-only" id="panel-archive" data-i18n-title="panel.archive">
|
|
<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>
|
|
</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>
|