2023-07-17 10:49:06 +02:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
import QtQuick.Controls.Material
|
2022-08-25 11:13:42 +02:00
|
|
|
|
|
|
|
|
import org.electrum 1.0
|
|
|
|
|
|
|
|
|
|
import "controls"
|
|
|
|
|
|
|
|
|
|
ElDialog {
|
|
|
|
|
id: rootItem
|
|
|
|
|
|
|
|
|
|
title: qsTr('Server settings')
|
2024-02-19 14:03:39 +01:00
|
|
|
iconSource: Qt.resolvedUrl('../../icons/network.png')
|
2022-08-25 11:13:42 +02:00
|
|
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
height: parent.height
|
|
|
|
|
|
2022-12-30 22:40:29 +01:00
|
|
|
padding: 0
|
|
|
|
|
|
2022-08-25 11:13:42 +02:00
|
|
|
ColumnLayout {
|
|
|
|
|
width: parent.width
|
2022-12-30 22:40:29 +01:00
|
|
|
height: parent.height
|
|
|
|
|
spacing: 0
|
2022-08-25 11:13:42 +02:00
|
|
|
|
2022-12-30 16:22:22 +01:00
|
|
|
ColumnLayout {
|
2022-12-30 22:40:29 +01:00
|
|
|
Layout.fillWidth: true
|
2022-12-30 16:22:22 +01:00
|
|
|
Layout.fillHeight: true
|
2022-12-30 22:40:29 +01:00
|
|
|
Layout.leftMargin: constants.paddingLarge
|
|
|
|
|
Layout.rightMargin: constants.paddingLarge
|
2022-08-25 11:13:42 +02:00
|
|
|
|
2022-12-30 16:22:22 +01:00
|
|
|
ServerConfig {
|
|
|
|
|
id: serverconfig
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.fillHeight: true
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-12-30 22:40:29 +01:00
|
|
|
|
|
|
|
|
FlatButton {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
text: qsTr('Ok')
|
|
|
|
|
icon.source: '../../icons/confirmed.png'
|
|
|
|
|
onClicked: {
|
2025-06-03 13:22:45 +02:00
|
|
|
let auto_connect = serverconfig.serverConnectMode == ServerConnectModeComboBox.Mode.Autoconnect
|
|
|
|
|
let server = serverconfig.address
|
|
|
|
|
let one_server = serverconfig.serverConnectMode == ServerConnectModeComboBox.Mode.Single
|
|
|
|
|
Network.setServerParameters(server, auto_connect, one_server)
|
2022-12-30 22:40:29 +01:00
|
|
|
rootItem.close()
|
2022-08-25 11:13:42 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|