Removed Capacitor

This commit is contained in:
2026-01-06 15:20:26 +01:00
parent 3bcfacdf84
commit 9fb520d8c3
50 changed files with 90 additions and 1629 deletions

View File

@@ -16,19 +16,10 @@ export const useAuthStore = defineStore("auth", {
actions: {
async persist(token) {
if(useCapacitor().getIsNative()) {
console.log("On Native")
await Preferences.set({
key:"token",
value: token,
})
useCookie("token").value = token // persistieren
} else {
console.log("On Web")
useCookie("token").value = token // persistieren
console.log("On Web")
useCookie("token").value = token // persistieren
}
},
async initStore() {
@@ -37,11 +28,8 @@ export const useAuthStore = defineStore("auth", {
if(this.activeTenant > 0) {
this.loading = false
if(useCapacitor().getIsNative()) {
navigateTo("/mobile")
} else {
navigateTo("/")
}
navigateTo("/")
}
},
@@ -54,11 +42,8 @@ export const useAuthStore = defineStore("auth", {
if(this.profile.temp_config) tempStore.setStoredTempConfig(this.profile.temp_config)
if(this.activeTenant > 0) {
this.loading = false
if(useCapacitor().getIsNative()) {
navigateTo("/mobile")
} else {
navigateTo("/")
}
navigateTo("/")
}
},
@@ -89,12 +74,9 @@ export const useAuthStore = defineStore("auth", {
this.profile = null
this.activeTenant = null
this.tenants = []
if(useCapacitor().getIsNative()) {
await Preferences.remove({ key: 'token' });
useCookie("token").value = null
} else {
useCookie("token").value = null
}
useCookie("token").value = null
navigateTo("/login")
},
@@ -149,15 +131,10 @@ export const useAuthStore = defineStore("auth", {
const {token} = res
if(useCapacitor().getIsNative()) {
await Preferences.set({
key:"token",
value: token,
})
} else {
useCookie("token").value = token // persistieren
}
useCookie("token").value = token // persistieren
await this.init(token)
},