logigate/app/plugins/update.client.ts

10 lines
368 B
TypeScript

// A new release was deployed while this tab was open: offer a reload, so
// nobody keeps working in an old version. The project is saved on every
// change, so reloading loses nothing.
export default defineNuxtPlugin(nuxtApp => {
const ready = useState('update-ready', () => false)
nuxtApp.hooks.hook('app:manifest:update', () => {
ready.value = true
})
})