Task: Add Hybrid for Vaadin Fusion and Flow together, but have some issues with Login recursively routes
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
import { Flow } from "@vaadin/flow-frontend";
|
||||
import { Route } from '@vaadin/router';
|
||||
import Role from './generated/com/cubetiqs/fusion/data/Role';
|
||||
import { appStore } from './stores/app-store';
|
||||
import './views/home/home-view';
|
||||
import './views/main-layout';
|
||||
|
||||
const { serverSideRoutes } = new Flow({
|
||||
imports: () => import('../target/frontend/generated-flow-imports'),
|
||||
});
|
||||
|
||||
export type ViewRoute = Route & {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
@@ -65,7 +70,11 @@ export const routes: ViewRoute[] = [
|
||||
{
|
||||
path: '',
|
||||
component: 'main-layout',
|
||||
children: [...views],
|
||||
children: [
|
||||
...views,
|
||||
// for server-side, the next magic line sends all unmatched routes:
|
||||
...serverSideRoutes, // IMPORTANT: this must be the last entry in the array
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
|
||||
@@ -30,7 +30,7 @@ export class LoginView extends View {
|
||||
action="login"
|
||||
no-forgot-password
|
||||
.i18n=${Object.assign(
|
||||
{ header: { title: 'Fusion Management', description: 'Login using user/user or admin/admin' } },
|
||||
{ header: { title: 'Fusion', description: 'Login using user/user or admin/admin' } },
|
||||
loginI18nDefault
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user