瀏覽代碼

Add introductory screen to check view if main run is not started

Armin Schrenk 4 年之前
父節點
當前提交
102ab93dbd

+ 7 - 4
src/main/java/org/cryptomator/ui/health/CheckListController.java

@@ -68,10 +68,13 @@ public class CheckListController implements FxController {
 	}
 
 	@FXML
-	public void toggleSelectAll(ActionEvent event) {
-		if (event.getSource() instanceof CheckBox c) {
-			checks.forEach(t -> t.chosenForExecutionProperty().set(c.isSelected()));
-		}
+	public void selectAllChecks() {
+		checks.forEach(t -> t.chosenForExecutionProperty().set(true));
+	}
+
+	@FXML
+	public void deselectAllChecks() {
+		checks.forEach(t -> t.chosenForExecutionProperty().set(false));
 	}
 
 	@FXML

+ 5 - 4
src/main/resources/fxml/health_check_list.fxml

@@ -24,10 +24,11 @@
 	</fx:define>
 	<children>
 		<HBox spacing="12" VBox.vgrow="ALWAYS">
-			<VBox minWidth="80" maxWidth="200" spacing="6" HBox.hgrow="ALWAYS" >
-				<Label fx:id="listHeading" text="%health.checkList.header"/>
-				<CheckBox onAction="#toggleSelectAll" text="%health.checkList.selectAllBox" visible="${!controller.mainRunStarted}" managed="${!controller.mainRunStarted}" />
-				<ListView fx:id="checksListView" VBox.vgrow="ALWAYS" minWidth="150"/>
+			<ListView fx:id="checksListView" VBox.vgrow="ALWAYS" prefWidth="175"/>
+			<VBox alignment="CENTER" visible="${!controller.mainRunStarted}"  managed="${!controller.mainRunStarted}" HBox.hgrow="ALWAYS">
+				<Label text="TODO: Introductory/Explanatory Text? "/>
+				<Button onAction="#selectAllChecks" text="%health.checkList.selectAllBox" />
+				<Button onAction="#deselectAllChecks" text="TODO:Deselect all Checks" />
 			</VBox>
 			<StackPane visible="${controller.mainRunStarted}"  managed="${controller.mainRunStarted}" HBox.hgrow="ALWAYS">
 				<VBox minWidth="300" alignment="CENTER" visible="${!controller.anyCheckSelected}" managed="${!controller.anyCheckSelected}" >

+ 0 - 3
src/main/resources/i18n/strings.properties

@@ -148,9 +148,6 @@ migration.impossible.moreInfo=The vault can still be opened with an older versio
 
 # Health Check
 health.title=Health Check of \"%s\"
-health.start.configValid=Reading and parsing vault configuration file was successful. Proceed to select checks.
-health.start.configInvalid=Error while reading and parsing the vault configuration file.
-health.checkList.header=Available Health Checks
 health.checkList.selectAllBox=Select All
 health.check.runBatchBtn=Run Selected Checks
 ## Detail view