replace footer with about & logo credits

This commit is contained in:
f43nd1r 2018-11-16 02:09:56 +01:00
parent 4850912d4a
commit a2f0ba1984
5 changed files with 30 additions and 13 deletions

View file

@ -1,6 +1,10 @@
[![Build Status](https://travis-ci.org/F43nd1r/Acrarium.svg?branch=master)](https://travis-ci.org/F43nd1r/Acrarium) [![Build Status](https://travis-ci.org/F43nd1r/Acrarium.svg?branch=master)](https://travis-ci.org/F43nd1r/Acrarium)
# Acrarium (formerly Acra-backend) <h1 align=center>
<img src="src/main/webapp/frontend/logo.png" width=50%>
</h1>
# Acrarium
A Backend for ACRA written in Java using Spring Boot, Vaadin and MySQL A Backend for ACRA written in Java using Spring Boot, Vaadin and MySQL
# Setup # Setup
@ -49,3 +53,7 @@ Binary distributions may contain dependencies licensed under any of the followin
- [LGPL 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt) - [LGPL 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt)
- [EPL 1.0](http://www.eclipse.org/legal/epl-v10.html) - [EPL 1.0](http://www.eclipse.org/legal/epl-v10.html)
- [MPL 1.1](https://www.mozilla.org/en-US/MPL/1.1/) - [MPL 1.1](https://www.mozilla.org/en-US/MPL/1.1/)
# Credits
Thanks to [Mirza Zulfan](https://github.com/mirzazulfan) for creating the logo.

View file

@ -141,6 +141,7 @@ public class Popup extends Dialog {
} }
}); });
FormLayout layout = new FormLayout(); FormLayout layout = new FormLayout();
layout.setResponsiveSteps(new FormLayout.ResponsiveStep("0px", 1));
components.forEach(c -> layout.addFormItem(c, "")); components.forEach(c -> layout.addFormItem(c, ""));
checkValid(); checkValid();
removeAll(); removeAll();

View file

@ -5,6 +5,7 @@ import com.faendir.acra.model.User;
import com.faendir.acra.security.SecurityUtils; import com.faendir.acra.security.SecurityUtils;
import com.faendir.acra.ui.base.ParentLayout; import com.faendir.acra.ui.base.ParentLayout;
import com.faendir.acra.ui.base.Path; import com.faendir.acra.ui.base.Path;
import com.faendir.acra.ui.base.popup.Popup;
import com.faendir.acra.ui.component.DropdownMenu; import com.faendir.acra.ui.component.DropdownMenu;
import com.faendir.acra.ui.component.FlexLayout; import com.faendir.acra.ui.component.FlexLayout;
import com.faendir.acra.ui.component.Translatable; import com.faendir.acra.ui.component.Translatable;
@ -77,7 +78,14 @@ public class MainView extends ParentLayout {
Translatable<Button> logout = Translatable.createButton(e -> logout(), Messages.LOGOUT); Translatable<Button> logout = Translatable.createButton(e -> logout(), Messages.LOGOUT);
logout.getElement().setAttribute("theme", "tertiary"); logout.getElement().setAttribute("theme", "tertiary");
logout.setDefaultTextStyle(); logout.setDefaultTextStyle();
DropdownMenu menu = new DropdownMenu(new FormLayout(darkTheme, userManager, changePassword, logout)); Translatable<Button> about = Translatable.createButton(e -> {
Div content = new Div();
content.getElement().setProperty("innerHTML", getTranslation(Messages.FOOTER));
new Popup().addComponent(content).addCloseButton().show();
}, Messages.ABOUT);
about.getElement().setAttribute("theme", "tertiary");
about.setDefaultTextStyle();
DropdownMenu menu = new DropdownMenu(new FormLayout(darkTheme, userManager, changePassword, logout, about));
menu.getStyle().set("margin", "1rem"); menu.getStyle().set("margin", "1rem");
menu.setLabel(SecurityUtils.getUsername()); menu.setLabel(SecurityUtils.getUsername());
menu.setMinWidth(130, Unit.PIXEL); menu.setMinWidth(130, Unit.PIXEL);
@ -88,10 +96,8 @@ public class MainView extends ParentLayout {
header.setWidthFull(); header.setWidthFull();
header.getStyle().set("box-shadow", "0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23)"); header.getStyle().set("box-shadow", "0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23)");
header.getStyle().set("border-radius", "2px"); header.getStyle().set("border-radius", "2px");
Div footer = new Div();
footer.getElement().setProperty("innerHTML", getTranslation(Messages.FOOTER));
removeAll(); removeAll();
add(header, layout, footer); add(header, layout);
} }
private void showLogin() { private void showLogin() {

View file

@ -125,8 +125,9 @@ loginFailed=Unbekannte Kombination aus Nutzername und Passwort
missingRole=Fehlende benötigte Rolle missingRole=Fehlende benötigte Rolle
darkTheme=Dunkles Thema darkTheme=Dunkles Thema
logout=Logout logout=Logout
footer=Acrarium wird entwickelt von <a href=https://github.com/F43nd1r>F43nd1r</a>. Der <a href=https://github.com/F43nd1r/acra-backend>Code</a> ist lizensiert unter <a href=https://github.com/F43nd1r/acra-backend/blob/master/LICENSE>Apache License v2</a>. footer=Acrarium wird entwickelt von <a href=https://github.com/F43nd1r>F43nd1r</a>. Der <a href=https://github.com/F43nd1r/acra-backend>Code</a> ist lizensiert unter <a href=https://github.com/F43nd1r/acra-backend/blob/master/LICENSE>Apache License v2</a>. Logo von <a href=https://github.com/mirzazulfan>Mirza Zulfan</a>.
blank= blank=
login=Login login=Login
oneArg=%s oneArg=%s
api=API-Zugriff api=API-Zugriff
about=Info

View file

@ -125,8 +125,9 @@ loginFailed=Unknown username/password combination
missingRole=Missing required role missingRole=Missing required role
darkTheme=Dark Theme darkTheme=Dark Theme
logout=Logout logout=Logout
footer=Acrarium is developed by <a href=https://github.com/F43nd1r>F43nd1r</a>. <a href=https://github.com/F43nd1r/acra-backend>Code</a> is licensed under <a href=https://github.com/F43nd1r/acra-backend/blob/master/LICENSE>Apache License v2</a>. footer=Acrarium is developed by <a href=https://github.com/F43nd1r>F43nd1r</a>. <a href=https://github.com/F43nd1r/acra-backend>Code</a> is licensed under <a href=https://github.com/F43nd1r/acra-backend/blob/master/LICENSE>Apache License v2</a>. Logo by <a href=https://github.com/mirzazulfan>Mirza Zulfan</a>.
blank= blank=
login=Login login=Login
oneArg=%s oneArg=%s
api=API Access api=API Access
about=About