forked from meissa/ModeratorElection
Fix in logic, further documentation in dev_notes
This commit is contained in:
parent
6900a54157
commit
afb0f46545
2 changed files with 8 additions and 6 deletions
|
@ -2,9 +2,12 @@
|
|||
|
||||
```
|
||||
HowTo BUILD jar?
|
||||
local: ./gradle build
|
||||
|
||||
Failed within local: ./gradle build
|
||||
java -jar build/libs/ModeratorElection.jar -> localhost:6333 "White Label..."-Error
|
||||
https://docs.gradle.org/current/userguide/gradle_wrapper.html
|
||||
|
||||
=> ./gradlew clean build -Pvaadin.productionMode
|
||||
..in ide dev: ./gradlew clean vaadinPrepareFrontend
|
||||
```
|
||||
|
||||
```
|
||||
|
|
|
@ -38,8 +38,9 @@ public class MainView extends VerticalLayout {
|
|||
|
||||
Button electNow = new Button("Elect!", buttonClickEvent -> {
|
||||
try {
|
||||
ArrayList checkboxSelectedMembers = new ArrayList(checkboxGroup.getSelectedItems());
|
||||
Notification moderatorNotification = new Notification()
|
||||
.show("Nächster Moderator: " + electMember(selectMemberItemsNameslist));
|
||||
.show("Nächster Moderator: " + electMember(checkboxSelectedMembers));
|
||||
moderatorNotification.setPosition(Notification.Position.BOTTOM_CENTER);
|
||||
} catch(Exception exceptionEvent) {
|
||||
Notification errorNotification = new Notification();
|
||||
|
@ -50,9 +51,7 @@ public class MainView extends VerticalLayout {
|
|||
Button closeButton = new Button(new Icon("lumo", "cross"));
|
||||
closeButton.addThemeVariants(ButtonVariant.LUMO_TERTIARY_INLINE);
|
||||
closeButton.setAriaLabel("Close");
|
||||
closeButton.addClickListener(closeButtonEvent -> {
|
||||
errorNotification.close();
|
||||
});
|
||||
closeButton.addClickListener(closeButtonEvent -> errorNotification.close());
|
||||
|
||||
HorizontalLayout layout = new HorizontalLayout(text, closeButton);
|
||||
layout.setAlignItems(Alignment.CENTER);
|
||||
|
|
Loading…
Reference in a new issue