2023-02-20 09:46:50 +03:00
import QtQuick
import QtQuick . Controls
import QtQuick . Layouts
import PageEnum 1.0
import "./"
import "../Controls"
import "../Config"
PageBase {
id: root
page: PageEnum . AdvancedServerSettings
logic: AdvancedServerSettingsLogic
enabled: AdvancedServerSettingsLogic . pageEnabled
BackButton {
id: back
}
2023-02-25 17:59:22 +03:00
2023-02-20 09:46:50 +03:00
Caption {
id: caption
text: qsTr ( "Advanced server settings" )
anchors.horizontalCenter: parent . horizontalCenter
}
2023-02-25 17:59:22 +03:00
BusyIndicator {
z: 99
anchors.horizontalCenter: parent . horizontalCenter
anchors.verticalCenter: parent . verticalCenter
visible: ! AdvancedServerSettingsLogic . pageEnabled
running: ! AdvancedServerSettingsLogic . pageEnabled
}
2023-02-20 09:46:50 +03:00
FlickableType {
id: fl
anchors.top: caption . bottom
anchors.bottom: logo . top
contentHeight: content . height
ColumnLayout {
id: content
enabled: logic . pageEnabled
anchors.top: parent . top
anchors.left: parent . left
anchors.right: parent . right
anchors.rightMargin: 15
LabelType {
Layout.fillWidth: true
font.pixelSize: 20
horizontalAlignment: Text . AlignHCenter
text: AdvancedServerSettingsLogic . labelCurrentVpnProtocolText
}
TextFieldType {
Layout.fillWidth: true
font.pixelSize: 20
horizontalAlignment: Text . AlignHCenter
text: AdvancedServerSettingsLogic . labelServerText
readOnly: true
background: Item { }
}
LabelType {
Layout.fillWidth: true
2023-02-25 17:59:22 +03:00
horizontalAlignment: Text . AlignHCenter
2023-02-20 09:46:50 +03:00
text: AdvancedServerSettingsLogic . labelWaitInfoText
visible: AdvancedServerSettingsLogic . labelWaitInfoVisible
}
BlueButtonType {
Layout.fillWidth: true
Layout.topMargin: 10
text: "Scan the server for installed containers"
visible: AdvancedServerSettingsLogic . pushButtonClearVisible
onClicked: {
2023-02-25 17:59:22 +03:00
AdvancedServerSettingsLogic . onPushButtonScanServerClicked ( )
2023-02-20 09:46:50 +03:00
}
}
BlueButtonType {
Layout.fillWidth: true
Layout.topMargin: 10
text: AdvancedServerSettingsLogic . pushButtonClearText
visible: AdvancedServerSettingsLogic . pushButtonClearVisible
onClicked: {
popupClearServer . open ( )
}
}
2023-04-16 07:32:32 +03:00
BlueButtonType {
Layout.topMargin: 10
Layout.fillWidth: true
text: qsTr ( "Clients Management" )
onClicked: {
UiLogic . goToPage ( PageEnum . ClientManagement )
}
}
2023-02-20 09:46:50 +03:00
PopupWithQuestion {
id: popupClearServer
questionText: "Attention! All containers will be deleted on the server. This means that configuration files, keys and certificates will be deleted. Continue?"
yesFunc: function ( ) {
close ( )
2023-02-25 17:59:22 +03:00
AdvancedServerSettingsLogic . onPushButtonClearServerClicked ( )
2023-02-20 09:46:50 +03:00
}
noFunc: function ( ) {
close ( )
}
}
}
}
Logo {
id : logo
anchors.bottom: parent . bottom
}
}