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) <noreply@anthropic.com>
This commit is contained in:
parent
1edea25862
commit
38492ad592
2 changed files with 6 additions and 2 deletions
|
|
@ -64,7 +64,9 @@ export async function createAppInstance() {
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
name: '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 }
|
meta: { requiresAuth: false }
|
||||||
},
|
},
|
||||||
...moduleRoutes,
|
...moduleRoutes,
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,9 @@ export async function createAppInstance() {
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
name: '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 }
|
meta: { requiresAuth: false }
|
||||||
},
|
},
|
||||||
...moduleRoutes,
|
...moduleRoutes,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue