Cahnges to make compatible

This commit is contained in:
2025-03-24 11:54:56 +01:00
parent 5418c0195e
commit bb7d7ae3a9
9 changed files with 71 additions and 18 deletions

View File

@@ -0,0 +1,30 @@
import {Capacitor} from "@capacitor/core";
import {Device} from "@capacitor/device";
import {Network} from "@capacitor/network";
export const useCapacitor = () => {
const getPlatform = () => {
return Capacitor.getPlatform()
}
const getDeviceInfo = async () => {
return await Device.getInfo()
}
const getIsPhone = async () => {
let deviceInfo = await useCapacitor().getDeviceInfo()
if(deviceInfo.model.toLowerCase().includes('iphone')) {
return true
} else {
return false
}
}
const getNetworkStatus = async () => {
return await Network.getStatus()
}
return {getPlatform, getDeviceInfo, getNetworkStatus, getIsPhone}
}

View File

@@ -1,4 +1,3 @@
import index from "v-calendar";
export const useFiles = () => {
const supabase = useSupabaseClient()