add version in login page
All checks were successful
Builder / Build-Project (push) Successful in 2m47s
All checks were successful
Builder / Build-Project (push) Successful in 2m47s
This commit is contained in:
parent
b9320a3d6a
commit
50fd791449
Binary file not shown.
@ -2,6 +2,7 @@ package com.primefactorsolutions.views;
|
||||
|
||||
import com.vaadin.flow.component.html.Anchor;
|
||||
import com.vaadin.flow.component.html.H1;
|
||||
import com.vaadin.flow.component.html.Span;
|
||||
import com.vaadin.flow.component.login.LoginForm;
|
||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||
import com.vaadin.flow.router.BeforeEnterEvent;
|
||||
@ -9,6 +10,9 @@ import com.vaadin.flow.router.BeforeEnterObserver;
|
||||
import com.vaadin.flow.router.PageTitle;
|
||||
import com.vaadin.flow.router.Route;
|
||||
import com.vaadin.flow.server.auth.AnonymousAllowed;
|
||||
import com.vaadin.flow.theme.lumo.LumoUtility;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
@Route("login")
|
||||
@PageTitle("PFS Intra")
|
||||
@ -17,7 +21,7 @@ public class LoginView extends VerticalLayout implements BeforeEnterObserver {
|
||||
|
||||
private final LoginForm login = new LoginForm();
|
||||
|
||||
public LoginView() {
|
||||
public LoginView(@Autowired @Value("${git.commit.id.abbrev}") final String commitId) {
|
||||
addClassName("login-view");
|
||||
setSizeFull();
|
||||
setAlignItems(Alignment.CENTER);
|
||||
@ -29,6 +33,10 @@ public class LoginView extends VerticalLayout implements BeforeEnterObserver {
|
||||
add(new H1("PFS Intra"));
|
||||
add(login);
|
||||
add(new Anchor("/password-recovery", "Reset password?"));
|
||||
|
||||
final Span version = new Span(String.format("v.%s", commitId));
|
||||
version.addClassName(LumoUtility.FontSize.XSMALL);
|
||||
add(version);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user