web-app/src/main.ts
padreug 5788b76000 fix vue-sonner Toast implementation
if there are ever issues with dialogs and toasts together, you may want
to add `pointer-events-auto` to the Toaster class
https://github.com/unovue/shadcn-vue/blob/dev/apps/www/src/content/docs/components/sonner.md#sonner-with-dialog
2025-07-12 18:10:26 +02:00

30 lines
648 B
TypeScript

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import { i18n } from './i18n'
import './assets/index.css'
import { registerSW } from 'virtual:pwa-register'
import 'vue-sonner/style.css'
const app = createApp(App)
const pinia = createPinia()
app.use(router)
app.use(i18n)
app.use(pinia)
// Simple periodic service worker updates
const intervalMS = 60 * 60 * 1000 // 1 hour
registerSW({
onRegistered(r) {
r && setInterval(() => {
r.update()
}, intervalMS)
},
onOfflineReady() {
console.log('App ready to work offline')
}
})
app.mount('#app')