mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-04-22 02:26:55 -04:00
Add non-forced retry lock button
This commit is contained in:
@@ -35,7 +35,13 @@ public class LockForcedController implements FxController {
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void confirmForcedLock() {
|
||||
public void retry() {
|
||||
forceLockDecisionLock.interacted(LockModule.ForceLockDecision.RETRY);
|
||||
window.close();
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void force() {
|
||||
forceLockDecisionLock.interacted(LockModule.ForceLockDecision.FORCE);
|
||||
window.close();
|
||||
}
|
||||
@@ -54,4 +60,8 @@ public class LockForcedController implements FxController {
|
||||
return vault.getDisplayName();
|
||||
}
|
||||
|
||||
public boolean isForceSupported() {
|
||||
return vault.supportsForcedUnmount();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ abstract class LockModule {
|
||||
|
||||
enum ForceLockDecision {
|
||||
CANCEL,
|
||||
RETRY,
|
||||
FORCE;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ public class LockWorkflow extends Task<Void> {
|
||||
LOG.info("Locking {} failed (forced: {}).", vault.getDisplayName(), forced, e);
|
||||
var decision = askUserForAction();
|
||||
switch (decision) {
|
||||
case RETRY -> lock(false);
|
||||
case FORCE -> lock(true);
|
||||
case CANCEL -> cancel(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user