mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-17 10:11:27 +00:00
Clearer distinction between messageText and progressText in UnlockController
This commit is contained in:
@@ -106,7 +106,7 @@ public class UnlockController implements ViewController {
|
||||
private Button unlockButton;
|
||||
|
||||
@FXML
|
||||
private Label successMessage;
|
||||
private Text messageText;
|
||||
|
||||
@FXML
|
||||
private CheckBox savePassword;
|
||||
@@ -136,7 +136,7 @@ public class UnlockController implements ViewController {
|
||||
private ProgressIndicator progressIndicator;
|
||||
|
||||
@FXML
|
||||
private Text messageText;
|
||||
private Text progressText;
|
||||
|
||||
@FXML
|
||||
private Hyperlink downloadsPageLink;
|
||||
@@ -200,8 +200,8 @@ public class UnlockController implements ViewController {
|
||||
advancedOptions.setVisible(false);
|
||||
advancedOptionsButton.setText(localization.getString("unlock.button.advancedOptions.show"));
|
||||
progressIndicator.setVisible(false);
|
||||
successMessage.setVisible(state.successMessage().isPresent());
|
||||
state.successMessage().map(localization::getString).ifPresent(successMessage::setText);
|
||||
progressText.setText(null);
|
||||
state.successMessage().map(localization::getString).ifPresent(messageText::setText);
|
||||
if (SystemUtils.IS_OS_WINDOWS) {
|
||||
winDriveLetter.valueProperty().removeListener(driveLetterChangeListener);
|
||||
winDriveLetter.getItems().clear();
|
||||
@@ -212,7 +212,6 @@ public class UnlockController implements ViewController {
|
||||
chooseSelectedDriveLetter();
|
||||
}
|
||||
downloadsPageLink.setVisible(false);
|
||||
messageText.setText(null);
|
||||
mountName.setText(vault.getMountName());
|
||||
savePassword.setSelected(false);
|
||||
// auto-fill pw from keychain:
|
||||
@@ -298,7 +297,7 @@ public class UnlockController implements ViewController {
|
||||
|
||||
@FXML
|
||||
private void didClickAdvancedOptionsButton(ActionEvent event) {
|
||||
successMessage.setVisible(false);
|
||||
messageText.setText(null);
|
||||
advancedOptions.setVisible(!advancedOptions.isVisible());
|
||||
if (advancedOptions.isVisible()) {
|
||||
advancedOptionsButton.setText(localization.getString("unlock.button.advancedOptions.hide"));
|
||||
@@ -431,11 +430,12 @@ public class UnlockController implements ViewController {
|
||||
private void didClickUnlockButton(ActionEvent event) {
|
||||
advancedOptions.setDisable(true);
|
||||
advancedOptions.setVisible(false);
|
||||
advancedOptionsButton.setText(localization.getString("unlock.button.advancedOptions.show"));
|
||||
progressIndicator.setVisible(true);
|
||||
|
||||
CharSequence password = passwordField.getCharacters();
|
||||
Tasks.create(() -> {
|
||||
messageText.setText(localization.getString("unlock.pendingMessage.unlocking"));
|
||||
progressText.setText(localization.getString("unlock.pendingMessage.unlocking"));
|
||||
vault.unlock(password);
|
||||
if (keychainAccess.isPresent() && savePassword.isSelected()) {
|
||||
keychainAccess.get().storePassphrase(vault.getId(), password);
|
||||
@@ -478,6 +478,7 @@ public class UnlockController implements ViewController {
|
||||
}
|
||||
advancedOptions.setDisable(false);
|
||||
progressIndicator.setVisible(false);
|
||||
progressText.setText(null);
|
||||
}).runOnce(executor);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</HBox>
|
||||
|
||||
<!-- Row 3 -->
|
||||
<Label fx:id="successMessage" cacheShape="true" cache="true" visible="true" GridPane.rowIndex="3" GridPane.columnIndex="0" GridPane.columnSpan="2"/>
|
||||
<Text fx:id="messageText" cache="true" visible="true" GridPane.rowIndex="3" GridPane.columnIndex="0" GridPane.columnSpan="2"/>
|
||||
|
||||
<!-- Row 3 -->
|
||||
<GridPane fx:id="advancedOptions" vgap="12.0" hgap="12.0" prefWidth="400.0" GridPane.rowIndex="3" GridPane.columnIndex="0" GridPane.columnSpan="2" visible="false" cacheShape="true" cache="true">
|
||||
@@ -112,7 +112,7 @@
|
||||
<!-- Row 5 -->
|
||||
<VBox GridPane.rowIndex="5" GridPane.columnIndex="0" GridPane.columnSpan="2" spacing="12.0" alignment="CENTER" cacheShape="true" cache="true">
|
||||
<ProgressIndicator progress="-1" fx:id="progressIndicator" cacheShape="true" cache="true" cacheHint="SPEED" />
|
||||
<Text fx:id="messageText" cache="true" />
|
||||
<Text fx:id="progressText" cache="true" />
|
||||
</VBox>
|
||||
</children>
|
||||
</GridPane>
|
||||
|
||||
Reference in New Issue
Block a user