feat(app): video player, guide page, free films, PWA cache fix
- Add VideoPlayerOverlay component for free film playback - Add GuidePage with interactive node setup walkthrough - Add freeFilms data catalog with public domain films - Enhance PlayerBar with video support and queue management - Add video player store for overlay state management - Refactor music search plugin (Jamendo integration cleanup) - Add PWA cache version purge mechanism in main.ts - Add PWA icon cache fix skill for Brave/Chrome - Improve content grids: loading states, image fallbacks - Enhance useArchy composable with node context - Update useNostr with relay pool management - Expand chat store with guide conversation support - Add test fixtures for guide and node demo prompts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
c84c0fb424
commit
b77c93607a
@@ -5,6 +5,30 @@ import App from './App.vue'
|
||||
import './styles/main.css'
|
||||
import { initializePlugins } from './plugins'
|
||||
|
||||
// PWA cache version — bump this when icons or critical assets change
|
||||
const PWA_CACHE_VERSION = '2'
|
||||
|
||||
// Purge all service worker caches when version changes
|
||||
;(async () => {
|
||||
const key = 'aiui-cache-version'
|
||||
const stored = localStorage.getItem(key)
|
||||
if (stored !== PWA_CACHE_VERSION) {
|
||||
localStorage.setItem(key, PWA_CACHE_VERSION)
|
||||
if ('caches' in window) {
|
||||
const names = await caches.keys()
|
||||
await Promise.all(names.map((name) => caches.delete(name)))
|
||||
}
|
||||
if ('serviceWorker' in navigator) {
|
||||
const registrations = await navigator.serviceWorker.getRegistrations()
|
||||
await Promise.all(registrations.map((r) => r.unregister()))
|
||||
}
|
||||
if (stored !== null) {
|
||||
// Only reload if this is an upgrade, not a fresh install
|
||||
window.location.reload()
|
||||
}
|
||||
}
|
||||
})()
|
||||
|
||||
// Capture embedded flag before router init (survives SPA navigation)
|
||||
// Only embedded when explicitly requested via ?embedded param
|
||||
const _embeddedFlag = new URLSearchParams(window.location.search).has('embedded')
|
||||
@@ -33,6 +57,11 @@ const router = createRouter({
|
||||
name: 'conversation-viewer',
|
||||
component: () => import('./pages/ConversationViewerPage.vue'),
|
||||
},
|
||||
{
|
||||
path: '/guide',
|
||||
name: 'guide',
|
||||
component: () => import('./pages/GuidePage.vue'),
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user