From 6a0d30c8b515219c7eff97a45b4718d2bb135aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Sun, 14 Jun 2026 22:55:15 +0200 Subject: [PATCH 1/2] add svg favicon + toolbar logo; set theme before paint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - favicon.svg (beer mug), linked from both entry points and shown in the tablet topbar next to the bar name - inline data-theme in kills the flash of dark on light-mode load - hide the "Pfand zurück" tile when the bar has no Pfand --- client/admin.html | 8 ++++++++ client/index.html | 8 ++++++++ client/public/favicon.svg | 14 ++++++++++++++ client/src/styles.css | 5 ++++- client/src/tablet/Sale.tsx | 15 ++++++++++----- 5 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 client/public/favicon.svg diff --git a/client/admin.html b/client/admin.html index aa42195..3d58c4b 100644 --- a/client/admin.html +++ b/client/admin.html @@ -4,6 +4,14 @@ wutzcalc — Backoffice + + diff --git a/client/index.html b/client/index.html index 8a7e6af..d375e0a 100644 --- a/client/index.html +++ b/client/index.html @@ -4,6 +4,14 @@ wutzcalc + + diff --git a/client/public/favicon.svg b/client/public/favicon.svg new file mode 100644 index 0000000..63774fe --- /dev/null +++ b/client/public/favicon.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/client/src/styles.css b/client/src/styles.css index 6686b87..c3fc15a 100644 --- a/client/src/styles.css +++ b/client/src/styles.css @@ -49,6 +49,7 @@ button { } button:active { background: var(--surface-3); } button:disabled { opacity: 0.4; } +button.danger { background: #5a2a2a; border-color: #7a3a3a; color: #fff; } /* ---------- Tablet UI (portrait) ---------- */ @@ -92,6 +93,8 @@ button:disabled { opacity: 0.4; } border-bottom: 1px solid var(--border-soft); flex: 0 0 auto; } +.topbar .brand { display: flex; align-items: center; gap: 10px; min-width: 0; } +.topbar .logo { flex: 0 0 auto; } .topbar .bar-name { font-size: 26px; font-weight: 800; } .topbar .change { font-size: 17px; padding: 10px 14px; } @@ -213,7 +216,7 @@ button:disabled { opacity: 0.4; } cursor: grab; } .dnd-item:active { cursor: grabbing; } -.dnd-item.drop-target { border-color: #6aa; background: #1a2630; } +.dnd-item.drop-target { border-color: #6aa; background: var(--surface-2); } .dnd-item .grip { opacity: 0.4; cursor: grab; user-select: none; } .dnd-item .dnd-name { flex: 1; } .dnd-list li.muted { padding: 6px 8px; } diff --git a/client/src/tablet/Sale.tsx b/client/src/tablet/Sale.tsx index 8c5d6dd..258483f 100644 --- a/client/src/tablet/Sale.tsx +++ b/client/src/tablet/Sale.tsx @@ -78,7 +78,10 @@ export function Sale({ config, onChangeBar }: Props) { return (
-
{bar.name}
+
+ + {bar.name} +
@@ -92,10 +95,12 @@ export function Sale({ config, onChangeBar }: Props) { )} ))} - + {bar.pfand_cents > 0 && ( + + )}
From cca3077b7a03d4b88e91ebd7144b14e4298cdf34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Sun, 14 Jun 2026 22:55:29 +0200 Subject: [PATCH 2/2] review fixes: light-mode contrast, tz robustness, deploy copy - admin: maroon buttons use .danger class (white text); replace hardcoded #333/#ff8a8a/drop-target colors with theme vars so light mode is legible - time.ts: force hourCycle h23 (no 24:00 artifact), drop dead 24-guard - Makefile/README: rsync with excludes instead of `cp -a .` so .git and the dev DB don't ship to /opt; add rsync to deps --- Makefile | 11 ++++++++--- README.md | 2 +- client/src/admin/Admin.tsx | 10 +++++----- server/src/time.ts | 4 ++-- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index fe84387..8bfbc94 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ build: ## deps: install Node.js, pnpm and native-module build tools (Fedora) deps: require-root - dnf install -y nodejs gcc-c++ make python3 + dnf install -y nodejs gcc-c++ make python3 rsync corepack enable ## install: full production install on a fresh checkout (Fedora) @@ -41,9 +41,14 @@ service: require-root # Dedicated system user (no login, no home). id -u $(SERVICE_USER) >/dev/null 2>&1 || \ useradd --system --no-create-home --shell /usr/sbin/nologin $(SERVICE_USER) - # Copy the whole tree so pnpm's symlinked node_modules stay intact. + # Copy the tree (preserving pnpm's symlinked node_modules) but leave behind + # the repo metadata, local dev database, and editor/nix cruft. mkdir -p $(PREFIX) - cp -a . $(PREFIX)/ + rsync -a --delete \ + --exclude='.git' --exclude='.direnv' --exclude='.env' \ + --exclude='*.db' --exclude='*.db-wal' --exclude='*.db-shm' \ + --exclude='$(PREFIX)' \ + ./ $(PREFIX)/ # Config + secrets — never clobber an existing env file. mkdir -p $(CONFDIR) test -f $(CONFDIR)/wutzcalc.env || \ diff --git a/README.md b/README.md index a21460a..77a4d39 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ sudo useradd --system --no-create-home --shell /usr/sbin/nologin wutzcalc # 2. Install the built app (run `pnpm install && pnpm build` first) sudo mkdir -p /opt/wutzcalc -sudo cp -a . /opt/wutzcalc # or rsync/checkout into place +sudo rsync -a --exclude='.git' --exclude='*.db*' ./ /opt/wutzcalc/ sudo chown -R root:root /opt/wutzcalc # app dir stays read-only to the service # 3. Config + secrets (chmod 600 — holds ADMIN_PASSWORD) diff --git a/client/src/admin/Admin.tsx b/client/src/admin/Admin.tsx index 81884d3..40dc8b8 100644 --- a/client/src/admin/Admin.tsx +++ b/client/src/admin/Admin.tsx @@ -62,7 +62,7 @@ function Login({ onAuthed }: { onAuthed: () => void }) { value={pw} onInput={(e: any) => setPw(e.currentTarget.value)} /> - {err &&
{err}
} + {err &&
{err}
}
@@ -107,7 +107,7 @@ function Stats() { <>

Umsatz nach Tagen

- +
@@ -227,7 +227,7 @@ function Drinks() { - + @@ -377,7 +377,7 @@ function Bars() { <>

Bars

{bars.map(b => ( -
+
- +
= {}; for (const p of fmt.formatToParts(d)) { @@ -49,7 +49,7 @@ function localParts(d: Date, tz: string = TZ): LocalParts { year: Number(parts.year), month: Number(parts.month), day: Number(parts.day), - hour: Number(parts.hour === '24' ? '0' : parts.hour), + hour: Number(parts.hour), minute: Number(parts.minute), second: Number(parts.second), };
TagTransaktionenBezahltCrew-TransaktionenPfand zurück