Show offline mode UI: hide online-only nav items, show offline label
When offline, hide Files and Admin from the bottom nav and display "Offline Mode" next to the status dot. The SW offline fallback page also only shows Capture and Queue nav items. Online-only pages (browser, admin, reviewer) are never cached and go straight to the offline fallback when the network is unavailable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
<h1 class="app-title">NextSnap</h1>
|
||||
<div class="top-bar-indicators">
|
||||
<div class="connectivity-indicator online" title="Online"></div>
|
||||
<span class="offline-label" id="offlineLabel" style="display:none">Offline Mode</span>
|
||||
<div class="pending-count" id="pendingCount" style="display: none;">
|
||||
<span id="pendingCountValue">0</span>
|
||||
</div>
|
||||
@@ -48,12 +49,12 @@
|
||||
<span class="nav-icon">📤</span>
|
||||
<span class="nav-label">Queue</span>
|
||||
</a>
|
||||
<a href="/browser" class="nav-item {% if request.path == '/browser' %}active{% endif %}">
|
||||
<a href="/browser" class="nav-item {% if request.path == '/browser' %}active{% endif %}" data-online-only>
|
||||
<span class="nav-icon">📁</span>
|
||||
<span class="nav-label">Files</span>
|
||||
</a>
|
||||
{% if is_admin %}
|
||||
<a href="/admin" class="nav-item {% if request.path == '/admin' %}active{% endif %}">
|
||||
<a href="/admin" class="nav-item {% if request.path == '/admin' %}active{% endif %}" data-online-only>
|
||||
<span class="nav-icon">⚙️</span>
|
||||
<span class="nav-label">Admin</span>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user