|
@ -9,6 +9,7 @@ import com.vaadin.flow.component.html.Footer; |
|
|
import com.vaadin.flow.component.html.H2; |
|
|
import com.vaadin.flow.component.html.H2; |
|
|
import com.vaadin.flow.component.html.Image; |
|
|
import com.vaadin.flow.component.html.Image; |
|
|
import com.vaadin.flow.component.html.Span; |
|
|
import com.vaadin.flow.component.html.Span; |
|
|
|
|
|
import com.vaadin.flow.component.icon.VaadinIcon; |
|
|
import com.vaadin.flow.component.orderedlayout.FlexComponent; |
|
|
import com.vaadin.flow.component.orderedlayout.FlexComponent; |
|
|
import com.vaadin.flow.component.orderedlayout.HorizontalLayout; |
|
|
import com.vaadin.flow.component.orderedlayout.HorizontalLayout; |
|
|
import com.vaadin.flow.component.orderedlayout.Scroller; |
|
|
import com.vaadin.flow.component.orderedlayout.Scroller; |
|
@ -52,9 +53,12 @@ public class MainLayout extends AppLayout { |
|
|
viewTitle.addClassNames(LumoUtility.FontSize.LARGE, LumoUtility.Margin.NONE); |
|
|
viewTitle.addClassNames(LumoUtility.FontSize.LARGE, LumoUtility.Margin.NONE); |
|
|
|
|
|
|
|
|
String u = securityService.getAuthenticatedUser(); |
|
|
String u = securityService.getAuthenticatedUser(); |
|
|
Span usrNameLabel = new Span("Hola " + u); |
|
|
|
|
|
|
|
|
Span usrNameLabel = new Span("Hola 👉 " + u); |
|
|
|
|
|
usrNameLabel.getStyle().set("color", "#691b31"); |
|
|
|
|
|
usrNameLabel.getStyle().set("font-weight", "bold"); |
|
|
|
|
|
usrNameLabel.getStyle().set("font-size", "20px"); |
|
|
|
|
|
|
|
|
Button logoutButton = new Button("Cerrar sesión", event -> { |
|
|
|
|
|
|
|
|
Button logoutButton = new Button("Cerrar sesión", VaadinIcon.SIGN_OUT.create(), event -> { |
|
|
securityService.logout(); |
|
|
securityService.logout(); |
|
|
}); |
|
|
}); |
|
|
logoutButton.getStyle().set("margin-right", "50px"); |
|
|
logoutButton.getStyle().set("margin-right", "50px"); |
|
@ -83,7 +87,7 @@ public class MainLayout extends AppLayout { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Scroller scroller = new Scroller(createNavigation()); |
|
|
Scroller scroller = new Scroller(createNavigation()); |
|
|
scroller.getStyle().set("background-color", "#691b31"); |
|
|
|
|
|
|
|
|
scroller.getStyle().set("background-image", "url('images/fondopay.png')"); |
|
|
|
|
|
|
|
|
addToDrawer(headerLayout, scroller, createFooter()); |
|
|
addToDrawer(headerLayout, scroller, createFooter()); |
|
|
} |
|
|
} |
|
@ -99,7 +103,7 @@ public class MainLayout extends AppLayout { |
|
|
nav.getStyle().set("background-position", "center"); // Centra la imagen |
|
|
nav.getStyle().set("background-position", "center"); // Centra la imagen |
|
|
nav.getStyle().set("background-color", "white"); |
|
|
nav.getStyle().set("background-color", "white"); |
|
|
nav.getStyle().set("border-radius", "5px"); |
|
|
nav.getStyle().set("border-radius", "5px"); |
|
|
nav.getStyle().set("opacity", "0.9"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return nav; |
|
|
return nav; |
|
|
} |
|
|
} |
|
|