From 6c1de836e5230edac8517472337ce3f75360292c Mon Sep 17 00:00:00 2001 From: ecrum19 Date: Mon, 8 Sep 2025 19:33:48 +0200 Subject: [PATCH] add refresh fallback and fix routing errors --- main.yml | 2 ++ src/components/Styling/TheHeader.vue | 2 +- src/router.ts | 7 +------ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/main.yml b/main.yml index 1d9dab69..36cb8e02 100644 --- a/main.yml +++ b/main.yml @@ -25,6 +25,8 @@ jobs: run: | yarn i yarn run build + - name: Add 404 fallback for SPA 🔁 + run: cp dist/index.html dist/404.html - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@releases/v4 with: diff --git a/src/components/Styling/TheHeader.vue b/src/components/Styling/TheHeader.vue index 51012730..61a8edd1 100644 --- a/src/components/Styling/TheHeader.vue +++ b/src/components/Styling/TheHeader.vue @@ -144,7 +144,7 @@ export default { const authStore = useAuthStore(); authStore.clearAuth(); this.notloggedOut = await logOut(); - window.location.href = '/'; + window.location.href = 'https://knowledgeonwebscale.github.io/solid-cockpit/'; }, homepageRedir(): void { redirectToHomepage(); diff --git a/src/router.ts b/src/router.ts index 088f5c01..5b236231 100644 --- a/src/router.ts +++ b/src/router.ts @@ -15,7 +15,7 @@ import { useAuthStore } from "./stores/auth"; * The router here allows for navigation between different functional pages of the TRIPLE App */ const router = createRouter({ - history: createWebHistory('/solid-cockpit/'), + history: createWebHistory(import.meta.env.BASE_URL), routes: [ { name: "Home", @@ -47,11 +47,6 @@ const router = createRouter({ path: "/privacy", components: { default: EditPrivacy }, }, - { - name: "CatchAll", - path: '/:notFound(.*)', - components: NotFound, - } ], });