1
0
Files
electrum/electrum/gui/qml/components/wizard/WCServerConfig.qml
f321x 5952d8c614 qml: validate server address in ServerConfig
Same as Qt, validate the server address the user enters and prevent the
user from continuing in the wizard or clicking 'Ok' in the ServerConfig
if the entered address is clearly invalid.
2026-01-26 14:40:02 +01:00

29 lines
667 B
QML

import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import "../controls"
WizardComponent {
valid: sc.addressValid
last: true
title: qsTr('Server')
function apply() {
wizard_data['server'] = sc.address
wizard_data['autoconnect'] = sc.serverConnectMode == ServerConnectModeComboBox.Mode.Autoconnect
wizard_data['one_server'] = sc.serverConnectMode == ServerConnectModeComboBox.Mode.Single
}
ColumnLayout {
anchors.fill: parent
spacing: constants.paddingLarge
ServerConfig {
id: sc
Layout.fillWidth: true
Layout.fillHeight: true
}
}
}