Task: Fixed server routes loop and add server layout for vaadin flow backend from java code design and rename theme name to fusion and updated the views and add mock users for show data grid and fixed all views
This commit is contained in:
@@ -9,6 +9,9 @@ const { serverSideRoutes } = new Flow({
|
||||
imports: () => import('../target/frontend/generated-flow-imports'),
|
||||
});
|
||||
|
||||
|
||||
console.log("serverSideRoutes", serverSideRoutes)
|
||||
|
||||
export type ViewRoute = Route & {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
@@ -67,15 +70,6 @@ export const views: ViewRoute[] = [
|
||||
},
|
||||
];
|
||||
export const routes: ViewRoute[] = [
|
||||
{
|
||||
path: '',
|
||||
component: 'main-layout',
|
||||
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',
|
||||
component: 'login-view',
|
||||
@@ -86,4 +80,18 @@ export const routes: ViewRoute[] = [
|
||||
return;
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: 'main-layout',
|
||||
children: [
|
||||
...views,
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: 'server-layout',
|
||||
children: [
|
||||
...serverSideRoutes,
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
10
frontend/views/server-layout.ts
Normal file
10
frontend/views/server-layout.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { html } from 'lit';
|
||||
import { customElement } from 'lit/decorators.js';
|
||||
import {Layout} from "./view";
|
||||
|
||||
@customElement('server-layout')
|
||||
export class AdminView extends Layout {
|
||||
render() {
|
||||
return html`<><slot></slot></>`;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user