T5: Offline queue + background sync — fix missing offline banner, add API GET caching to SW
- Added missing #offlineBanner HTML element with queueCountBadge (showOfflineBanner/hideOfflineBanner were referencing it but it didn't exist) - Enhanced SW: API GET calls now use network-first with cache fallback (POST/PUT/DELETE still pass through — main thread handles offline queuing) - Bumped SW cache from canteen-v1 to canteen-v2
This commit is contained in:
@@ -1149,6 +1149,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ═══════════════════════════════════════════════════════════════════════
|
||||
OFFLINE BANNER
|
||||
═══════════════════════════════════════════════════════════════════════ -->
|
||||
<div id="offlineBanner" class="offline-banner">
|
||||
📡 Offline mode — changes will sync when connected
|
||||
<span id="queueCountBadge" class="queue-count" style="display:none;">0</span>
|
||||
</div>
|
||||
|
||||
<!-- ═══════════════════════════════════════════════════════════════════════
|
||||
DRAWER
|
||||
═══════════════════════════════════════════════════════════════════════ -->
|
||||
|
||||
Reference in New Issue
Block a user