fix: keep active page on config save, add Cyrillic preview support, fix grid sizing

- daemon.go: save/restore active page on config reload instead of
  always activating default_page (fixes page switch on save)
- render.go: replace basicfont.Face7x13 with parseDisplayFace() for
  unicode/Cyrillic support in edit key preview
- web.go: add SSE endpoint (GET /api/events) for real-time page_changed
  events and POST /api/activate-page API
- app.js: persist active page via localStorage, listen for SSE
  page_changed events
- styles.css, index.html: fix grid sizing (width 100%, minmax(0, 1fr),
  aspect-ratio on key buttons, max-width 525px)
This commit is contained in:
totmin
2026-06-17 10:48:31 +07:00
parent f6f3950d28
commit 5bf8f5d3b0
6 changed files with 195 additions and 20 deletions
+6 -2
View File
@@ -112,6 +112,9 @@ main {
background: var(--surface);
border-radius: var(--radius);
border: 1px solid var(--border);
width: 100%;
max-width: 525px;
contain: layout style;
}
.deck-selector {
@@ -155,6 +158,8 @@ main {
align-items: center;
justify-content: center;
width: 100%;
min-width: 0;
min-height: 0;
}
.key-btn:hover {
@@ -169,11 +174,10 @@ main {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: inherit;
}
.key-btn.empty {
opacity: 0.3;
border-color: var(--border-light);
}
.key-btn.empty:hover {
opacity: 0.5;