Browse Source

some cleanup, did some todos

Sebastian Stenzel 5 years ago
parent
commit
8033c85727

+ 4 - 2
main/ui/src/main/java/org/cryptomator/ui/changepassword/ChangePasswordController.java

@@ -14,6 +14,7 @@ import javafx.stage.Stage;
 import org.cryptomator.common.vaults.Vault;
 import org.cryptomator.cryptofs.CryptoFileSystemProvider;
 import org.cryptomator.cryptolib.api.InvalidPassphraseException;
+import org.cryptomator.ui.common.Animations;
 import org.cryptomator.ui.common.FxController;
 import org.cryptomator.ui.controls.FontAwesome5IconView;
 import org.cryptomator.ui.controls.NiceSecurePasswordField;
@@ -71,8 +72,9 @@ public class ChangePasswordController implements FxController {
 			LOG.error("IO error occured during password change. Unable to perform operation.", e);
 			e.printStackTrace();
 		} catch (InvalidPassphraseException e) {
-			// TODO shake
-			LOG.info("Wrong old password.");
+			Animations.createShakeWindowAnimation(window).play();
+			oldPasswordField.selectAll();
+			oldPasswordField.requestFocus();
 		}
 	}
 

+ 0 - 1
main/ui/src/main/java/org/cryptomator/ui/common/FxControllerKey.java

@@ -14,7 +14,6 @@ import java.lang.annotation.Target;
 import static java.lang.annotation.ElementType.METHOD;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
-// TODO rename after refactoring
 @Documented
 @Target(METHOD)
 @Retention(RUNTIME)

+ 1 - 1
main/ui/src/main/java/org/cryptomator/ui/controls/FormattedLabel.java

@@ -12,7 +12,7 @@ public class FormattedLabel extends Label {
 
 	private final StringProperty format = new SimpleStringProperty("");
 	private final ObjectProperty<Object> arg1 = new SimpleObjectProperty<>();
-	// TODO: add arg2, arg3, ... on demand
+	// add arg2, arg3, ... on demand
 
 	public FormattedLabel() {
 		textProperty().bind(createStringBinding());

+ 1 - 1
main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java

@@ -67,7 +67,7 @@ public class RecoveryKeyResetPasswordController implements FxController {
 		});
 		task.setOnFailed(event -> {
 			// TODO show generic error screen
-			LOG.error("Creation of recovery key failed.", task.getException());
+			LOG.error("Resetting password failed.", task.getException());
 		});
 		executor.submit(task);
 	}