Removed Capacitor
This commit is contained in:
@@ -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)
|
||||
},
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ export const useProfileStore = defineStore('profile', () => {
|
||||
let profiles = (await supabase.from("profiles").select("*, role(*)")).data
|
||||
let activeProfileConnection = profileconnections.find(i => i.active)
|
||||
if(activeProfileConnection) {
|
||||
if(!await useCapacitor().getIsPhone()) {
|
||||
if(!false) {
|
||||
toast.add({title: 'Aktives Profil ausgewählt'})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user