use of de.catma.ui.module.main.login.AuthenticationDialog in project catma by forTEXT.
the class NotLoggedInMainView method initComponents.
private void initComponents() {
setSizeFull();
setAlignItems(AlignItems.CENTER);
addStyleName("home");
HorizontalFlexLayout menuLayout = new HorizontalFlexLayout();
menuLayout.setWidth("100%");
menuLayout.setJustifyContent(JustifyContent.FLEX_END);
menuLayout.setAlignItems(AlignItems.CENTER);
menuLayout.addStyleName("home__menu");
// $NON-NLS-1$
menuLayout.setWidth("100%");
addComponent(menuLayout);
Link aboutLink = new Link("About", new ExternalResource(CATMAPropertyKey.AboutURL.getValue(CATMAPropertyKey.AboutURL.getDefaultValue())));
// $NON-NLS-1$
aboutLink.setTargetName("_blank");
menuLayout.addComponent(aboutLink);
Link imprintLink = new Link("Imprint", new ExternalResource(CATMAPropertyKey.ImprintURL.getValue(CATMAPropertyKey.ImprintURL.getDefaultValue())));
imprintLink.setTargetName("_blank");
menuLayout.addComponent(imprintLink);
Link termsOfUseLink = new Link("Terms of Use", new ExternalResource(CATMAPropertyKey.TermsOfUseURL.getValue(CATMAPropertyKey.TermsOfUseURL.getDefaultValue())));
// $NON-NLS-1$
termsOfUseLink.setTargetName("_blank");
menuLayout.addComponent(termsOfUseLink);
Link privacyLink = new Link("Privacy Policy", new ExternalResource(CATMAPropertyKey.PrivacyPolicyURL.getValue(CATMAPropertyKey.PrivacyPolicyURL.getDefaultValue())));
privacyLink.setTargetName("_blank");
menuLayout.addComponent(privacyLink);
statusLink = new Link("Status", new ExternalResource(CATMAPropertyKey.StatusURL.getValue(CATMAPropertyKey.StatusURL.getDefaultValue())));
statusLink.setTargetName("_blank");
menuLayout.addComponent(statusLink);
IconButton btHelp = new IconButton(VaadinIcons.QUESTION_CIRCLE, click -> {
if (uiHelpWindow.getParent() == null) {
UI.getCurrent().addWindow(uiHelpWindow);
} else {
UI.getCurrent().removeWindow(uiHelpWindow);
}
});
menuLayout.addComponent(btHelp);
VerticalFlexLayout contentPanel = new VerticalFlexLayout();
// $NON-NLS-1$
contentPanel.setHeight("100%");
// $NON-NLS-1$
contentPanel.addStyleName("home__content");
// $NON-NLS-1$
ThemeResource logoResource = new ThemeResource("catma-tailright-final-cmyk.svg");
Image logoImage = new Image(null, logoResource);
logoImage.setStyleName("not-logged-in-main-view-logo");
contentPanel.addComponent(logoImage);
noticePanelVerticalLayout = new VerticalLayout();
noticePanelVerticalLayout.addStyleName("vlayout");
HorizontalFlexLayout noticePanel = new HorizontalFlexLayout(noticePanelVerticalLayout);
noticePanel.addStyleName("not-logged-in-main-view-noticepanel");
noticePanel.setJustifyContent(JustifyContent.CENTER);
contentPanel.addComponent(noticePanel);
renderNotices();
LabelButton btn_signup = new LabelButton("Sign up", event -> new SignUpDialog("Sign Up").show());
LabelButton btn_login = new LabelButton("Sign in", event -> new AuthenticationDialog("Sign In", CATMAPropertyKey.BaseURL.getValue(CATMAPropertyKey.BaseURL.getDefaultValue()), loginService, initService, hazelCastService, sqliteService, eventBus).show());
Link newsLetterLink = new Link("Newsletter", new ExternalResource("https://catma.de/newsletter/"));
newsLetterLink.setTargetName("_blank");
newsLetterLink.addStyleName("button__label");
HorizontalFlexLayout buttonPanel = new HorizontalFlexLayout(btn_signup, btn_login, newsLetterLink);
buttonPanel.addStyleName("home__content__btns");
buttonPanel.setJustifyContent(JustifyContent.CENTER);
contentPanel.addComponent(buttonPanel);
addComponent(contentPanel);
HorizontalFlexLayout bottomPanel = new HorizontalFlexLayout();
bottomPanel.addStyleName("not-logged-in-main-view-fortext-bottom-panel");
addComponent(bottomPanel);
Link fortextButton = new Link("", new ExternalResource("https://fortext.net"));
fortextButton.setIcon(new ThemeResource("fortext_logo.png"));
fortextButton.setTargetName("_blank");
fortextButton.addStyleName("not-logged-in-main-view-fortext-button");
Label fortextLabel = new Label("developed and maintained</br>in cooperation with");
fortextLabel.setContentMode(ContentMode.HTML);
fortextLabel.addStyleName("not-logged-in-main-view-fortext-label");
bottomPanel.addComponent(fortextLabel);
bottomPanel.addComponent(fortextButton);
}
Aggregations