diff --git a/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/AddVaultModule.java b/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/AddVaultModule.java index 55a278c94..4771b1719 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/AddVaultModule.java +++ b/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/AddVaultModule.java @@ -37,10 +37,10 @@ public abstract class AddVaultModule { @Provides @AddVaultWizard @AddVaultWizardScoped - static Stage provideStage(@MainWindow Stage owner) { + static Stage provideStage(@MainWindow Stage owner, ResourceBundle resourceBundle) { Stage stage = new Stage(); - stage.setMinWidth(500); - stage.setMinHeight(500); + stage.setTitle(resourceBundle.getString("addvaultwizard.title")); + stage.setResizable(false); stage.initStyle(StageStyle.DECORATED); stage.initModality(Modality.WINDOW_MODAL); stage.initOwner(owner); diff --git a/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultPasswordController.java b/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultPasswordController.java index 67615adea..890412ad4 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultPasswordController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultPasswordController.java @@ -11,10 +11,10 @@ import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.scene.Scene; import javafx.scene.control.Button; +import javafx.scene.control.CheckBox; import javafx.scene.control.Label; import javafx.scene.layout.HBox; import javafx.scene.layout.Region; -import javafx.scene.shape.Rectangle; import javafx.stage.Stage; import org.cryptomator.common.settings.VaultSettings; import org.cryptomator.common.vaults.Vault; @@ -22,6 +22,7 @@ import org.cryptomator.common.vaults.VaultFactory; import org.cryptomator.ui.common.FxController; import org.cryptomator.ui.common.FxmlFile; import org.cryptomator.ui.common.FxmlScene; +import org.cryptomator.ui.controls.FontAwesome5IconView; import org.cryptomator.ui.controls.SecPasswordField; import org.cryptomator.ui.util.PasswordStrengthUtil; import org.fxmisc.easybind.EasyBind; @@ -55,9 +56,10 @@ public class CreateNewVaultPasswordController implements FxController { public Region passwordStrengthLevel4; public Label passwordStrengthLabel; public HBox passwordMatchBox; - public Rectangle checkmark; - public Rectangle cross; + public FontAwesome5IconView checkmark; + public FontAwesome5IconView cross; public Label passwordMatchLabel; + public CheckBox finalConfirmationCheckbox; @Inject CreateNewVaultPasswordController(@AddVaultWizard Stage window, @FxmlScene(FxmlFile.ADDVAULT_NEW_LOCATION) Lazy previousScene, StringProperty vaultName, ObjectProperty vaultPath, ObservableList vaults, VaultFactory vaultFactory, ResourceBundle resourceBundle, PasswordStrengthUtil strengthRater) { @@ -80,11 +82,13 @@ public class CreateNewVaultPasswordController implements FxController { BooleanBinding passwordsMatch = Bindings.createBooleanBinding(() -> CharSequence.compare(passwordField.getCharacters(), reenterField.getCharacters()) == 0, passwordField.textProperty(), reenterField.textProperty()); BooleanBinding reenterFieldNotEmpty = reenterField.textProperty().isNotEmpty(); //disable the finish button when passwords do not match or one is empty - finishButton.disableProperty().bind(reenterFieldNotEmpty.not().or(passwordsMatch.not())); + finishButton.disableProperty().bind(reenterFieldNotEmpty.not().or(passwordsMatch.not()).or(finalConfirmationCheckbox.selectedProperty().not())); //make match indicator invisible when passwords do not match or one is empty passwordMatchBox.visibleProperty().bind(reenterFieldNotEmpty); checkmark.visibleProperty().bind(passwordsMatch.and(reenterFieldNotEmpty)); + checkmark.managedProperty().bind(checkmark.visibleProperty()); cross.visibleProperty().bind(passwordsMatch.not().and(reenterFieldNotEmpty)); + cross.managedProperty().bind(cross.visibleProperty()); passwordMatchLabel.textProperty().bind(Bindings.when(passwordsMatch.and(reenterFieldNotEmpty)).then(resourceBundle.getString("addvaultwizard.new.passwordsMatch")).otherwise(resourceBundle.getString("addvaultwizard.new.passwordsDoNotMatch"))); //bindsings for the password strength indicator diff --git a/main/ui/src/main/java/org/cryptomator/ui/controls/FontAwesome5Icon.java b/main/ui/src/main/java/org/cryptomator/ui/controls/FontAwesome5Icon.java index da29581b3..3b350929f 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/controls/FontAwesome5Icon.java +++ b/main/ui/src/main/java/org/cryptomator/ui/controls/FontAwesome5Icon.java @@ -5,6 +5,7 @@ package org.cryptomator.ui.controls; */ public enum FontAwesome5Icon { ANCHOR("\uF13D"), // + CHECK("\uF00C"), // CIRCLE("\uF111"), // COG("\uF013"), // COGS("\uF085"), // @@ -15,6 +16,7 @@ public enum FontAwesome5Icon { LOCK_OPEN_ALT("\uF3C2"), // MINUS("\uF068"), // PLUS("\uF067"), // + SEARCH("\uF002"), // SPINNER("\uF110"), // SYNC("\uF021"), // TIMES("\uF00D"), // diff --git a/main/ui/src/main/resources/css/dark_theme.css b/main/ui/src/main/resources/css/dark_theme.css index 6732c1a91..9379dbbff 100644 --- a/main/ui/src/main/resources/css/dark_theme.css +++ b/main/ui/src/main/resources/css/dark_theme.css @@ -38,10 +38,6 @@ -fx-text-fill: TEXT_FILL; } -.glyph-icon { - -fx-fill: TEXT_FILL; -} - /******************************************************************************* * * * Labels * @@ -52,10 +48,28 @@ -fx-text-fill: TEXT_FILL; } +.label-secondary { + -fx-text-fill: TEXT_FILL_SECONDARY; +} + .text-flow > * { -fx-fill: TEXT_FILL; } +/******************************************************************************* + * * + * Glyph Icons * + * * + ******************************************************************************/ + +.glyph-icon { + -fx-fill: TEXT_FILL; +} + +.glyph-icon-secondary { + -fx-fill: TEXT_FILL_SECONDARY; +} + /******************************************************************************* * * * Main Window * @@ -463,6 +477,10 @@ -fx-background-color: CONTROL_PRIMARY_BORDER_DISABLED, CONTROL_PRIMARY_BG_DISABLED; } +.button:disabled .glyph-icon { + -fx-fill: TEXT_FILL_SECONDARY; +} + .button:default .glyph-icon { -fx-fill: TEXT_FILL_WHITE; } diff --git a/main/ui/src/main/resources/css/light_theme.css b/main/ui/src/main/resources/css/light_theme.css index 337d64c9a..1e97f6921 100644 --- a/main/ui/src/main/resources/css/light_theme.css +++ b/main/ui/src/main/resources/css/light_theme.css @@ -38,10 +38,6 @@ -fx-text-fill: TEXT_FILL; } -.glyph-icon { - -fx-fill: TEXT_FILL; -} - /******************************************************************************* * * * Labels * @@ -52,10 +48,28 @@ -fx-text-fill: TEXT_FILL; } +.label-secondary { + -fx-text-fill: TEXT_FILL_SECONDARY; +} + .text-flow > * { -fx-fill: TEXT_FILL; } +/******************************************************************************* + * * + * Glyph Icons * + * * + ******************************************************************************/ + +.glyph-icon { + -fx-fill: TEXT_FILL; +} + +.glyph-icon-secondary { + -fx-fill: TEXT_FILL_SECONDARY; +} + /******************************************************************************* * * * Main Window * @@ -463,6 +477,10 @@ -fx-background-color: CONTROL_PRIMARY_BORDER_DISABLED, CONTROL_PRIMARY_BG_DISABLED; } +.button:disabled .glyph-icon { + -fx-fill: TEXT_FILL_SECONDARY; +} + .button:default .glyph-icon { -fx-fill: TEXT_FILL_WHITE; } diff --git a/main/ui/src/main/resources/fxml/addvault_existing.fxml b/main/ui/src/main/resources/fxml/addvault_existing.fxml index bf78ab703..e50ab48af 100644 --- a/main/ui/src/main/resources/fxml/addvault_existing.fxml +++ b/main/ui/src/main/resources/fxml/addvault_existing.fxml @@ -9,20 +9,24 @@ + - - - - - - + - - - +