mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-04 16:49:47 +00:00
fix: version check
fix: settings synn
This commit is contained in:
parent
eb542299fe
commit
fd951a2acc
15 changed files with 73 additions and 49 deletions
|
|
@ -1,8 +1,9 @@
|
|||
{
|
||||
"name": "ui",
|
||||
"version": "0.0.1",
|
||||
"version": "6.0.0",
|
||||
"license": "BUSL-1.1",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.14.4",
|
||||
"scripts": {
|
||||
"dev": "vite dev --open",
|
||||
"build": "vite build",
|
||||
|
|
@ -51,7 +52,7 @@
|
|||
"@urql/exchange-request-policy": "^1.2.0",
|
||||
"@urql/exchange-retry": "^1.3.0",
|
||||
"@urql/svelte": "^4.2.1",
|
||||
"abslink": "^1.0.9",
|
||||
"abslink": "^1.0.16",
|
||||
"anitomyscript": "github:thaunknown/anitomyscript",
|
||||
"bottleneck": "^2.19.5",
|
||||
"clsx": "^2.1.1",
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ importers:
|
|||
specifier: ^4.2.1
|
||||
version: 4.2.1(@urql/core@5.1.0(graphql@16.10.0))(svelte@4.2.19)
|
||||
abslink:
|
||||
specifier: ^1.0.9
|
||||
version: 1.0.9
|
||||
specifier: ^1.0.16
|
||||
version: 1.0.16
|
||||
anitomyscript:
|
||||
specifier: github:thaunknown/anitomyscript
|
||||
version: https://codeload.github.com/thaunknown/anitomyscript/tar.gz/6214b582127f16b3e50fc12b9cdb2fcf650f7aa6
|
||||
|
|
@ -143,7 +143,7 @@ importers:
|
|||
version: 0.0.18(svelte@4.2.19)
|
||||
eslint-config-standard-universal:
|
||||
specifier: github:thaunknown/eslint-config-standard-universal
|
||||
version: https://codeload.github.com/thaunknown/eslint-config-standard-universal/tar.gz/c59c1aac83d47b039544bb37a280bfeaf5640418(@typescript-eslint/parser@8.18.0(eslint@9.17.0(jiti@1.21.6))(typescript@5.7.2))(jiti@1.21.6)
|
||||
version: https://codeload.github.com/thaunknown/eslint-config-standard-universal/tar.gz/88b9755b42d0fc7b7280ed2c9061954ed06ee7fb(@typescript-eslint/parser@8.18.0(eslint@9.17.0(jiti@1.21.6))(typescript@5.7.2))(jiti@1.21.6)
|
||||
globals:
|
||||
specifier: ^15.11.0
|
||||
version: 15.11.0
|
||||
|
|
@ -152,7 +152,7 @@ importers:
|
|||
version: 1.8.10(@gql.tada/svelte-support@1.0.1(svelte@4.2.19)(typescript@5.7.2))(graphql@16.10.0)(typescript@5.7.2)
|
||||
hayase-extensions:
|
||||
specifier: github:hayase-app/extensions
|
||||
version: https://codeload.github.com/hayase-app/extensions/tar.gz/edf2e76fd25e9ed24cde1be03f82ce5703758e7a
|
||||
version: https://codeload.github.com/hayase-app/extensions/tar.gz/6cb67c6061b0fcd41b5f1f683e6c030129e79eae
|
||||
jassub:
|
||||
specifier: ^1.7.18
|
||||
version: 1.7.18
|
||||
|
|
@ -781,8 +781,8 @@ packages:
|
|||
'@urql/core': ^5.0.0
|
||||
svelte: ^3.0.0 || ^4.0.0 || ^5.0.0
|
||||
|
||||
abslink@1.0.9:
|
||||
resolution: {integrity: sha512-wNzGcz8J9HhJfzQPsSC6XFRrUII7vyE70sJ6jcYioj9JN2ZSSnIaLgDy9D2FcDds2r84WLHM4K7BH8yiVQriDQ==}
|
||||
abslink@1.0.16:
|
||||
resolution: {integrity: sha512-GnBVCPIkfvlnTV+9oOpw7/Ksh8mHzfKmJ7KBeLsPif8faqEqvkxkFvkPAzqy6DKTlmmZOKYsZx2UyWEJcgJ4VQ==}
|
||||
|
||||
acorn-jsx@5.3.2:
|
||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||
|
|
@ -1206,8 +1206,8 @@ packages:
|
|||
peerDependencies:
|
||||
eslint: '>=6.0.0'
|
||||
|
||||
eslint-config-standard-universal@https://codeload.github.com/thaunknown/eslint-config-standard-universal/tar.gz/c59c1aac83d47b039544bb37a280bfeaf5640418:
|
||||
resolution: {tarball: https://codeload.github.com/thaunknown/eslint-config-standard-universal/tar.gz/c59c1aac83d47b039544bb37a280bfeaf5640418}
|
||||
eslint-config-standard-universal@https://codeload.github.com/thaunknown/eslint-config-standard-universal/tar.gz/88b9755b42d0fc7b7280ed2c9061954ed06ee7fb:
|
||||
resolution: {tarball: https://codeload.github.com/thaunknown/eslint-config-standard-universal/tar.gz/88b9755b42d0fc7b7280ed2c9061954ed06ee7fb}
|
||||
version: 1.0.4
|
||||
|
||||
eslint-import-resolver-node@0.3.9:
|
||||
|
|
@ -1308,8 +1308,8 @@ packages:
|
|||
resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==}
|
||||
engines: {node: '>=0.10'}
|
||||
|
||||
esrap@1.4.5:
|
||||
resolution: {integrity: sha512-CjNMjkBWWZeHn+VX+gS8YvFwJ5+NDhg8aWZBSFJPR8qQduDNjbJodA2WcwCm7uQa5Rjqj+nZvVmceg1RbHFB9g==}
|
||||
esrap@1.4.6:
|
||||
resolution: {integrity: sha512-F/D2mADJ9SHY3IwksD4DAXjTt7qt7GWUf3/8RhCNWmC/67tyb55dpimHmy7EplakFaflV0R/PC+fdSPqrRHAQw==}
|
||||
|
||||
esrecurse@4.3.0:
|
||||
resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==}
|
||||
|
|
@ -1504,8 +1504,8 @@ packages:
|
|||
resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
hayase-extensions@https://codeload.github.com/hayase-app/extensions/tar.gz/edf2e76fd25e9ed24cde1be03f82ce5703758e7a:
|
||||
resolution: {tarball: https://codeload.github.com/hayase-app/extensions/tar.gz/edf2e76fd25e9ed24cde1be03f82ce5703758e7a}
|
||||
hayase-extensions@https://codeload.github.com/hayase-app/extensions/tar.gz/6cb67c6061b0fcd41b5f1f683e6c030129e79eae:
|
||||
resolution: {tarball: https://codeload.github.com/hayase-app/extensions/tar.gz/6cb67c6061b0fcd41b5f1f683e6c030129e79eae}
|
||||
version: 1.0.5
|
||||
|
||||
idb-keyval@6.2.1:
|
||||
|
|
@ -2273,8 +2273,8 @@ packages:
|
|||
resolution: {integrity: sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==}
|
||||
engines: {node: '>=16'}
|
||||
|
||||
svelte@5.25.5:
|
||||
resolution: {integrity: sha512-ULi9rkVWQJyJYZSpy6SIgSTchWadyWG1QYAUx3JAXL2gXrnhdXtoB20KmXGSNdtNyquq3eYd/gkwAkLcL5PGWw==}
|
||||
svelte@5.26.3:
|
||||
resolution: {integrity: sha512-SgDfx70CmW8Rev9XRu5sN/3Paa/mSh3DGxDDEgtecdjbhLrmgK18McanP+gNE8HYGm8tXiXZN3Fn31NcqBML+Q==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
tabbable@6.2.0:
|
||||
|
|
@ -3120,7 +3120,7 @@ snapshots:
|
|||
svelte: 4.2.19
|
||||
wonka: 6.3.4
|
||||
|
||||
abslink@1.0.9: {}
|
||||
abslink@1.0.16: {}
|
||||
|
||||
acorn-jsx@5.3.2(acorn@8.14.0):
|
||||
dependencies:
|
||||
|
|
@ -3644,7 +3644,7 @@ snapshots:
|
|||
eslint: 9.17.0(jiti@1.21.6)
|
||||
semver: 7.7.1
|
||||
|
||||
eslint-config-standard-universal@https://codeload.github.com/thaunknown/eslint-config-standard-universal/tar.gz/c59c1aac83d47b039544bb37a280bfeaf5640418(@typescript-eslint/parser@8.18.0(eslint@9.17.0(jiti@1.21.6))(typescript@5.7.2))(jiti@1.21.6):
|
||||
eslint-config-standard-universal@https://codeload.github.com/thaunknown/eslint-config-standard-universal/tar.gz/88b9755b42d0fc7b7280ed2c9061954ed06ee7fb(@typescript-eslint/parser@8.18.0(eslint@9.17.0(jiti@1.21.6))(typescript@5.7.2))(jiti@1.21.6):
|
||||
dependencies:
|
||||
'@stylistic/eslint-plugin': 4.2.0(eslint@9.17.0(jiti@1.21.6))(typescript@5.7.2)
|
||||
eslint: 9.17.0(jiti@1.21.6)
|
||||
|
|
@ -3652,9 +3652,9 @@ snapshots:
|
|||
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.18.0(eslint@9.17.0(jiti@1.21.6))(typescript@5.7.2))(eslint@9.17.0(jiti@1.21.6))
|
||||
eslint-plugin-n: 17.15.0(eslint@9.17.0(jiti@1.21.6))
|
||||
eslint-plugin-promise: 7.2.1(eslint@9.17.0(jiti@1.21.6))
|
||||
eslint-plugin-svelte: 3.1.0(eslint@9.17.0(jiti@1.21.6))(svelte@5.25.5)
|
||||
eslint-plugin-svelte: 3.1.0(eslint@9.17.0(jiti@1.21.6))(svelte@5.26.3)
|
||||
globals: 16.0.0
|
||||
svelte: 5.25.5
|
||||
svelte: 5.26.3
|
||||
typescript: 5.7.2
|
||||
typescript-eslint: 8.18.0(eslint@9.17.0(jiti@1.21.6))(typescript@5.7.2)
|
||||
transitivePeerDependencies:
|
||||
|
|
@ -3736,7 +3736,7 @@ snapshots:
|
|||
'@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0(jiti@1.21.6))
|
||||
eslint: 9.17.0(jiti@1.21.6)
|
||||
|
||||
eslint-plugin-svelte@3.1.0(eslint@9.17.0(jiti@1.21.6))(svelte@5.25.5):
|
||||
eslint-plugin-svelte@3.1.0(eslint@9.17.0(jiti@1.21.6))(svelte@5.26.3):
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0(jiti@1.21.6))
|
||||
'@jridgewell/sourcemap-codec': 1.5.0
|
||||
|
|
@ -3748,9 +3748,9 @@ snapshots:
|
|||
postcss-load-config: 3.1.4(postcss@8.4.49)
|
||||
postcss-safe-parser: 7.0.1(postcss@8.4.49)
|
||||
semver: 7.7.1
|
||||
svelte-eslint-parser: 1.0.1(svelte@5.25.5)
|
||||
svelte-eslint-parser: 1.0.1(svelte@5.26.3)
|
||||
optionalDependencies:
|
||||
svelte: 5.25.5
|
||||
svelte: 5.26.3
|
||||
transitivePeerDependencies:
|
||||
- ts-node
|
||||
|
||||
|
|
@ -3818,7 +3818,7 @@ snapshots:
|
|||
dependencies:
|
||||
estraverse: 5.3.0
|
||||
|
||||
esrap@1.4.5:
|
||||
esrap@1.4.6:
|
||||
dependencies:
|
||||
'@jridgewell/sourcemap-codec': 1.5.0
|
||||
|
||||
|
|
@ -4007,7 +4007,7 @@ snapshots:
|
|||
dependencies:
|
||||
function-bind: 1.1.2
|
||||
|
||||
hayase-extensions@https://codeload.github.com/hayase-app/extensions/tar.gz/edf2e76fd25e9ed24cde1be03f82ce5703758e7a: {}
|
||||
hayase-extensions@https://codeload.github.com/hayase-app/extensions/tar.gz/6cb67c6061b0fcd41b5f1f683e6c030129e79eae: {}
|
||||
|
||||
idb-keyval@6.2.1: {}
|
||||
|
||||
|
|
@ -4735,7 +4735,7 @@ snapshots:
|
|||
transitivePeerDependencies:
|
||||
- picomatch
|
||||
|
||||
svelte-eslint-parser@1.0.1(svelte@5.25.5):
|
||||
svelte-eslint-parser@1.0.1(svelte@5.26.3):
|
||||
dependencies:
|
||||
eslint-scope: 8.2.0
|
||||
eslint-visitor-keys: 4.2.0
|
||||
|
|
@ -4744,7 +4744,7 @@ snapshots:
|
|||
postcss-scss: 4.0.9(postcss@8.4.49)
|
||||
postcss-selector-parser: 7.1.0
|
||||
optionalDependencies:
|
||||
svelte: 5.25.5
|
||||
svelte: 5.26.3
|
||||
|
||||
svelte-hmr@0.16.0(svelte@4.2.19):
|
||||
dependencies:
|
||||
|
|
@ -4788,7 +4788,7 @@ snapshots:
|
|||
magic-string: 0.30.12
|
||||
periscopic: 3.1.0
|
||||
|
||||
svelte@5.25.5:
|
||||
svelte@5.26.3:
|
||||
dependencies:
|
||||
'@ampproject/remapping': 2.3.0
|
||||
'@jridgewell/sourcemap-codec': 1.5.0
|
||||
|
|
@ -4799,7 +4799,7 @@ snapshots:
|
|||
axobject-query: 4.1.0
|
||||
clsx: 2.1.1
|
||||
esm-env: 1.2.2
|
||||
esrap: 1.4.5
|
||||
esrap: 1.4.6
|
||||
is-reference: 3.0.3
|
||||
locate-character: 3.0.0
|
||||
magic-string: 0.30.12
|
||||
|
|
|
|||
15
src/app.d.ts
vendored
15
src/app.d.ts
vendored
|
|
@ -52,6 +52,17 @@ export interface TorrentInfo {
|
|||
eta: number
|
||||
}
|
||||
|
||||
export interface TorrentSettings {
|
||||
torrentPersist: boolean
|
||||
torrentDHT: boolean
|
||||
torrentStreamedDownload: boolean
|
||||
torrentSpeed: number
|
||||
maxConns: number
|
||||
torrentPort: number
|
||||
dhtPort: number
|
||||
torrentPeX: boolean
|
||||
}
|
||||
|
||||
export interface Native {
|
||||
authAL: (url: string) => Promise<AuthResponse>
|
||||
restart: () => Promise<void>
|
||||
|
|
@ -83,8 +94,10 @@ export interface Native {
|
|||
chapters: (hash: string, id: number) => Promise<Array<{ start: number, end: number, text: string }>>
|
||||
torrentStats: (hash: string) => Promise<TorrentInfo>
|
||||
torrents: () => Promise<TorrentInfo[]>
|
||||
setDOH: (dns: string) => Promise<void>
|
||||
updateSettings: (settings: TorrentSettings) => Promise<void>
|
||||
isApp: boolean
|
||||
version: () => string
|
||||
version: () => Promise<string>
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
export let size: NonNullable<$$Props['size']> = 'xs'
|
||||
function play () {
|
||||
const episode = (progress(media) ?? 0) + 1
|
||||
// TODO: set rewatch state
|
||||
searchStore.set({ media, episode })
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
import type { resolveFilesPoorly, ResolvedFile } from './resolver'
|
||||
import type { MediaInfo } from '$lib/components/ui/player/util'
|
||||
|
||||
import { banner, episodes, title } from '$lib/modules/anilist'
|
||||
import { cover, episodes, title } from '$lib/modules/anilist'
|
||||
import { searchStore } from '$lib/components/SearchModal.svelte'
|
||||
|
||||
export let mediaInfo: NonNullable<Awaited<ReturnType<typeof resolveFilesPoorly>>>
|
||||
|
|
@ -16,8 +16,8 @@
|
|||
media: file.metadata.media,
|
||||
session: {
|
||||
title: title(file.metadata.media),
|
||||
description: 'N/A', // TODO
|
||||
image: banner(file.metadata.media) ?? ''
|
||||
description: 'Episode ' + file.metadata.episode, // TODO
|
||||
image: cover(file.metadata.media) ?? ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<svelte:document bind:visibilityState />
|
||||
|
||||
<BannerImage class='absolute top-0 left-0 w-14 -z-10 hidden md:block' />
|
||||
<Logo class='mb-3 h-10 object-contain px-2 hidden md:block text-white' />
|
||||
<Logo class='mb-3 h-10 object-contain px-2.5 hidden md:block text-white' />
|
||||
<SidebarButton href='/app/home/'>
|
||||
<Home size={18} />
|
||||
</SidebarButton>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { set, getMany, delMany, del } from 'idb-keyval'
|
||||
import { releaseProxy, type Remote } from 'abslink'
|
||||
import { persisted } from 'svelte-persisted-store'
|
||||
import { wrap } from 'abslink/worker'
|
||||
import { wrap } from 'abslink/w3c'
|
||||
import { get } from 'svelte/store'
|
||||
import { toast } from 'svelte-sonner'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { finalizer } from 'abslink'
|
||||
import { expose } from 'abslink/worker'
|
||||
import { expose } from 'abslink/w3c'
|
||||
|
||||
import type { SearchFunction, TorrentSource } from 'hayase-extensions'
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,9 @@ export default Object.assign<Native, Partial<Native>>({
|
|||
{ start: 1.0 * 60, end: 1.2 * 60, text: 'Chapter 1' },
|
||||
{ start: 1.4 * 60, end: 88, text: 'Chapter 2 ' }
|
||||
],
|
||||
version: () => 'v0.0.2',
|
||||
version: async () => 'v6.0.0',
|
||||
updateSettings: async () => undefined,
|
||||
setDOH: async () => undefined,
|
||||
torrentStats: async (): Promise<TorrentInfo> => ({ peers: rnd(), seeders: rnd(), leechers: rnd(), progress: Math.random(), down: rnd(100000000), up: rnd(100000000), name: 'Amebku.webm', downloaded: rnd(100000), hash: '1234567890abcdef', size: 1234567890, eta: rnd() }),
|
||||
torrents: async (): Promise<TorrentInfo[]> => [{ peers: rnd(), seeders: rnd(), leechers: rnd(), progress: Math.random(), down: rnd(100000000), up: rnd(100000000), name: 'Amebku.webm', downloaded: rnd(100000), hash: '1234567890abcdef', size: 1234567890, eta: rnd() }]
|
||||
// @ts-expect-error idk
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
import { persisted } from 'svelte-persisted-store'
|
||||
|
||||
import native from '../native'
|
||||
|
||||
import { defaults } from '.'
|
||||
|
||||
export const settings = persisted('settings', defaults, { beforeRead: value => ({ ...defaults, ...value }) })
|
||||
|
||||
settings.subscribe(settings => {
|
||||
const { torrentPersist, torrentDHT, torrentStreamedDownload, torrentSpeed, maxConns, torrentPort, dhtPort, torrentPeX } = settings
|
||||
native.updateSettings({ torrentPersist, torrentDHT, torrentStreamedDownload, torrentSpeed, maxConns, torrentPort, dhtPort, torrentPeX })
|
||||
if (settings.enableDoH) native.setDOH(settings.doHURL)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -4,12 +4,13 @@ import native from './native'
|
|||
|
||||
import { version } from '$app/environment'
|
||||
|
||||
function compareVersions (): 'ui' | 'client' | undefined {
|
||||
const releaseType = diff(version, native.version())
|
||||
async function compareVersions (): Promise<'ui' | 'client' | undefined> {
|
||||
const nativeVersion = await native.version()
|
||||
const releaseType = diff(version, nativeVersion)
|
||||
if (!releaseType) return
|
||||
if (releaseType === 'patch') return
|
||||
|
||||
return compare(version, native.version()) === -1 ? 'ui' : 'client'
|
||||
return compare(version, nativeVersion) === -1 ? 'ui' : 'client'
|
||||
}
|
||||
|
||||
export const outdatedComponent = compareVersions()
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { redirect } from '@sveltejs/kit'
|
|||
import { outdatedComponent } from '$lib/modules/update'
|
||||
import { SETUP_VERSION } from '$lib'
|
||||
|
||||
export function load () {
|
||||
if (outdatedComponent) return redirect(307, '/update/')
|
||||
export async function load () {
|
||||
if (await outdatedComponent) return redirect(307, '/update/')
|
||||
redirect(307, Number(localStorage.getItem('setup-finished')) >= SETUP_VERSION ? '/app/home/' : '/setup')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import native from '$lib/modules/native'
|
|||
import { outdatedComponent } from '$lib/modules/update'
|
||||
import { SETUP_VERSION } from '$lib'
|
||||
|
||||
export function load () {
|
||||
export async function load () {
|
||||
if (!dev && !native.isApp) return error(401, 'How did you get here?')
|
||||
if (Number(localStorage.getItem('setup-finished')) < SETUP_VERSION) redirect(307, '/setup')
|
||||
|
||||
if (outdatedComponent) redirect(307, '/update/')
|
||||
if (await outdatedComponent) redirect(307, '/update/')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
<Menubar />
|
||||
<div class='overflow-x-hidden overflow-y-scroll relative flex justify-center items-center text-white px-15 w-full font-light'>
|
||||
<div class='max-w-full min-w-96 justify-center items-center flex-col flex'>
|
||||
<div class='text-6xl text-center'>Update Required</div>
|
||||
<div class='text-6xl text-center font-bold'>Update Required</div>
|
||||
<Separator class='my-6 w-40' />
|
||||
<div class='text-xl text-wrap max-w-full text-center'>A mandatory update is available for the {outdatedComponent}.<br />Please update to continue.</div>
|
||||
<div class='text-xl text-wrap max-w-full text-center'>A mandatory update is available for the {#await outdatedComponent then name}{name}{/await}.<br />Please update to continue.</div>
|
||||
<Button class='mt-6 text-md font-bold' size='lg' on:click={native.restart}>Update</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@ import { redirect } from '@sveltejs/kit'
|
|||
|
||||
import { outdatedComponent } from '$lib/modules/update'
|
||||
|
||||
export function load () {
|
||||
if (!outdatedComponent) redirect(307, '/')
|
||||
export async function load () {
|
||||
if (!await outdatedComponent) redirect(307, '/')
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue