Files
amnezia-client/client/ui/qml/Pages/PageNetworkSetting.qml
T

93 lines
2.1 KiB
QML
Raw Normal View History

2021-07-28 16:13:29 +07:00
import QtQuick 2.12
import QtQuick.Controls 2.12
2021-09-14 00:39:07 +03:00
import PageEnum 1.0
2021-07-28 16:13:29 +07:00
import "./"
2021-08-19 01:27:22 +03:00
import "../Controls"
import "../Config"
2021-07-28 16:13:29 +07:00
2021-09-14 00:39:07 +03:00
PageBase {
2021-07-28 16:13:29 +07:00
id: root
2021-09-14 00:39:07 +03:00
page: PageEnum.NetworkSettings
logic: NetworkSettingsLogic
2021-09-08 15:09:16 +03:00
BackButton {
2021-07-28 16:13:29 +07:00
id: back
}
2021-09-08 21:24:09 +03:00
Caption {
2021-07-28 16:13:29 +07:00
text: qsTr("DNS Servers")
}
Image {
anchors.horizontalCenter: root.horizontalCenter
width: GC.trW(150)
height: GC.trH(22)
y: GC.trY(590)
source: "qrc:/images/AmneziaVPN.png"
}
LabelType {
x: 40
y: 95
width: 291
height: 21
text: qsTr("Primary DNS server")
}
LabelType {
x: 40
y: 175
width: 291
height: 21
text: qsTr("Secondray DNS server")
}
TextFieldType {
id: dns1
x: 40
y: 120
width: 271
height: 40
2021-09-07 22:11:43 +03:00
text: NetworkSettingsLogic.lineEditDns1Text
2021-07-28 16:13:29 +07:00
onEditingFinished: {
2021-09-07 22:11:43 +03:00
NetworkSettingsLogic.lineEditDns1Text = text
NetworkSettingsLogic.onLineEditDns1EditFinished(text)
2021-07-28 16:13:29 +07:00
}
validator: RegExpValidator {
2021-09-03 20:17:13 +03:00
regExp: NetworkSettingsLogic.ipAddressValidatorRegex
2021-07-28 16:13:29 +07:00
}
}
TextFieldType {
id: dns2
x: 40
y: 200
width: 271
height: 40
2021-09-07 22:11:43 +03:00
text: NetworkSettingsLogic.lineEditDns2Text
2021-07-28 16:13:29 +07:00
onEditingFinished: {
2021-09-07 22:11:43 +03:00
NetworkSettingsLogic.lineEditDns2Text = text
NetworkSettingsLogic.onLineEditDns2EditFinished(text)
2021-07-28 16:13:29 +07:00
}
validator: RegExpValidator {
2021-09-03 20:17:13 +03:00
regExp: NetworkSettingsLogic.ipAddressValidatorRegex
2021-07-28 16:13:29 +07:00
}
}
ImageButtonType {
id: resetDNS1
x: 320
y: 127
width: 24
height: 24
icon.source: "qrc:/images/reload.png"
onClicked: {
2021-09-07 22:11:43 +03:00
NetworkSettingsLogic.onPushButtonResetDns1Clicked()
2021-07-28 16:13:29 +07:00
}
}
ImageButtonType {
id: resetDNS2
x: 320
y: 207
width: 24
height: 24
icon.source: "qrc:/images/reload.png"
onClicked: {
2021-09-07 22:11:43 +03:00
NetworkSettingsLogic.onPushButtonResetDns2Clicked()
2021-07-28 16:13:29 +07:00
}
}
}