Redirect authenticated users on the landing page and increment TWA app version to 6

This commit is contained in:
Jeppe Bundgaard
2026-01-26 12:40:00 +01:00
parent 9ba2141d42
commit 3e5c5b893c
3 changed files with 15 additions and 4 deletions
@@ -669,6 +669,9 @@ export const SessionUser = {
login: () => {
window.location.href = '/login';
},
redirect: () => {
window.location.href = '/redirect';
},
},
/**
* Redirect to a department
+9 -1
View File
@@ -1,6 +1,14 @@
<script setup>
import { SessionUser } from "@/components/session/token/SessionUser.vue";
import { onMounted} from "vue";
import LoginForm from "@/components/forms/auth/LoginForm.vue";
onMounted(() => {
// If the user is authenticated, redirect to the user or admin dashboard
if (SessionUser.hasToken()) {
SessionUser.functions.redirectTo.pages.redirect();
}
});
</script>
<template>
+3 -3
View File
@@ -19,8 +19,8 @@
"path": "C:\\Users\\2jepp\\WebstormProjects\\pleno-vue\\android.keystore",
"alias": "android"
},
"appVersionName": "5",
"appVersionCode": 5,
"appVersionName": "6",
"appVersionCode": 6,
"shortcuts": [],
"generatorApp": "bubblewrap-cli",
"webManifestUrl": "https://truckwash.io/manifest.webmanifest",
@@ -45,5 +45,5 @@
"protocolHandlers": [],
"fileHandlers": [],
"launchHandlerClientMode": "navigate-existing",
"appVersion": "5"
"appVersion": "6"
}