Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/qt6-client-management-panel

This commit is contained in:
vladimir.kuznetsov 2023-03-19 14:58:15 +03:00
commit b000eda126
41 changed files with 630 additions and 275 deletions

View file

@ -0,0 +1,109 @@
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
}
Caption {
id: caption
text: qsTr("Advanced server settings")
anchors.horizontalCenter: parent.horizontalCenter
}
BusyIndicator {
z: 99
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
visible: !AdvancedServerSettingsLogic.pageEnabled
running: !AdvancedServerSettingsLogic.pageEnabled
}
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
horizontalAlignment: Text.AlignHCenter
text: AdvancedServerSettingsLogic.labelWaitInfoText
visible: AdvancedServerSettingsLogic.labelWaitInfoVisible
}
BlueButtonType {
Layout.fillWidth: true
Layout.topMargin: 10
text: "Scan the server for installed containers"
visible: AdvancedServerSettingsLogic.pushButtonClearVisible
onClicked: {
AdvancedServerSettingsLogic.onPushButtonScanServerClicked()
}
}
BlueButtonType {
Layout.fillWidth: true
Layout.topMargin: 10
text: AdvancedServerSettingsLogic.pushButtonClearText
visible: AdvancedServerSettingsLogic.pushButtonClearVisible
onClicked: {
popupClearServer.open()
}
}
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()
AdvancedServerSettingsLogic.onPushButtonClearServerClicked()
}
noFunc: function() {
close()
}
}
}
}
Logo {
id : logo
anchors.bottom: parent.bottom
}
}

View file

@ -75,6 +75,7 @@ PageBase {
UiLogic.goToPage(PageEnum.ServerContainers)
}
}
BlueButtonType {
Layout.fillWidth: true
Layout.topMargin: 10
@ -85,6 +86,16 @@ PageBase {
}
}
BlueButtonType {
Layout.fillWidth: true
Layout.topMargin: 10
text: qsTr("Advanced server settings")
visible: ServerSettingsLogic.pushButtonShareFullVisible //todo
onClicked: {
UiLogic.goToPage(PageEnum.AdvancedServerSettings)
}
}
BlueButtonType {
Layout.topMargin: 60
Layout.fillWidth: true
@ -103,28 +114,6 @@ PageBase {
}
}
BlueButtonType {
Layout.fillWidth: true
Layout.topMargin: 10
text: ServerSettingsLogic.pushButtonClearText
visible: ServerSettingsLogic.pushButtonClearVisible
onClicked: {
popupClearServer.open()
}
}
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() {
ServerSettingsLogic.onPushButtonClearServer()
close()
}
noFunc: function() {
close()
}
}
BlueButtonType {
Layout.fillWidth: true
Layout.topMargin: 10
@ -148,7 +137,6 @@ PageBase {
}
}
Logo {
id : logo
anchors.bottom: parent.bottom

View file

@ -54,12 +54,12 @@ You SHOULD set this website address to some foreign website which is not blocked
text: WizardLogic.lineEditHighWebsiteMaskingText
onEditingFinished: {
let _text = website_masking.text
_text.replace("http://", "");
_text.replace("https://", "");
_text = _text.replace("http://", "");
_text = _text.replace("https://", "");
if (!_text) {
return
}
_text = _text.split("/").first();
_text = _text.split("/")[0];
WizardLogic.lineEditHighWebsiteMaskingText = _text
}
onAccepted: {