added new AdvancedSettings scene in AddVaultWizard

This commit is contained in:
Jan-Peter Klein
2023-06-28 12:24:14 +02:00
parent 9b18a179c2
commit 386bdd3490
8 changed files with 245 additions and 6 deletions
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import org.cryptomator.ui.controls.FontAwesome5IconView?>
<?import org.cryptomator.ui.controls.NumericTextField?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ButtonBar?>
<?import javafx.scene.control.Hyperlink?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Tooltip?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<VBox xmlns:fx="http://javafx.com/fxml"
xmlns="http://javafx.com/javafx"
fx:controller="org.cryptomator.ui.addvaultwizard.CreateNewVaultAdvancedSettingsController"
prefWidth="450"
prefHeight="450"
spacing="12"
alignment="CENTER_LEFT">
<padding>
<Insets topRightBottomLeft="24"/>
</padding>
<children>
<Region prefHeight="12" VBox.vgrow="NEVER"/>
<VBox spacing="6">
<HBox spacing="2" HBox.hgrow="NEVER">
<Label text="%addvaultwizard.new.shorteningThreshold.title"/>
<Region prefWidth="2"/>
<Hyperlink contentDisplay="GRAPHIC_ONLY" onAction="#openDocs">
<graphic>
<FontAwesome5IconView glyph="QUESTION_CIRCLE" styleClass="glyph-icon-muted"/>
</graphic>
<tooltip>
<Tooltip text="%addvaultwizard.new.shorteningThreshold.tooltip" showDelay="10ms" />
</tooltip>
</Hyperlink>
</HBox>
<HBox>
<NumericTextField fx:id="shorteningThresholdTextField" promptText="%addvaultwizard.new.shorteningThreshold.namePrompt" text="220"/>
<Region prefWidth="4" HBox.hgrow="NEVER"/>
<StackPane>
<Label styleClass="label-muted" text="%addvaultwizard.new.shorteningThreshold.invalid" textAlignment="RIGHT" alignment="CENTER_RIGHT" visible="${!controller.validShorteningThreshold}" graphicTextGap="6">
<graphic>
<FontAwesome5IconView styleClass="glyph-icon-red" glyph="TIMES"/>
</graphic>
</Label>
<Label styleClass="label-muted" text="%addvaultwizard.new.shorteningThreshold.valid" textAlignment="RIGHT" alignment="CENTER_RIGHT" visible="${controller.validShorteningThreshold}" graphicTextGap="6">
<graphic>
<FontAwesome5IconView styleClass="glyph-icon-primary" glyph="CHECK"/>
</graphic>
</Label>
</StackPane>
</HBox>
</VBox>
<Region VBox.vgrow="ALWAYS"/>
<ButtonBar buttonMinWidth="120" buttonOrder="B+X">
<buttons>
<Button text="%generic.button.back" ButtonBar.buttonData="BACK_PREVIOUS" onAction="#back"/>
<Button text="%generic.button.next" ButtonBar.buttonData="NEXT_FORWARD" onAction="#next" defaultButton="true" disable="${!controller.validShorteningThreshold}"/>
</buttons>
</ButtonBar>
</children>
</VBox>
@@ -11,6 +11,7 @@
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.control.CheckBox?>
<VBox xmlns:fx="http://javafx.com/fxml"
xmlns="http://javafx.com/javafx"
fx:controller="org.cryptomator.ui.addvaultwizard.CreateNewVaultLocationController"
@@ -50,6 +51,10 @@
<Label fx:id="locationStatusLabel" alignment="CENTER_RIGHT" wrapText="true" visible="${controller.anyRadioButtonSelected}" maxWidth="Infinity" graphicTextGap="6" />
</VBox>
<Region prefHeight="12" VBox.vgrow="NEVER"/>
<CheckBox fx:id="advancedSettingsCheckBox" text="%addvaultwizard.new.showAdvancedSettings.checkbox"/>
<Region VBox.vgrow="ALWAYS"/>
<ButtonBar buttonMinWidth="120" buttonOrder="B+X">
@@ -63,6 +63,12 @@ addvaultwizard.new.validCharacters.message=The vault name may contain the follow
addvaultwizard.new.validCharacters.chars=Word characters (e.g. a, ж or 수)
addvaultwizard.new.validCharacters.numbers=Numbers
addvaultwizard.new.validCharacters.dashes=Hyphen (%s) or underscore (%s)
addvaultwizard.new.showAdvancedSettings.checkbox=Show advanced settings in next step
addvaultwizard.new.shorteningThreshold.title=Limit the length of encrypted file names.
addvaultwizard.new.shorteningThreshold.tooltip=Open the documentation to learn more.
addvaultwizard.new.shorteningThreshold.namePrompt=36-220
addvaultwizard.new.shorteningThreshold.invalid=Invalid
addvaultwizard.new.shorteningThreshold.valid=Valid
### Password
addvaultwizard.new.createVaultBtn=Create Vault
addvaultwizard.new.generateRecoveryKeyChoice=You won't be able to access your data without your password. Do you want a recovery key for the case you lose your password?