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:
2026-05-21 12:01:05 -04:00
parent 622996624a
commit 37ba54b750
2 changed files with 25 additions and 2 deletions
+8
View File
@@ -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
═══════════════════════════════════════════════════════════════════════ -->