fix: fix conditions for button disabled
This commit is contained in:
parent
43df7d2f77
commit
61606a872e
|
@ -68,13 +68,13 @@ ModalPopup {
|
|||
anchors.rightMargin: Theme.padding
|
||||
label: "Add account >"
|
||||
|
||||
disabled: passwordInput.text === "" && accountNameInput === "" || accountSeedInput.text == ""
|
||||
disabled: passwordInput.text === "" || accountNameInput.text === "" || accountSeedInput.textAreaText === ""
|
||||
|
||||
onClicked : {
|
||||
// TODO add message to show validation errors
|
||||
if (passwordInput.text === "" || accountNameInput.text === "" || accountSeedInput.text == "") return;
|
||||
if (passwordInput.text === "" || accountNameInput.text === "" || accountSeedInput.textAreaText === "") return;
|
||||
|
||||
walletModel.addAccountsFromSeed(accountSeedInput.text, passwordInput.text, accountNameInput.text, selectedColor)
|
||||
walletModel.addAccountsFromSeed(accountSeedInput.textAreaText, passwordInput.text, accountNameInput.text, selectedColor)
|
||||
// TODO manage errors adding account
|
||||
popup.close();
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ ModalPopup {
|
|||
anchors.rightMargin: Theme.padding
|
||||
label: "Add account >"
|
||||
|
||||
disabled: passwordInput.text === "" && accountNameInput === ""
|
||||
disabled: passwordInput.text === "" || accountNameInput.text === ""
|
||||
|
||||
onClicked : {
|
||||
// TODO add message to show validation errors
|
||||
|
|
Loading…
Reference in New Issue