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
|
|
|
|
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.ServerSettings
|
|
|
|
|
logic: ServerSettingsLogic
|
|
|
|
|
|
2021-09-08 14:23:02 +03:00
|
|
|
enabled: ServerSettingsLogic.pageEnabled
|
2021-08-09 00:41:52 +07:00
|
|
|
|
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("Server settings")
|
2021-08-19 01:27:22 +03:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-07-28 16:13:29 +07:00
|
|
|
}
|
|
|
|
|
LabelType {
|
2021-10-21 19:49:53 +03:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-07-28 16:13:29 +07:00
|
|
|
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
|
2021-10-21 19:49:53 +03:00
|
|
|
width: parent.width - 40
|
2021-07-28 16:13:29 +07:00
|
|
|
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
|
2021-10-21 19:49:53 +03:00
|
|
|
width: parent.width - 40
|
2021-07-28 16:13:29 +07:00
|
|
|
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
|
2021-10-21 19:49:53 +03:00
|
|
|
width: parent.width - 40
|
2021-07-28 16:13:29 +07:00
|
|
|
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
|
2021-10-21 19:49:53 +03:00
|
|
|
width: parent.width - 40
|
2021-07-28 16:13:29 +07:00
|
|
|
height: 40
|
2021-09-22 14:49:08 +03:00
|
|
|
text: qsTr("Protocols and Services")
|
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
|
2021-10-21 19:49:53 +03:00
|
|
|
width: parent.width - 40
|
2021-07-28 16:13:29 +07:00
|
|
|
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
|
|
|
}
|
2021-10-21 19:49:53 +03:00
|
|
|
|
|
|
|
|
Logo {
|
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
|
}
|
2021-07-28 16:13:29 +07:00
|
|
|
}
|