From 38492ad592133caad88aa1aeb931d7edc9f5cc21 Mon Sep 17 00:00:00 2001 From: Padreug Date: Mon, 27 Apr 2026 17:51:33 +0200 Subject: [PATCH] fix: support demo login in standalone apps Standalone apps now conditionally load LoginDemo.vue when VITE_DEMO_MODE=true, matching the main app's behavior. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/accounting-app/app.ts | 4 +++- src/activities-app/app.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/accounting-app/app.ts b/src/accounting-app/app.ts index 6bcf423..bdf83e4 100644 --- a/src/accounting-app/app.ts +++ b/src/accounting-app/app.ts @@ -64,7 +64,9 @@ export async function createAppInstance() { { path: '/login', name: 'login', - component: () => import('@/pages/Login.vue'), + component: import.meta.env.VITE_DEMO_MODE === 'true' + ? () => import('@/pages/LoginDemo.vue') + : () => import('@/pages/Login.vue'), meta: { requiresAuth: false } }, ...moduleRoutes, diff --git a/src/activities-app/app.ts b/src/activities-app/app.ts index 77da27d..918ed38 100644 --- a/src/activities-app/app.ts +++ b/src/activities-app/app.ts @@ -60,7 +60,9 @@ export async function createAppInstance() { { path: '/login', name: 'login', - component: () => import('@/pages/Login.vue'), + component: import.meta.env.VITE_DEMO_MODE === 'true' + ? () => import('@/pages/LoginDemo.vue') + : () => import('@/pages/Login.vue'), meta: { requiresAuth: false } }, ...moduleRoutes,