some cleanup, did some todos

This commit is contained in:
Sebastian Stenzel
2020-03-06 16:24:16 +01:00
parent 0eec66a9e0
commit 8033c85727
4 changed files with 6 additions and 5 deletions

View File

@@ -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();
}
}

View File

@@ -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)

View File

@@ -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());

View File

@@ -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);
}