feat: PWA support — manifest, service worker, icons, public auth exemption

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-04-29 18:46:33 -04:00
parent f726d78979
commit 25182a1765
9 changed files with 138 additions and 1 deletions

View File

@@ -1549,10 +1549,14 @@
// ── Theme toggle ──────────────────────────────────────────────
const themeBtn = document.getElementById('theme-btn');
const _metaThemeColor = document.getElementById('meta-theme-color');
const _themeColors = { dark: '#1a1228', light: '#f2eef9' };
function applyTheme(theme) {
document.documentElement.setAttribute('data-theme', theme);
themeBtn.textContent = theme === 'dark' ? '☀' : '☾';
themeBtn.title = theme === 'dark' ? 'Switch to light mode' : 'Switch to dark mode';
if (_metaThemeColor) _metaThemeColor.content = _themeColors[theme] || _themeColors.dark;
}
{
@@ -1729,3 +1733,8 @@
const stored = get_stored_session();
if (stored) resumeSession(stored, true).catch(clear_stored_session);
}
// ── Service worker registration ───────────────────────────────
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/sw.js').catch(() => {});
}