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

134 lines
3.6 KiB
QML
Raw Normal View History

2021-07-28 16:13:29 +07:00
import QtQuick 2.12
import QtQuick.Controls 2.12
2021-08-09 00:41:52 +07:00
import PageEnum 1.0
2021-08-19 01:27:22 +03:00
import "./"
import "../Controls"
import "../Config"
2021-07-28 16:13:29 +07:00
Item {
id: root
2021-09-08 14:23:02 +03:00
enabled: ServerSettingsLogic.pageEnabled
2021-08-09 00:41:52 +07:00
2021-07-28 16:13:29 +07:00
ImageButtonType {
id: back
x: 10
y: 10
width: 26
height: 20
icon.source: "qrc:/images/arrow_left.png"
onClicked: {
UiLogic.closePage()
}
}
Text {
font.family: "Lato"
font.styleName: "normal"
font.pixelSize: 24
color: "#100A44"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: qsTr("Server settings")
2021-08-19 01:27:22 +03:00
anchors.horizontalCenter: parent.horizontalCenter
2021-07-28 16:13:29 +07:00
y: 35
width: 361
height: 31
}
Image {
anchors.horizontalCenter: root.horizontalCenter
width: GC.trW(150)
height: GC.trH(22)
y: GC.trY(590)
source: "qrc:/images/AmneziaVPN.png"
}
LabelType {
x: 20
y: 150
width: 341
height: 31
font.pixelSize: 20
horizontalAlignment: Text.AlignHCenter
2021-09-08 14:23:02 +03:00
text: ServerSettingsLogic.labelCurrentVpnProtocolText
2021-07-28 16:13:29 +07:00
}
LabelType {
2021-08-19 01:27:22 +03:00
anchors.horizontalCenter: parent.horizontalCenter
2021-07-28 16:13:29 +07:00
y: 120
width: 341
height: 31
font.pixelSize: 20
horizontalAlignment: Text.AlignHCenter
2021-09-08 14:23:02 +03:00
text: ServerSettingsLogic.labelServerText
2021-07-28 16:13:29 +07:00
}
LabelType {
2021-08-19 01:27:22 +03:00
anchors.horizontalCenter: parent.horizontalCenter
2021-07-28 16:13:29 +07:00
y: 530
width: 301
height: 41
2021-09-08 14:23:02 +03:00
text: ServerSettingsLogic.labelWaitInfoText
visible: ServerSettingsLogic.labelWaitInfoVisible
2021-07-28 16:13:29 +07:00
}
TextFieldType {
anchors.horizontalCenter: parent.horizontalCenter
y: 80
width: 251
height: 31
2021-09-08 14:23:02 +03:00
text: ServerSettingsLogic.lineEditDescriptionText
2021-07-28 16:13:29 +07:00
onEditingFinished: {
2021-09-08 14:23:02 +03:00
ServerSettingsLogic.lineEditDescriptionText = text
ServerSettingsLogic.onLineEditDescriptionEditingFinished()
2021-07-28 16:13:29 +07:00
}
}
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 410
width: 300
height: 40
2021-09-08 14:23:02 +03:00
text: ServerSettingsLogic.pushButtonClearText
visible: ServerSettingsLogic.pushButtonClearVisible
2021-08-09 00:41:52 +07:00
onClicked: {
2021-09-08 14:23:02 +03:00
ServerSettingsLogic.onPushButtonClearServer()
2021-08-09 00:41:52 +07:00
}
2021-07-28 16:13:29 +07:00
}
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 350
width: 300
height: 40
2021-09-08 14:23:02 +03:00
text: ServerSettingsLogic.pushButtonClearClientCacheText
visible: ServerSettingsLogic.pushButtonClearClientCacheVisible
2021-08-09 00:41:52 +07:00
onClicked: {
2021-09-08 14:23:02 +03:00
ServerSettingsLogic.onPushButtonClearClientCacheClicked()
2021-08-09 00:41:52 +07:00
}
2021-07-28 16:13:29 +07:00
}
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 470
width: 300
height: 40
text: qsTr("Forget this server")
2021-08-09 00:41:52 +07:00
onClicked: {
2021-09-08 14:23:02 +03:00
ServerSettingsLogic.onPushButtonForgetServer()
2021-08-09 00:41:52 +07:00
}
2021-07-28 16:13:29 +07:00
}
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 210
width: 300
height: 40
text: qsTr("VPN protocols")
2021-08-09 00:41:52 +07:00
onClicked: {
2021-09-07 19:26:58 +03:00
UiLogic.goToPage(PageEnum.ServerContainers)
2021-08-09 00:41:52 +07:00
}
2021-07-28 16:13:29 +07:00
}
BlueButtonType {
anchors.horizontalCenter: parent.horizontalCenter
y: 260
width: 300
height: 40
text: qsTr("Share Server (FULL ACCESS)")
2021-09-08 14:23:02 +03:00
visible: ServerSettingsLogic.pushButtonShareFullVisible
2021-08-09 00:41:52 +07:00
onClicked: {
2021-09-08 14:23:02 +03:00
ServerSettingsLogic.onPushButtonShareFullClicked()
2021-08-09 00:41:52 +07:00
}
2021-07-28 16:13:29 +07:00
}
}