2022-08-25 11:13:42 +02:00
|
|
|
import QtQuick 2.6
|
|
|
|
|
import QtQuick.Layouts 1.0
|
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
|
import QtQuick.Controls.Material 2.0
|
|
|
|
|
|
|
|
|
|
import org.electrum 1.0
|
|
|
|
|
|
|
|
|
|
import "controls"
|
|
|
|
|
|
|
|
|
|
ElDialog {
|
|
|
|
|
id: rootItem
|
|
|
|
|
|
|
|
|
|
title: qsTr('Server settings')
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
}
|
2023-01-04 10:32:27 +01:00
|
|
|
|
2022-12-30 16:22:22 +01:00
|
|
|
}
|
2022-12-30 22:40:29 +01:00
|
|
|
|
|
|
|
|
FlatButton {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
text: qsTr('Ok')
|
|
|
|
|
icon.source: '../../icons/confirmed.png'
|
|
|
|
|
onClicked: {
|
2023-01-04 10:32:27 +01:00
|
|
|
Config.autoConnect = serverconfig.auto_connect
|
|
|
|
|
Config.serverString = serverconfig.address
|
|
|
|
|
Network.server = serverconfig.address
|
2022-12-30 22:40:29 +01:00
|
|
|
rootItem.close()
|
2022-08-25 11:13:42 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|