Add Capacitor import for preLoadCheck function in preload.ts
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { Capacitor } from "@capacitor/core";
|
||||||
|
|
||||||
export function preLoadCheck(){
|
export function preLoadCheck(){
|
||||||
const searchParams = new URLSearchParams(location.search);
|
const searchParams = new URLSearchParams(location.search);
|
||||||
@@ -6,8 +7,9 @@ export function preLoadCheck(){
|
|||||||
const isTauri = !!window.__TAURI__
|
const isTauri = !!window.__TAURI__
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
const isNodeServer = !!globalThis.__NODE__
|
const isNodeServer = !!globalThis.__NODE__
|
||||||
|
const isCapacitor = Capacitor.isNativePlatform();
|
||||||
const isWeb = !isTauri && !isNodeServer && location.hostname !== 'risuai.xyz';
|
|
||||||
|
const isWeb = !isTauri && !isNodeServer && location.hostname !== 'risuai.xyz' && !isCapacitor;
|
||||||
|
|
||||||
|
|
||||||
// Check if the user has visited the main page
|
// Check if the user has visited the main page
|
||||||
|
|||||||
Reference in New Issue
Block a user