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

This commit is contained in:
vladimir.kuznetsov 2023-01-18 20:06:01 +03:00
commit 8ea80a616e
54 changed files with 876 additions and 1778 deletions

View file

@ -10,7 +10,6 @@ PageBase {
page: PageEnum.ServerConfiguringProgress
logic: ServerConfiguringProgressLogic
enabled: ServerConfiguringProgressLogic.pageEnabled
Caption {
id: caption
text: qsTr("Configuring...")
@ -27,6 +26,22 @@ PageBase {
horizontalAlignment: Text.AlignHCenter
}
LabelType {
id: labelServerBusy
x: 0
anchors.top: label.bottom
anchors.topMargin: 30
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
width: parent.width - 40
height: 41
text: ServerConfiguringProgressLogic.labelServerBusyText
visible: ServerConfiguringProgressLogic.labelServerBusyVisible
}
LabelType {
anchors.bottom: pr.top
anchors.bottomMargin: 20
@ -40,14 +55,27 @@ PageBase {
visible: ServerConfiguringProgressLogic.labelWaitInfoVisible
}
ProgressBar {
id: pr
BlueButtonType {
id: pb_cancel
z: 1
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: logo.bottom
anchors.bottomMargin: 40
width: parent.width - 40
width: root.width - 60
height: 40
text: qsTr("Cancel")
visible: ServerConfiguringProgressLogic.pushButtonCancelVisible
enabled: ServerConfiguringProgressLogic.pushButtonCancelVisible
onClicked: {
ServerConfiguringProgressLogic.onPushButtonCancelClicked()
}
}
ProgressBar {
id: pr
enabled: ServerConfiguringProgressLogic.pageEnabled
anchors.fill: pb_cancel
from: 0
to: ServerConfiguringProgressLogic.progressBarMaximium
value: ServerConfiguringProgressLogic.progressBarValue

View file

@ -190,12 +190,12 @@ PageBase {
left: parent.left;
right: parent.right;
}
topPadding: 20
spacing: 10
Caption {
id: cap1
text: qsTr("Installed Protocols and Services")
leftPadding: -20
font.pixelSize: 20
}

View file

@ -96,19 +96,19 @@ PageBase {
BlueButtonType {
Layout.fillWidth: true
Layout.topMargin: 10
text: ServerSettingsLogic.pushButtonClearText
visible: ServerSettingsLogic.pushButtonClearVisible
text: ServerSettingsLogic.pushButtonClearClientCacheText
visible: ServerSettingsLogic.pushButtonClearClientCacheVisible
onClicked: {
ServerSettingsLogic.onPushButtonClearServer()
ServerSettingsLogic.onPushButtonClearClientCacheClicked()
}
}
BlueButtonType {
Layout.fillWidth: true
Layout.topMargin: 10
text: ServerSettingsLogic.pushButtonClearClientCacheText
visible: ServerSettingsLogic.pushButtonClearClientCacheVisible
text: ServerSettingsLogic.pushButtonClearText
visible: ServerSettingsLogic.pushButtonClearVisible
onClicked: {
ServerSettingsLogic.onPushButtonClearClientCacheClicked()
ServerSettingsLogic.onPushButtonClearServer()
}
}
BlueButtonType {

View file

@ -31,6 +31,7 @@ PageBase {
}
UrlButtonType {
id: button_donate
y: 10
anchors.horizontalCenter: parent.horizontalCenter
height: 21
@ -55,6 +56,21 @@ PageBase {
}
}
LabelType {
id: lb_log_enabled
anchors.top: button_donate.bottom
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width
height: 21
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: "Logging enabled!"
color: "#D4D4D4"
visible: VpnLogic.labelLogEnabledVisible
}
AnimatedImage {
id: connect_anim
source: "qrc:/images/animation.gif"

View file

@ -14,6 +14,7 @@ PageProtocolBase {
enabled: logic.pageEnabled
BackButton {
id: back
enabled: logic.pageEnabled
}
Caption {
@ -110,17 +111,24 @@ PageProtocolBase {
}
}
LabelType {
id: label_server_busy
horizontalAlignment: Text.AlignHCenter
Layout.maximumWidth: parent.width
Layout.fillWidth: true
visible: logic.labelServerBusyVisible
text: logic.labelServerBusyText
}
LabelType {
id: label_proto_cloak_info
x: 30
anchors.bottom: pb_save.top
anchors.bottomMargin: 10
width: parent.width - 40
horizontalAlignment: Text.AlignHCenter
Layout.maximumWidth: parent.width
Layout.fillWidth: true
visible: logic.labelInfoVisible
text: logic.labelInfoText
}
ProgressBar {
id: progressBar_proto_cloak_reset
anchors.horizontalCenter: parent.horizontalCenter
@ -146,6 +154,19 @@ PageProtocolBase {
}
}
visible: logic.progressBarResetVisible
LabelType {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
text: logic.progressBarText
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.family: "Lato"
font.styleName: "normal"
font.pixelSize: 16
color: "#D4D4D4"
visible: logic.progressBarTextVisible
}
}
BlueButtonType {
id: pb_save
@ -162,4 +183,13 @@ PageProtocolBase {
}
}
BlueButtonType {
anchors.fill: pb_save
text: qsTr("Cancel")
visible: logic.pushButtonCancelVisible
enabled: logic.pushButtonCancelVisible
onClicked: {
logic.onPushButtonCancelClicked()
}
}
}

View file

@ -13,7 +13,9 @@ PageProtocolBase {
BackButton {
id: back
enabled: logic.pageEnabled
}
Caption {
id: caption
text: qsTr("OpenVPN Settings")
@ -33,16 +35,17 @@ PageProtocolBase {
ColumnLayout {
visible: !logic.isThirdPartyConfig
enabled: logic.pageEnabled
LabelType {
id: lb_subnet
enabled: logic.pageEnabled
height: 21
text: qsTr("VPN Addresses Subnet")
}
TextFieldType {
id: tf_subnet
enabled: logic.pageEnabled
implicitWidth: parent.width
height: 31
text: logic.lineEditSubnetText
@ -51,15 +54,17 @@ PageProtocolBase {
}
}
//
LabelType {
id: lb_proto
enabled: logic.pageEnabled
Layout.topMargin: 20
height: 21
text: qsTr("Network protocol")
}
Rectangle {
id: rect_proto
enabled: logic.pageEnabled
implicitWidth: parent.width
height: 71
border.width: 1
@ -91,8 +96,8 @@ PageProtocolBase {
}
}
//
RowLayout {
enabled: logic.pageEnabled
Layout.topMargin: 10
Layout.fillWidth: true
LabelType {
@ -114,12 +119,9 @@ PageProtocolBase {
}
}
//
CheckBoxType {
id: check_auto_enc
enabled: logic.pageEnabled
implicitWidth: parent.width
height: 21
text: qsTr("Auto-negotiate encryption")
@ -132,15 +134,16 @@ PageProtocolBase {
}
}
//
LabelType {
id: lb_cipher
enabled: logic.pageEnabled
height: 21
text: qsTr("Cipher")
}
ComboBoxType {
id: cb_cipher
enabled: logic.pageEnabled && !check_auto_enc.checked
implicitWidth: parent.width
height: 31
@ -167,18 +170,19 @@ PageProtocolBase {
onCurrentTextChanged: {
logic.comboBoxVpnCipherText = currentText
}
enabled: !check_auto_enc.checked
}
//
LabelType {
id: lb_hash
enabled: logic.pageEnabled
height: 21
Layout.topMargin: 20
text: qsTr("Hash")
}
ComboBoxType {
id: cb_hash
enabled: logic.pageEnabled && !check_auto_enc.checked
height: 31
implicitWidth: parent.width
model: [
@ -204,11 +208,11 @@ PageProtocolBase {
onCurrentTextChanged: {
logic.comboBoxVpnHashText = currentText
}
enabled: !check_auto_enc.checked
}
CheckBoxType {
id: check_tls
enabled: logic.pageEnabled
implicitWidth: parent.width
Layout.topMargin: 20
height: 21
@ -222,6 +226,7 @@ PageProtocolBase {
CheckBoxType {
id: check_block_dns
enabled: logic.pageEnabled
implicitWidth: parent.width
height: 21
text: qsTr("Block DNS requests outside of VPN")
@ -231,10 +236,9 @@ PageProtocolBase {
}
}
BasicButtonType {
id: pb_client_config
enabled: logic.pageEnabled
implicitWidth: parent.width
height: 21
text: qsTr("Additional client config commands →")
@ -259,6 +263,7 @@ PageProtocolBase {
Rectangle {
id: rect_client_conf
enabled: logic.pageEnabled
implicitWidth: root.width - 60
height: 101
border.width: 1
@ -284,10 +289,9 @@ PageProtocolBase {
}
BasicButtonType {
id: pb_server_config
enabled: logic.pageEnabled
implicitWidth: parent.width
height: 21
text: qsTr("Additional server config commands →")
@ -312,6 +316,7 @@ PageProtocolBase {
Rectangle {
id: rect_server_conf
enabled: logic.pageEnabled
implicitWidth: root.width - 60
height: 101
border.width: 1
@ -338,8 +343,21 @@ PageProtocolBase {
}
LabelType {
id: label_proto_openvpn_info
id: label_server_busy
enabled: logic.pageEnabled
horizontalAlignment: Text.AlignHCenter
Layout.maximumWidth: parent.width
Layout.fillWidth: true
visible: logic.labelServerBusyVisible
text: logic.labelServerBusyText
}
LabelType {
id: label_proto_openvpn_info
enabled: logic.pageEnabled
horizontalAlignment: Text.AlignHCenter
Layout.maximumWidth: parent.width
Layout.fillWidth: true
height: 41
visible: logic.labelProtoOpenVpnInfoVisible
text: logic.labelProtoOpenVpnInfoText
@ -353,13 +371,25 @@ PageProtocolBase {
BlueButtonType {
id: pb_save
enabled: logic.pageEnabled
z: 1
height: 40
text: qsTr("Save and restart VPN")
width: parent.width
visible: logic.pushButtonSaveVisible
onClicked: {
logic.onPushButtonProtoOpenVpnSaveClicked()
logic.onPushButtonSaveClicked()
}
}
BlueButtonType {
z: 1
anchors.fill: pb_save
text: qsTr("Cancel")
visible: logic.pushButtonCancelVisible
enabled: logic.pushButtonCancelVisible
onClicked: {
logic.onPushButtonCancelClicked()
}
}
@ -389,6 +419,19 @@ PageProtocolBase {
}
}
LabelType {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
text: logic.progressBarText
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.family: "Lato"
font.styleName: "normal"
font.pixelSize: 16
color: "#D4D4D4"
visible: logic.progressBarTextVisible
}
}
}
@ -412,5 +455,4 @@ PageProtocolBase {
}
}
}
}

View file

@ -13,6 +13,7 @@ PageProtocolBase {
BackButton {
id: back
enabled: logic.pageEnabled
}
Caption {
@ -88,27 +89,33 @@ PageProtocolBase {
Item {
Layout.fillHeight: true
}
}
LabelType {
id: label_server_busy
horizontalAlignment: Text.AlignHCenter
Layout.maximumWidth: parent.width
Layout.fillWidth: true
visible: logic.labelServerBusyVisible
text: logic.labelServerBusyText
}
LabelType {
id: label_proto_shadowsocks_info
x: 30
anchors.bottom: pb_save.top
anchors.bottomMargin: 10
width: parent.width - 40
height: 41
visible: logic.labelInfoVisible
text: logic.labelInfoText
LabelType {
id: label_proto_shadowsocks_info
horizontalAlignment: Text.AlignHCenter
Layout.maximumWidth: parent.width
Layout.fillWidth: true
visible: logic.labelInfoVisible
text: logic.labelInfoText
}
}
ProgressBar {
id: progressBar_reset
anchors.fill: pb_save
from: 0
to: logic.progressBaResetMaximium
value: logic.progressBaResetValue
visible: logic.progressBaResetVisible
to: logic.progressBarResetMaximium
value: logic.progressBarResetValue
visible: logic.progressBarResetVisible
background: Rectangle {
implicitWidth: parent.width
implicitHeight: parent.height
@ -126,6 +133,19 @@ PageProtocolBase {
color: Qt.rgba(255, 255, 255, 0.15);
}
}
LabelType {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
text: logic.progressBarText
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.family: "Lato"
font.styleName: "normal"
font.pixelSize: 16
color: "#D4D4D4"
visible: logic.progressBarTextVisible
}
}
BlueButtonType {
@ -142,4 +162,14 @@ PageProtocolBase {
logic.onPushButtonSaveClicked()
}
}
BlueButtonType {
anchors.fill: pb_save
text: qsTr("Cancel")
visible: logic.pushButtonCancelVisible
enabled: logic.pushButtonCancelVisible
onClicked: {
logic.onPushButtonCancelClicked()
}
}
}