user on bitcointalk [0] tried to create wallet with name "w/o 2FA". Before this, one would only get an error after the last page of the wizard. With this, the "Next" button does not even get enabled if the name does not look ok. (and as in comment, maybe we should be even stricter re what is allowed) [0]: https://bitcointalk.org/index.php?topic=5483514.msg63584789#msg63584789
29 lines
588 B
QML
29 lines
588 B
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QtQuick.Controls
|
|
|
|
import org.electrum 1.0
|
|
|
|
WizardComponent {
|
|
valid: wiz.isValidNewWalletName(wallet_name.text)
|
|
|
|
function apply() {
|
|
wizard_data['wallet_name'] = wallet_name.text
|
|
}
|
|
|
|
GridLayout {
|
|
columns: 1
|
|
Label { text: qsTr('Wallet name') }
|
|
TextField {
|
|
id: wallet_name
|
|
focus: true
|
|
text: Daemon.suggestWalletName()
|
|
inputMethodHints: Qt.ImhNoPredictiveText
|
|
}
|
|
}
|
|
|
|
Component.onCompleted: {
|
|
wallet_name.forceActiveFocus()
|
|
}
|
|
}
|