This commit is contained in:
2025-12-24 04:35:13 +06:00
parent a4bd6705b6
commit cdf2bf5952
5 changed files with 18 additions and 13 deletions

View File

@@ -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' })
}
})

View File

@@ -1,6 +1,7 @@
import chadApi from '#shared/chad-api'
export default defineNuxtRouteMiddleware(async (to, from) => {
console.log('ya zdes')
const { me, setMe } = useAuth()
if (!me.value && !from?.name) {