diff --git a/src/main/java/org/cryptomator/ui/health/CheckDetailController.java b/src/main/java/org/cryptomator/ui/health/CheckDetailController.java index 6e7e50200..8224cc2a9 100644 --- a/src/main/java/org/cryptomator/ui/health/CheckDetailController.java +++ b/src/main/java/org/cryptomator/ui/health/CheckDetailController.java @@ -34,6 +34,7 @@ public class CheckDetailController implements FxController { private final Binding checkCancelled; private final Binding countOfWarnSeverity; private final Binding countOfCritSeverity; + private final Binding warnOrCritsExist; private final ResultListCellFactory resultListCellFactory; public CheckStateIconView checkStateIconView; @@ -56,6 +57,7 @@ public class CheckDetailController implements FxController { this.checkFinished = EasyBind.combine(checkSucceeded, checkFailed, checkCancelled, (a, b, c) -> a || b || c); this.countOfWarnSeverity = results.reduce(countSeverity(DiagnosticResult.Severity.WARN)); this.countOfCritSeverity = results.reduce(countSeverity(DiagnosticResult.Severity.CRITICAL)); + this.warnOrCritsExist = EasyBind.combine(checkSucceeded, countOfWarnSeverity, countOfCritSeverity, (suceeded, warns, crits) -> suceeded && (warns.longValue() > 0 || crits.longValue() > 0) ); selectedTask.addListener(this::selectedTaskChanged); } @@ -156,6 +158,14 @@ public class CheckDetailController implements FxController { return checkCancelled.getValue(); } + public Binding warnOrCritsExistProperty() { + return warnOrCritsExist; + } + + public boolean isWarnOrCritsExist() { + return warnOrCritsExist.getValue(); + } + public Binding checkCancelledProperty() { return checkCancelled; } diff --git a/src/main/java/org/cryptomator/ui/health/CheckListController.java b/src/main/java/org/cryptomator/ui/health/CheckListController.java index 38fa73e51..daeaf3667 100644 --- a/src/main/java/org/cryptomator/ui/health/CheckListController.java +++ b/src/main/java/org/cryptomator/ui/health/CheckListController.java @@ -19,6 +19,7 @@ import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.control.CheckBox; import javafx.scene.control.ListView; +import javafx.scene.control.SelectionMode; import javafx.stage.Stage; import java.io.IOException; import java.util.List; @@ -60,6 +61,7 @@ public class CheckListController implements FxController { @FXML public void initialize() { + checksListView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE); checksListView.setItems(checks); checksListView.setCellFactory(view -> new CheckListCell()); selectedCheck.bind(checksListView.getSelectionModel().selectedItemProperty()); diff --git a/src/main/resources/fxml/health_check_details.fxml b/src/main/resources/fxml/health_check_details.fxml index 03c6732bd..1fab3a069 100644 --- a/src/main/resources/fxml/health_check_details.fxml +++ b/src/main/resources/fxml/health_check_details.fxml @@ -20,9 +20,8 @@