updated vaadin version
All checks were successful
Builder / Build-Project (push) Successful in 2m36s
All checks were successful
Builder / Build-Project (push) Successful in 2m36s
This commit is contained in:
parent
82232d23c7
commit
6dfa5c0ec2
1498
package-lock.json
generated
1498
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
42
package.json
42
package.json
@ -6,22 +6,22 @@
|
||||
"@f0rce/ace-widget": "1.0.2",
|
||||
"@polymer/polymer": "3.5.1",
|
||||
"@vaadin-component-factory/vcf-pdf-viewer": "2.0.1",
|
||||
"@vaadin/bundles": "24.4.2",
|
||||
"@vaadin/bundles": "24.5.1",
|
||||
"@vaadin/common-frontend": "0.0.19",
|
||||
"@vaadin/polymer-legacy-adapter": "24.4.2",
|
||||
"@vaadin/react-components": "24.4.2",
|
||||
"@vaadin/react-components-pro": "24.4.2",
|
||||
"@vaadin/router": "1.7.5",
|
||||
"@vaadin/polymer-legacy-adapter": "24.5.1",
|
||||
"@vaadin/react-components": "24.5.1",
|
||||
"@vaadin/react-components-pro": "24.5.1",
|
||||
"@vaadin/router": "2.0.0",
|
||||
"@vaadin/vaadin-development-mode-detector": "2.0.7",
|
||||
"@vaadin/vaadin-lumo-styles": "24.4.2",
|
||||
"@vaadin/vaadin-material-styles": "24.4.2",
|
||||
"@vaadin/vaadin-themable-mixin": "24.4.2",
|
||||
"@vaadin/vaadin-usage-statistics": "2.1.2",
|
||||
"@vaadin/vaadin-lumo-styles": "24.5.1",
|
||||
"@vaadin/vaadin-material-styles": "24.5.1",
|
||||
"@vaadin/vaadin-themable-mixin": "24.5.1",
|
||||
"@vaadin/vaadin-usage-statistics": "2.1.3",
|
||||
"construct-style-sheets-polyfill": "3.1.0",
|
||||
"date-fns": "2.29.3",
|
||||
"lit": "3.1.4",
|
||||
"print-js": "1.6.0",
|
||||
"proj4": "2.11.0",
|
||||
"proj4": "2.12.1",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1",
|
||||
"react-router-dom": "6.23.1"
|
||||
@ -51,22 +51,22 @@
|
||||
"@f0rce/ace-widget": "1.0.2",
|
||||
"@polymer/polymer": "3.5.1",
|
||||
"@vaadin-component-factory/vcf-pdf-viewer": "2.0.1",
|
||||
"@vaadin/bundles": "24.4.2",
|
||||
"@vaadin/bundles": "24.5.1",
|
||||
"@vaadin/common-frontend": "0.0.19",
|
||||
"@vaadin/polymer-legacy-adapter": "24.4.2",
|
||||
"@vaadin/react-components": "24.4.2",
|
||||
"@vaadin/react-components-pro": "24.4.2",
|
||||
"@vaadin/router": "1.7.5",
|
||||
"@vaadin/polymer-legacy-adapter": "24.5.1",
|
||||
"@vaadin/react-components": "24.5.1",
|
||||
"@vaadin/react-components-pro": "24.5.1",
|
||||
"@vaadin/router": "2.0.0",
|
||||
"@vaadin/vaadin-development-mode-detector": "2.0.7",
|
||||
"@vaadin/vaadin-lumo-styles": "24.4.2",
|
||||
"@vaadin/vaadin-material-styles": "24.4.2",
|
||||
"@vaadin/vaadin-themable-mixin": "24.4.2",
|
||||
"@vaadin/vaadin-usage-statistics": "2.1.2",
|
||||
"@vaadin/vaadin-lumo-styles": "24.5.1",
|
||||
"@vaadin/vaadin-material-styles": "24.5.1",
|
||||
"@vaadin/vaadin-themable-mixin": "24.5.1",
|
||||
"@vaadin/vaadin-usage-statistics": "2.1.3",
|
||||
"construct-style-sheets-polyfill": "3.1.0",
|
||||
"date-fns": "2.29.3",
|
||||
"lit": "3.1.4",
|
||||
"print-js": "1.6.0",
|
||||
"proj4": "2.11.0",
|
||||
"proj4": "2.12.1",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1",
|
||||
"react-router-dom": "6.23.1"
|
||||
@ -91,7 +91,7 @@
|
||||
"workbox-core": "7.1.0",
|
||||
"workbox-precaching": "7.1.0"
|
||||
},
|
||||
"hash": "0962b593830d75a70657cde2e956e8c49b704d39c45bfd150cda9fdac99f1c6e"
|
||||
"hash": "1a0f17d48b329307b5862bc57499307d1b89f7d89260121c2b7189f76957c436"
|
||||
},
|
||||
"overrides": {
|
||||
"@vaadin/bundles": "$@vaadin/bundles",
|
||||
|
7
pom.xml
7
pom.xml
@ -11,7 +11,8 @@
|
||||
|
||||
<properties>
|
||||
<java.version>21</java.version>
|
||||
<vaadin.version>24.4.6</vaadin.version>
|
||||
<vaadin.version>24.5.1</vaadin.version>
|
||||
<vaadin-maven-plugin.version>24.4.6</vaadin-maven-plugin.version>
|
||||
</properties>
|
||||
|
||||
<parent>
|
||||
@ -288,7 +289,7 @@
|
||||
<plugin>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-maven-plugin</artifactId>
|
||||
<version>${vaadin.version}</version>
|
||||
<version>${vaadin-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@ -349,7 +350,7 @@
|
||||
<plugin>
|
||||
<groupId>com.vaadin</groupId>
|
||||
<artifactId>vaadin-maven-plugin</artifactId>
|
||||
<version>${vaadin.version}</version>
|
||||
<version>${vaadin-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
Binary file not shown.
@ -1,6 +1,7 @@
|
||||
package com.primefactorsolutions.views;
|
||||
|
||||
import com.primefactorsolutions.model.Employee;
|
||||
import com.vaadin.flow.component.Component;
|
||||
import com.vaadin.flow.component.Text;
|
||||
import com.vaadin.flow.component.applayout.AppLayout;
|
||||
import com.vaadin.flow.component.applayout.DrawerToggle;
|
||||
@ -16,7 +17,6 @@ import com.vaadin.flow.component.menubar.MenuBarVariant;
|
||||
import com.vaadin.flow.component.orderedlayout.FlexComponent;
|
||||
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
|
||||
import com.vaadin.flow.component.orderedlayout.Scroller;
|
||||
import com.vaadin.flow.component.shared.Tooltip;
|
||||
import com.vaadin.flow.component.sidenav.SideNav;
|
||||
import com.vaadin.flow.component.sidenav.SideNavItem;
|
||||
import com.vaadin.flow.router.PageTitle;
|
||||
@ -51,18 +51,6 @@ public class MainLayout extends AppLayout {
|
||||
|
||||
final HorizontalLayout header = authContext.getAuthenticatedUser(UserDetails.class)
|
||||
.map(user -> {
|
||||
final Avatar loggedUser = new Avatar(user.getUsername());
|
||||
loggedUser.getStyle().set("display", "block");
|
||||
loggedUser.getElement().setAttribute("tabindex", "-1");
|
||||
final MenuBar menuBar = new MenuBar();
|
||||
menuBar.addThemeVariants(MenuBarVariant.LUMO_ICON);
|
||||
final MenuItem actions = createIconItem(menuBar, VaadinIcon.ELLIPSIS_V, null, "",
|
||||
false);
|
||||
final SubMenu actionsSubMenu = actions.getSubMenu();
|
||||
final MenuItem signOutMenuItem = createIconItem(actionsSubMenu, VaadinIcon.EXIT, "Sign-out",
|
||||
null, true);
|
||||
signOutMenuItem.addClickListener(c -> this.authContext.logout());
|
||||
|
||||
String employeeId = "N/A";
|
||||
|
||||
if (user instanceof Employee) {
|
||||
@ -73,11 +61,19 @@ public class MainLayout extends AppLayout {
|
||||
}
|
||||
}
|
||||
|
||||
final Tooltip tooltip = Tooltip.forComponent(loggedUser)
|
||||
.withText("Employee id: " + employeeId)
|
||||
.withPosition(Tooltip.TooltipPosition.TOP_START);
|
||||
final Avatar loggedUser = new Avatar(user.getUsername());
|
||||
loggedUser.getStyle().set("display", "block");
|
||||
loggedUser.getElement().setAttribute("tabindex", "-1");
|
||||
|
||||
final HorizontalLayout hl = new HorizontalLayout(loggedUser, menuBar);
|
||||
final MenuBar menuBar = new MenuBar();
|
||||
menuBar.addThemeVariants(MenuBarVariant.LUMO_TERTIARY_INLINE);
|
||||
final MenuItem actions = createIconItem(menuBar, loggedUser, null, employeeId);
|
||||
final SubMenu actionsSubMenu = actions.getSubMenu();
|
||||
final MenuItem signOutMenuItem = createIconItem(actionsSubMenu,
|
||||
createIcon(VaadinIcon.EXIT, true), "Sign-out", null);
|
||||
signOutMenuItem.addClickListener(c -> this.authContext.logout());
|
||||
|
||||
final HorizontalLayout hl = new HorizontalLayout(menuBar);
|
||||
hl.setJustifyContentMode(FlexComponent.JustifyContentMode.END);
|
||||
|
||||
return hl;
|
||||
@ -88,17 +84,9 @@ public class MainLayout extends AppLayout {
|
||||
addToNavbar(true, toggle, viewTitle, header);
|
||||
}
|
||||
|
||||
private MenuItem createIconItem(final HasMenuItems menu, final VaadinIcon iconName,
|
||||
final String label, final String ariaLabel, final boolean isChild) {
|
||||
final Icon icon = new Icon(iconName);
|
||||
|
||||
if (isChild) {
|
||||
icon.getStyle().set("width", "var(--lumo-icon-size-s)");
|
||||
icon.getStyle().set("height", "var(--lumo-icon-size-s)");
|
||||
icon.getStyle().set("marginRight", "var(--lumo-space-s)");
|
||||
}
|
||||
|
||||
final MenuItem item = menu.addItem(icon, e -> {
|
||||
private MenuItem createIconItem(final HasMenuItems menu, final Component component,
|
||||
final String label, final String ariaLabel) {
|
||||
final MenuItem item = menu.addItem(component, e -> {
|
||||
});
|
||||
|
||||
if (ariaLabel != null) {
|
||||
@ -112,6 +100,18 @@ public class MainLayout extends AppLayout {
|
||||
return item;
|
||||
}
|
||||
|
||||
private Icon createIcon(final VaadinIcon iconName, final boolean isChild) {
|
||||
final Icon icon = new Icon(iconName);
|
||||
|
||||
if (isChild) {
|
||||
icon.getStyle().set("width", "var(--lumo-icon-size-s)");
|
||||
icon.getStyle().set("height", "var(--lumo-icon-size-s)");
|
||||
icon.getStyle().set("marginRight", "var(--lumo-space-s)");
|
||||
}
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
||||
private void addDrawerContent() {
|
||||
final Span appName = new Span("pfs-intra");
|
||||
appName.addClassNames(LumoUtility.FontWeight.SEMIBOLD, LumoUtility.FontSize.LARGE);
|
||||
@ -124,8 +124,8 @@ public class MainLayout extends AppLayout {
|
||||
final SideNav nav = new SideNav();
|
||||
|
||||
authContext.getAuthenticatedUser(UserDetails.class).ifPresent(u -> {
|
||||
SideNavItem recruiting = new SideNavItem("Recruiting", MainView.class,
|
||||
LineAwesomeIcon.BUSINESS_TIME_SOLID.create());
|
||||
SideNavItem recruiting = new SideNavItem("Recruiting");
|
||||
recruiting.setPrefixComponent(LineAwesomeIcon.BUSINESS_TIME_SOLID.create());
|
||||
recruiting.addItem(new SideNavItem("Assessments", AssessmentsListView.class,
|
||||
LineAwesomeIcon.RIBBON_SOLID.create()));
|
||||
recruiting.addItem(new SideNavItem("Candidates", CandidatesListView.class,
|
||||
@ -133,8 +133,8 @@ public class MainLayout extends AppLayout {
|
||||
recruiting.addItem(new SideNavItem("Questions", QuestionsListView.class,
|
||||
LineAwesomeIcon.QUESTION_SOLID.create()));
|
||||
|
||||
SideNavItem admin = new SideNavItem("Admin", MainView.class,
|
||||
LineAwesomeIcon.BUILDING.create());
|
||||
SideNavItem admin = new SideNavItem("Admin");
|
||||
admin.setPrefixComponent(LineAwesomeIcon.BUILDING.create());
|
||||
admin.addItem(new SideNavItem("Employees", EmployeesListView.class,
|
||||
LineAwesomeIcon.USER_EDIT_SOLID.create()));
|
||||
admin.addItem(new SideNavItem("Documents", DocumentsListView.class,
|
||||
|
@ -11,6 +11,6 @@ import jakarta.annotation.security.PermitAll;
|
||||
@PermitAll
|
||||
public class MainView extends Main {
|
||||
public MainView() {
|
||||
add(new Text("welcome"));
|
||||
add(new Text("Welcome to PFS Intra."));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user