Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into feature/qt6-client-management-panel
This commit is contained in:
commit
b000eda126
41 changed files with 630 additions and 275 deletions
34
client/ui/qml/Controls/PopupWarning.qml
Normal file
34
client/ui/qml/Controls/PopupWarning.qml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Popup {
|
||||
id: root
|
||||
|
||||
property string popupWarningText
|
||||
|
||||
anchors.centerIn: Overlay.overlay
|
||||
modal: true
|
||||
closePolicy: Popup.NoAutoClose
|
||||
width: parent.width - 20
|
||||
|
||||
ColumnLayout {
|
||||
width: parent.width
|
||||
Text {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
font.pixelSize: 16
|
||||
text: root.popupWarningText
|
||||
}
|
||||
|
||||
BlueButtonType {
|
||||
Layout.preferredWidth: parent.width / 2
|
||||
Layout.fillWidth: true
|
||||
text: "Continue"
|
||||
onClicked: {
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
109
client/ui/qml/Pages/PageAdvancedServerSettings.qml
Normal file
109
client/ui/qml/Pages/PageAdvancedServerSettings.qml
Normal 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
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -252,6 +252,10 @@ Window {
|
|||
function onToggleLogPanel() {
|
||||
drawer_log.visible = !drawer_log.visible
|
||||
}
|
||||
function onShowWarningMessage(message) {
|
||||
popupWarning.popupWarningText = message
|
||||
popupWarning.open()
|
||||
}
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
|
|
@ -260,12 +264,6 @@ Window {
|
|||
text: qsTr("It's public key. Private key required")
|
||||
visible: false
|
||||
}
|
||||
MessageDialog {
|
||||
id: connectErrorDialog
|
||||
title: "AmneziaVPN"
|
||||
text: UiLogic.dialogConnectErrorText
|
||||
visible: false
|
||||
}
|
||||
|
||||
Drawer {
|
||||
id: drawer_log
|
||||
|
|
@ -375,4 +373,8 @@ Window {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
PopupWarning {
|
||||
id: popupWarning
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue