fix(header): full redesign — left-aligned title, uniform buttons, update badge
- Title always left-aligned (was centered via 3-col flex trick) - In kiosk mode: exit/refresh buttons appear left of title via header-left - All action buttons unified as .header-btn (42×42px, consistent style) - Scan button: 48×48px + pulse animation to stand out from others - Gemini button: no longer misuses header-scan-btn class; own indigo tint - Scale status: same 42×42px .header-btn shape with colored .scale-dot inside instead of a tiny 22px standalone circle - Update notification: uses #header-update-badge beside the title instead of replacing title innerHTML (title never disappears anymore) - Fixed _scaleUpdateStatus() to preserve header-btn class on className reset
This commit is contained in:
+20
-5
@@ -61,14 +61,29 @@
|
||||
<!-- Top Header -->
|
||||
<header class="app-header">
|
||||
<div class="header-content">
|
||||
<!-- Kiosk buttons (exit / refresh) — injected here by _injectKioskOverlay() -->
|
||||
<div class="header-left" id="header-left"></div>
|
||||
<h1 class="header-title" onclick="showPage('dashboard')"><span data-i18n="nav.title">🏠 EverShelf</span><span class="header-version">v1.6.0</span></h1>
|
||||
|
||||
<!-- Title — left-aligned; grows to fill space -->
|
||||
<div class="header-title-wrap">
|
||||
<h1 class="header-title" onclick="showPage('dashboard')">
|
||||
<span data-i18n="nav.title">🏠 EverShelf</span><span class="header-version">v1.6.0</span>
|
||||
</h1>
|
||||
<!-- Update badge — shown alongside title, never replaces it -->
|
||||
<span class="header-update-badge" id="header-update-badge" style="display:none"></span>
|
||||
</div>
|
||||
|
||||
<!-- Actions — fixed set of icon buttons, all same size -->
|
||||
<div class="header-actions">
|
||||
<span id="scale-status-indicator" class="scale-status-indicator scale-status-disconnected" style="display:none" data-i18n-title="scale.status_disconnected" title="⚖️ Bilancia">⚖️</span>
|
||||
<button class="header-scan-btn header-gemini-btn" onclick="showPage('chat')" title="Chat con Gemini" data-i18n-title="chat.title">
|
||||
<svg class="gemini-icon" viewBox="0 0 24 24" width="28" height="28" fill="white"><path d="M12 0C12 6.627 6.627 12 0 12c6.627 0 12 5.373 12 12 0-6.627 5.373-12 12-12-6.627 0-12-5.373-12-12z"/></svg>
|
||||
<button id="scale-status-indicator" class="header-btn scale-status-indicator scale-status-disconnected"
|
||||
style="display:none" data-i18n-title="scale.status_disconnected" title="⚖️ Bilancia">
|
||||
<span class="scale-dot"></span>
|
||||
</button>
|
||||
<button class="header-scan-btn" id="btn-header-scan" title="Scansiona prodotto (tieni premuto per modalità spesa)" data-i18n-title="scan.hint">
|
||||
<button class="header-btn header-gemini-btn" onclick="showPage('chat')" title="Chat con Gemini" data-i18n-title="chat.title">
|
||||
<svg class="gemini-icon" viewBox="0 0 24 24" width="24" height="24" fill="white"><path d="M12 0C12 6.627 6.627 12 0 12c6.627 0 12 5.373 12 12 0-6.627 5.373-12 12-12-6.627 0-12-5.373-12-12z"/></svg>
|
||||
</button>
|
||||
<button class="header-btn header-scan-btn" id="btn-header-scan"
|
||||
title="Scansiona prodotto (tieni premuto per modalità spesa)" data-i18n-title="scan.hint">
|
||||
📷
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user