diff --git a/src/vizarr.tsx b/src/vizarr.tsx index cd4070f9..cb8af875 100644 --- a/src/vizarr.tsx +++ b/src/vizarr.tsx @@ -14,6 +14,10 @@ function App() { const setViewState = useUpdateAtom(viewStateAtom); async function addImage(config: ImageLayerConfig) { + if (config.source === 'pwa') { + console.warn('Vizarr launched in experimental PWA mode, looking for data at http://localhost:3000.'); + config.source = 'http://localhost:3000'; + } const { createSourceData } = await import('./io'); const id = Math.random().toString(36).slice(2); const sourceData = await createSourceData(config); diff --git a/vite.config.js b/vite.config.js index 0176ece9..dd76493c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -9,7 +9,7 @@ const manifest = { name: 'vizarr', short_name: 'vizarr', lang: 'en-US', - start_url: '.', + start_url: '/?source=pwa', display: 'standalone', theme_color: '#000000', icons: [