Compare commits
2 Commits
64a6023b77
...
05e6fe2447
Author | SHA1 | Date | |
---|---|---|---|
05e6fe2447 | |||
85b1573391 |
@ -1,9 +1,14 @@
|
|||||||
|
import { Flow } from "@vaadin/flow-frontend";
|
||||||
import { Route } from '@vaadin/router';
|
import { Route } from '@vaadin/router';
|
||||||
import Role from './generated/com/cubetiqs/fusion/data/Role';
|
import Role from './generated/com/cubetiqs/fusion/data/Role';
|
||||||
import { appStore } from './stores/app-store';
|
import { appStore } from './stores/app-store';
|
||||||
import './views/home/home-view';
|
import './views/home/home-view';
|
||||||
import './views/main-layout';
|
import './views/main-layout';
|
||||||
|
|
||||||
|
const { serverSideRoutes } = new Flow({
|
||||||
|
imports: () => import('../target/frontend/generated-flow-imports'),
|
||||||
|
});
|
||||||
|
|
||||||
export type ViewRoute = Route & {
|
export type ViewRoute = Route & {
|
||||||
title?: string;
|
title?: string;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
@ -65,7 +70,11 @@ export const routes: ViewRoute[] = [
|
|||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: 'main-layout',
|
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',
|
path: 'login',
|
||||||
|
@ -30,7 +30,7 @@ export class LoginView extends View {
|
|||||||
action="login"
|
action="login"
|
||||||
no-forgot-password
|
no-forgot-password
|
||||||
.i18n=${Object.assign(
|
.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
|
loginI18nDefault
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
@ -90,6 +90,8 @@
|
|||||||
},
|
},
|
||||||
"vaadin": {
|
"vaadin": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@adobe/lit-mobx": "2.0.0-rc.4",
|
||||||
|
"@fontsource/roboto": "4.5.0",
|
||||||
"@polymer/iron-icon": "3.0.1",
|
"@polymer/iron-icon": "3.0.1",
|
||||||
"@polymer/iron-list": "3.1.0",
|
"@polymer/iron-list": "3.1.0",
|
||||||
"@polymer/polymer": "3.2.0",
|
"@polymer/polymer": "3.2.0",
|
||||||
@ -139,7 +141,9 @@
|
|||||||
"@vaadin/vaadin-upload": "21.0.0-alpha13",
|
"@vaadin/vaadin-upload": "21.0.0-alpha13",
|
||||||
"@vaadin/vaadin-virtual-list": "21.0.0-alpha13",
|
"@vaadin/vaadin-virtual-list": "21.0.0-alpha13",
|
||||||
"construct-style-sheets-polyfill": "2.4.16",
|
"construct-style-sheets-polyfill": "2.4.16",
|
||||||
"lit": "2.0.0-rc.1"
|
"line-awesome": "1.3.0",
|
||||||
|
"lit": "2.0.0-rc.1",
|
||||||
|
"mobx": "^6.1.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/validator": "13.1.0",
|
"@types/validator": "13.1.0",
|
||||||
|
4
pom.xml
4
pom.xml
@ -106,7 +106,6 @@
|
|||||||
<artifactId>a-vaadin-helper</artifactId>
|
<artifactId>a-vaadin-helper</artifactId>
|
||||||
<version>1.7.1</version>
|
<version>1.7.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.vaadin.artur.exampledata</groupId>
|
<groupId>org.vaadin.artur.exampledata</groupId>
|
||||||
<artifactId>exampledata</artifactId>
|
<artifactId>exampledata</artifactId>
|
||||||
@ -118,11 +117,11 @@
|
|||||||
<artifactId>h2</artifactId>
|
<artifactId>h2</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Spring and Frameworks-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-validation</artifactId>
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
@ -133,6 +132,7 @@
|
|||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Test Framework-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
@ -33,6 +33,9 @@ public class SecurityConfiguration extends VaadinWebSecurityConfigurerAdapter {
|
|||||||
@Override
|
@Override
|
||||||
public void configure(WebSecurity web) throws Exception {
|
public void configure(WebSecurity web) throws Exception {
|
||||||
super.configure(web);
|
super.configure(web);
|
||||||
web.ignoring().antMatchers("/images/logo.png");
|
web.ignoring()
|
||||||
|
.antMatchers(
|
||||||
|
"/images/logo.png"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,22 @@
|
|||||||
package com.cubetiqs.fusion
|
package com.cubetiqs.fusion
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
import com.vaadin.flow.component.dependency.NpmPackage
|
||||||
import com.vaadin.flow.server.PWA
|
|
||||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
|
|
||||||
import com.vaadin.flow.component.page.AppShellConfigurator
|
import com.vaadin.flow.component.page.AppShellConfigurator
|
||||||
|
import com.vaadin.flow.server.PWA
|
||||||
import com.vaadin.flow.theme.Theme
|
import com.vaadin.flow.theme.Theme
|
||||||
import org.springframework.boot.SpringApplication
|
import org.springframework.boot.SpringApplication
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||||
|
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@Theme(value = "fusionmanagement")
|
@Theme(value = "fusionmanagement")
|
||||||
@PWA(name = "Fusion Management", shortName = "Fusion Management", offlineResources = ["images/logo.png"])
|
@PWA(name = "Fusion Management", shortName = "Fusion Management", offlineResources = ["images/logo.png"])
|
||||||
|
@NpmPackage.Container(
|
||||||
|
NpmPackage(value = "@fontsource/roboto", version = "4.5.0"),
|
||||||
|
NpmPackage(value = "@adobe/lit-mobx", version = "2.0.0-rc.4"),
|
||||||
|
NpmPackage(value = "mobx", version = "^6.1.5"),
|
||||||
|
NpmPackage(value = "line-awesome", version = "1.3.0"),
|
||||||
|
)
|
||||||
class Application : SpringBootServletInitializer(), AppShellConfigurator
|
class Application : SpringBootServletInitializer(), AppShellConfigurator
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
package com.cubetiqs.fusion.config
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Configuration
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
class DefaultConfig
|
5
src/main/kotlin/com/cubetiqs/fusion/frontend/MainView.kt
Normal file
5
src/main/kotlin/com/cubetiqs/fusion/frontend/MainView.kt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package com.cubetiqs.fusion.frontend
|
||||||
|
|
||||||
|
import com.vaadin.flow.component.UI
|
||||||
|
|
||||||
|
class MainView : UI()
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.cubetiqs.fusion.frontend.views.test
|
||||||
|
|
||||||
|
import com.vaadin.flow.component.html.Div
|
||||||
|
import com.vaadin.flow.router.Route
|
||||||
|
|
||||||
|
@Route("/views/test")
|
||||||
|
class TestView : Div() {
|
||||||
|
init {
|
||||||
|
add("Hello World")
|
||||||
|
}
|
||||||
|
}
|
@ -3,7 +3,8 @@ server:
|
|||||||
|
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
org.atmosphere: warn
|
org:
|
||||||
|
atmosphere: warn
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
mustache:
|
mustache:
|
||||||
|
Loading…
Reference in New Issue
Block a user