diff --git a/components/EntityShowSubFiles.vue b/components/EntityShowSubFiles.vue index 2d9978b..b4d1d74 100644 --- a/components/EntityShowSubFiles.vue +++ b/components/EntityShowSubFiles.vue @@ -1,70 +1,134 @@ \ No newline at end of file diff --git a/middleware/redirectToMobileIndex.ts b/middleware/redirectToMobileIndex.ts index 2ccfddc..e332a1b 100644 --- a/middleware/redirectToMobileIndex.ts +++ b/middleware/redirectToMobileIndex.ts @@ -1,9 +1,9 @@ export default defineNuxtRouteMiddleware(async (to, _from) => { const router = useRouter() - console.log(await useCapacitor().getIsPhone()) + console.log(useCapacitor().getIsNative()) - if(await useCapacitor().getIsPhone() && _from.path !== '/mobile') { + if(useCapacitor().getIsNative() && _from.path !== '/mobile') { return router.push('/mobile') } }) diff --git a/pages/login.vue b/pages/login.vue index 84b87fd..09ae74e 100644 --- a/pages/login.vue +++ b/pages/login.vue @@ -6,7 +6,7 @@ definePageMeta({ const auth = useAuthStore() const toast = useToast() - +const platformIsNative = useCapacitor().getIsNative() const doLogin = async (data:any) => { @@ -14,7 +14,7 @@ const doLogin = async (data:any) => { await auth.login(data.email, data.password) // Weiterleiten nach erfolgreichem Login toast.add({title:"Einloggen erfolgreich"}) - if(useCapacitor().getIsNative()) { + if(platformIsNative) { return navigateTo("/mobile") } else { return navigateTo("/") @@ -26,7 +26,7 @@ const doLogin = async (data:any) => { +
+ + + + + +
\ No newline at end of file diff --git a/pages/mobile/index.vue b/pages/mobile/index.vue index 974f40b..71f1c29 100644 --- a/pages/mobile/index.vue +++ b/pages/mobile/index.vue @@ -1,13 +1,33 @@