update
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
export default defineNuxtRouteMiddleware(async (to, from) => {
|
||||
if (import.meta.dev || import.meta.server)
|
||||
return
|
||||
// if (import.meta.dev || import.meta.server)
|
||||
// return
|
||||
|
||||
const { isTauri } = useApp()
|
||||
|
||||
if (!isTauri.value)
|
||||
return
|
||||
|
||||
if (from?.name)
|
||||
console.log('pizda', to, from)
|
||||
|
||||
if (from?.name || !!to.redirectedFrom)
|
||||
return
|
||||
|
||||
const { checkForUpdates } = useUpdater()
|
||||
@@ -15,6 +17,6 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
|
||||
const update = await checkForUpdates()
|
||||
|
||||
if (update) {
|
||||
return navigateTo({ name: 'Updating' })
|
||||
return navigateTo({ name: 'Updater' })
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user