Add Capacitor import for preLoadCheck function in preload.ts

This commit is contained in:
kwaroran
2024-04-30 13:19:58 +09:00
parent 344deae1bc
commit 56a6d57a60

View File

@@ -1,3 +1,4 @@
import { Capacitor } from "@capacitor/core";
export function preLoadCheck(){
const searchParams = new URLSearchParams(location.search);
@@ -6,8 +7,9 @@ export function preLoadCheck(){
const isTauri = !!window.__TAURI__
//@ts-ignore
const isNodeServer = !!globalThis.__NODE__
const isWeb = !isTauri && !isNodeServer && location.hostname !== 'risuai.xyz';
const isCapacitor = Capacitor.isNativePlatform();
const isWeb = !isTauri && !isNodeServer && location.hostname !== 'risuai.xyz' && !isCapacitor;
// Check if the user has visited the main page