Add git version control panel and LAN hosting support

- Git modal (⎇ Git button): commit all diagrams as JSON to diagrams/ folder,
  push to remote, view history, restore any diagram from any past commit
- Diagrams exported to diagrams/{id}_{name}.json on each commit so diffs are
  human-readable and individual diagrams can be restored independently
- backend/run.py: changed host to 0.0.0.0 for LAN access

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-24 19:48:29 -04:00
parent e4a80dc0e6
commit 01e7b5630b
7 changed files with 450 additions and 2 deletions
+29
View File
@@ -304,6 +304,35 @@ button:active { background: #1a1a3a; }
.drc-row:last-child { border-bottom: none; }
.drc-none { color: #444466; font-style: italic; }
/* ── Git modal ────────────────────────────────────────────────────────────── */
.git-badge {
font-size: 11px; padding: 2px 8px; border-radius: 10px;
background: #1a1a30; color: #8899bb; border: 1px solid #2a2a44;
}
.git-badge.git-clean { color: #88cc88; border-color: #336633; }
.git-badge.git-dirty { color: #ddaa44; border-color: #554422; }
.git-section { display: flex; flex-direction: column; gap: 5px; }
.git-section-title {
font-size: 10px; font-weight: 600; text-transform: uppercase;
letter-spacing: .06em; color: #555577;
}
.git-log-row {
display: grid; grid-template-columns: 52px 1fr 80px auto;
align-items: center; gap: 8px;
padding: 4px 6px; border-radius: 3px; background: #0d0d20;
border: 1px solid transparent;
}
.git-log-row:hover { border-color: #2a2a44; }
.git-hash { font-family: monospace; color: #6688cc; font-size: 11px; }
.git-msg { color: #bbc; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.git-date { color: #445; font-size: 10px; text-align: right; }
.git-restore-btn {
font-size: 10px; padding: 2px 6px;
background: #1a2840; border: 1px solid #334466; border-radius: 3px;
color: #88aadd; cursor: pointer; white-space: nowrap;
}
.git-restore-btn:hover { background: #223355; color: #aaccff; }
.cm-label {
display: block; font-size: 10px; font-weight: 600; text-transform: uppercase;
letter-spacing: .06em; color: #555577; margin-bottom: 4px;