fix: fix tauri checks
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2701>
This commit is contained in:
parent
5647a1072d
commit
14d099b872
|
@ -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",
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue