fix: kiosk overlay, preferred use-location, scale reconnect, Bring! translation, smart cache invalidation

- Kiosk: replace header-inject overlay with position:fixed div appended to <html>
  so buttons appear regardless of SPA init timing
- Kiosk: bump versionCode 3→4, versionName 1.2.0→1.3.0
- Kiosk: add explicit signingConfigs block (debug keystore) to avoid signature
  mismatch on updates; update banner now shows uninstall instruction + 12s timeout
- Web: v1.4.0 → v1.5.0
- Preferred use-location: remember last N location choices per product; after 3+
  consistent picks auto-select and collapse location picker (with 'cambia' link)
- Scale: call updateScaleReadButtons() on every status change so live-box and
  read button appear instantly on reconnect without manual refresh
- Smart shopping cache: invalidate JSON cache file on every inventory_add and
  inventory_use so next shopping-page load always sees current stock
- isLowStock: conf threshold changed <= 1 → < 1 (1 full pack is not low stock)
- italianToBring: replace substring matching with whole-word matching (min 4 chars)
  to prevent 'gin' matching 'original', 'rum' matching 'crumble', etc.
  Philadelphia original was silently mapped to Gin and skipped as duplicate
- Storico: add undo support (transaction_undo endpoint, undone column, JS undo btn)
- LOG → Storico rename in UI, nav, translations
- Bring! sync: urgency-aware purchased blocklist TTL (critical 30m, high 90m, others 4h)
- forceSyncBring() button to clear all guards and re-sync from scratch
- Scale live-box: position:fixed CSS class, 1.6rem/800 value, direct ml display
- Recipe use modal: scale live-box with 10s stability + 5s auto-confirm countdown
- Recipe use modal: show recipe quantity as highlighted row in Usa popup
This commit is contained in:
dadaloop82
2026-04-18 18:50:15 +00:00
parent 9e2a24def4
commit 07bdfe6b87
9 changed files with 617 additions and 97 deletions
+87 -2
View File
@@ -853,8 +853,8 @@ body {
min-width: 0;
}
.scale-live-val {
font-size: 1.15rem;
font-weight: 700;
font-size: 1.6rem;
font-weight: 800;
color: var(--text);
line-height: 1.2;
}
@@ -2895,6 +2895,37 @@ body {
text-underline-offset: 2px;
}
/* ── Preferred use-location (collapsed row) ── */
.pref-loc-info {
display: flex;
align-items: center;
gap: 10px;
padding: 6px 10px;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 10px;
}
.pref-loc-name {
font-size: 0.95rem;
font-weight: 600;
color: var(--text);
}
.btn-link {
background: none;
border: none;
color: var(--accent);
font-size: 0.82rem;
cursor: pointer;
padding: 2px 6px;
text-decoration: underline;
text-underline-offset: 2px;
}
.pref-loc-full-btns {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
/* ===== PRODUCT DETAILS CARD (Action Page) ===== */
.product-details-card {
background: var(--bg-card);
@@ -3855,6 +3886,43 @@ body {
background: rgba(52, 120, 246, 0.06);
}
.log-entry.log-undone {
opacity: 0.45;
filter: grayscale(60%);
text-decoration: line-through;
}
.log-undone-badge {
display: inline-block;
font-size: 0.68rem;
font-weight: 600;
color: #fff;
background: var(--text-muted);
border-radius: 4px;
padding: 1px 5px;
text-decoration: none;
vertical-align: middle;
margin-left: 4px;
}
.btn-log-undo {
flex-shrink: 0;
background: none;
border: 1px solid var(--border);
color: var(--text-muted);
border-radius: 6px;
padding: 3px 8px;
font-size: 0.85rem;
cursor: pointer;
line-height: 1.4;
transition: background 0.15s, color 0.15s;
}
.btn-log-undo:hover {
background: rgba(255,255,255,0.08);
color: var(--text);
}
.log-icon {
font-size: 1.2rem;
flex-shrink: 0;
@@ -4186,6 +4254,23 @@ body {
display: none;
}
/* Sub-type grid for dolce/succo */
.recipe-subtype-grid {
margin-top: 8px;
grid-template-columns: 1fr 1fr;
animation: bannerSlideIn 0.25s ease-out;
}
.recipe-subtype-chip {
font-size: 0.75rem;
padding: 8px 6px;
background: #fef9ef;
border-color: #f0e4cc;
}
.recipe-subtype-chip:has(input:checked) {
background: #fff3d4;
border-color: #e6a817;
}
/* ===== LARGER PRODUCT PREVIEW (Action page) ===== */
.product-preview-large {
flex-direction: column;