Files
ai-control/panel.html
T
marcus.hinz e2e9992b1c Panel: Entwürfe archivieren, Titel aus Überschrift, Titel-Edit
- Archiv pro Projekt: Panel-Button „Archivieren" und MCP-Tool archive_panel
  legen den Entwurf als <YYYY-MM-DD_HHMM>-<slug>.md mit Frontmatter im
  Archiv-Ordner ab. Ordner in ai-control.json (archiveDir) + als
  additionalDirectories/Edit in .claude/settings.json (scanbar). Kein Ordner:
  Panel öffnet Ordner-Dialog, Zuruf nutzt Argument dir.
- Panel-Titel zeigt die erste Überschrift des Entwurfs (Inline-Markdown
  gestrippt), Fallback „Entwurf"; Bleistift-Button macht ihn editierbar,
  schreibt die Überschrift via panel_set zurück.
- Panel-Kopf zweizeilig: Titel + Edit oben, Aktionen rechtsbündig darunter.
- AI_CONTROL_PROJECT als PTY-Env für den MCP-Server.
2026-07-11 13:40:17 +02:00

172 lines
4.4 KiB
HTML

<!doctype html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<title>Entwurf</title>
<style>
html,
body {
height: 100%;
margin: 0;
background: #1e1e2e;
color: #cdd6f4;
overflow: hidden;
}
body {
display: flex;
flex-direction: column;
}
.panel-head {
flex: none;
display: flex;
flex-direction: column;
gap: 3px;
padding: 7px 8px 9px 14px;
background: #181825;
border-bottom: 1px solid #313244;
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;
}
.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: #a6adc8;
}
.panel-title[contenteditable="true"] {
overflow: visible;
text-overflow: clip;
outline: none;
color: inherit;
cursor: text;
}
.panel-btn {
border: none;
background: transparent;
color: #a6adc8;
cursor: default;
border-radius: 6px;
padding: 6px 9px;
font: inherit;
display: flex;
align-items: center;
}
.panel-btn:hover {
background: #313244;
color: #cdd6f4;
}
.panel-btn.copied {
color: #a6e3a1;
}
#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: #313244;
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: #313244;
border-radius: 4px;
padding: 1px 5px;
}
#panel-content.md pre {
background: #11111b;
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 #313244;
padding-left: 12px;
color: #a6adc8;
}
#panel-content.md a {
color: #89b4fa;
}
</style>
</head>
<body>
<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>
</div>
<div class="panel-actions">
<button class="panel-btn" id="panel-mode" title="Rohtext / gerendert">MD</button>
<button class="panel-btn" id="panel-copy" title="In die Zwischenablage">Kopieren</button>
<button class="panel-btn" id="panel-archive" title="In den Archiv-Ordner speichern">Archivieren</button>
<button class="panel-btn" id="panel-dock" title="Wieder andocken">Andocken</button>
</div>
</div>
<div id="panel-content" class="md"></div>
<script type="module" src="/src/panel.ts"></script>
</body>
</html>