fix: fix tauri checks

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2701>
environments/review-docs-v2-ov-8q6uyo/deployments/19325
Kasper Seweryn 2024-01-24 19:31:14 +01:00
rodzic 5647a1072d
commit 14d099b872
3 zmienionych plików z 2 dodań i 8 usunięć

Wyświetl plik

@ -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",

Wyświetl plik

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

Wyświetl plik

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