mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-19 00:52:09 +00:00
fix: force app in root
This commit is contained in:
parent
fd951a2acc
commit
b37b48922d
1 changed files with 4 additions and 1 deletions
|
|
@ -1,9 +1,12 @@
|
|||
import { redirect } from '@sveltejs/kit'
|
||||
import { redirect, error } from '@sveltejs/kit'
|
||||
|
||||
import { outdatedComponent } from '$lib/modules/update'
|
||||
import { SETUP_VERSION } from '$lib'
|
||||
import { dev } from '$app/environment'
|
||||
import native from '$lib/modules/native'
|
||||
|
||||
export async function load () {
|
||||
if (!dev && !native.isApp) return error(401, 'How did you get here?')
|
||||
if (await outdatedComponent) return redirect(307, '/update/')
|
||||
redirect(307, Number(localStorage.getItem('setup-finished')) >= SETUP_VERSION ? '/app/home/' : '/setup')
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue