From b0729ea23d14e8f5d0cde33712068743c96cdf24 Mon Sep 17 00:00:00 2001 From: Padreug Date: Sat, 25 Apr 2026 16:39:55 +0200 Subject: [PATCH] Add demo login page behind VITE_DEMO_MODE feature flag Restores LoginDemo.vue from the demo-login branch. When VITE_DEMO_MODE=true, the main app uses LoginDemo.vue which allows instant demo account creation with auto-generated credentials. Production deployments are unaffected (flag defaults to false). Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app.ts | 4 +- src/pages/LoginDemo.vue | 231 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 234 insertions(+), 1 deletion(-) create mode 100644 src/pages/LoginDemo.vue diff --git a/src/app.ts b/src/app.ts index 7aa5452..d5281b5 100644 --- a/src/app.ts +++ b/src/app.ts @@ -66,7 +66,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 } }, // Pre-register module routes diff --git a/src/pages/LoginDemo.vue b/src/pages/LoginDemo.vue new file mode 100644 index 0000000..f90aaa7 --- /dev/null +++ b/src/pages/LoginDemo.vue @@ -0,0 +1,231 @@ + + +