mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 06:41:41 +01:00
Merge pull request #1765 from devinbileck/cancel-wallet-password-prompt
Show cancel button in wallet password prompt
This commit is contained in:
commit
56965c1904
3 changed files with 15 additions and 6 deletions
|
@ -17,6 +17,7 @@
|
|||
|
||||
package bisq.desktop.main;
|
||||
|
||||
import bisq.desktop.app.BisqApp;
|
||||
import bisq.desktop.common.model.ViewModel;
|
||||
import bisq.desktop.components.BalanceWithConfirmationTextField;
|
||||
import bisq.desktop.components.TxIdTextField;
|
||||
|
@ -291,7 +292,7 @@ public class MainViewModel implements ViewModel, BisqSetup.BisqSetupCompleteList
|
|||
bisqSetup.setShowFirstPopupIfResyncSPVRequestedHandler(this::showFirstPopupIfResyncSPVRequested);
|
||||
bisqSetup.setRequestWalletPasswordHandler(aesKeyHandler -> walletPasswordWindow
|
||||
.onAesKey(aesKeyHandler::accept)
|
||||
.hideCloseButton()
|
||||
.onClose(() -> BisqApp.getShutDownHandler().run())
|
||||
.show());
|
||||
|
||||
bisqSetup.setDisplayUpdateHandler((alert, key) -> new DisplayUpdateDownloadWindow(alert)
|
||||
|
|
|
@ -203,7 +203,7 @@ public class SeedWordsView extends ActivatableView<GridPane, Void> {
|
|||
walletPasswordWindow.headLine(Res.get("account.seed.enterPw")).onAesKey(aesKey -> {
|
||||
initSeedWords(walletsManager.getDecryptedSeed(aesKey, btcWalletService.getKeyChainSeed(), btcWalletService.getKeyCrypter()));
|
||||
showSeedScreen();
|
||||
}).show();
|
||||
}).hideForgotPasswordButton().show();
|
||||
}
|
||||
|
||||
private void initSeedWords(DeterministicSeed seed) {
|
||||
|
|
|
@ -104,6 +104,7 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
|||
private ChangeListener<String> wordsTextAreaChangeListener;
|
||||
private ChangeListener<Boolean> seedWordsValidChangeListener;
|
||||
private LocalDate walletCreationDate;
|
||||
private boolean hideForgotPasswordButton = false;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -152,6 +153,11 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public WalletPasswordWindow hideForgotPasswordButton() {
|
||||
this.hideForgotPasswordButton = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void cleanup() {
|
||||
if (passwordTextField != null)
|
||||
|
@ -255,10 +261,12 @@ public class WalletPasswordWindow extends Overlay<WalletPasswordWindow> {
|
|||
GridPane.setRowIndex(hBox, ++rowIndex);
|
||||
GridPane.setColumnIndex(hBox, 1);
|
||||
hBox.setAlignment(Pos.CENTER_LEFT);
|
||||
if (hideCloseButton)
|
||||
hBox.getChildren().addAll(unlockButton, forgotPasswordButton, busyAnimation, deriveStatusLabel);
|
||||
else
|
||||
hBox.getChildren().addAll(unlockButton, cancelButton);
|
||||
hBox.getChildren().add(unlockButton);
|
||||
if (!hideForgotPasswordButton)
|
||||
hBox.getChildren().add(forgotPasswordButton);
|
||||
if (!hideCloseButton)
|
||||
hBox.getChildren().add(cancelButton);
|
||||
hBox.getChildren().addAll(busyAnimation, deriveStatusLabel);
|
||||
gridPane.getChildren().add(hBox);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue