From 14d099b8727db3613a7602978e728670fb5881fa Mon Sep 17 00:00:00 2001 From: Kasper Seweryn Date: Wed, 24 Jan 2024 19:31:14 +0100 Subject: [PATCH] fix: fix tauri checks Part-of: --- front/package.json | 2 +- front/src/init/serviceWorker.ts | 6 ------ front/src/store/instance.ts | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/front/package.json b/front/package.json index d9df6c420..015e23851 100644 --- a/front/package.json +++ b/front/package.json @@ -21,7 +21,7 @@ "@funkwhale/ui": "0.2.2", "@sentry/tracing": "7.47.0", "@sentry/vue": "7.47.0", - "@tauri-apps/api": "1.5.3", + "@tauri-apps/api": "2.0.0-alpha.14", "@vue/runtime-core": "3.3.11", "@vueuse/core": "10.3.0", "@vueuse/integrations": "10.3.0", diff --git a/front/src/init/serviceWorker.ts b/front/src/init/serviceWorker.ts index 23fdb14a0..d5f7195ed 100644 --- a/front/src/init/serviceWorker.ts +++ b/front/src/init/serviceWorker.ts @@ -9,12 +9,6 @@ const { t } = i18n.global const logger = useLogger() export const install: InitModule = ({ store }) => { - // NOTE: Return early if we're not running in a browser - if ('TAURI_PLATFORM' in import.meta.env) { - logger.info('Tauri detected, skipping service worker registration') - // return - } - const updateSW = registerSW({ onRegisterError (error) { const importStatementsSupported = navigator.userAgent.includes('Chrome') diff --git a/front/src/store/instance.ts b/front/src/store/instance.ts index 559b54865..8cc750a5d 100644 --- a/front/src/store/instance.ts +++ b/front/src/store/instance.ts @@ -131,7 +131,7 @@ export const TAURI_DEFAULT_INSTANCE_URL = 'tauri://force-instance-chooser/' // 3. use the url specified when building via VUE_APP_INSTANCE_URL // 4. use the current url const DEFAULT_INSTANCE_URL = (() => { - if ('TAURI_PLATFORM' in import.meta.env) { + if ('TAURI_ENV_PLATFORM' in import.meta.env) { return TAURI_DEFAULT_INSTANCE_URL }