added a drawer to change the server name and moved the display of the exported config to a separate drawer
This commit is contained in:
parent
4224e8314b
commit
3a264e6baf
30 changed files with 276 additions and 159 deletions
|
|
@ -51,7 +51,6 @@ PageType {
|
|||
Rectangle {
|
||||
id: buttonBackground
|
||||
anchors.fill: buttonContent
|
||||
anchors.bottomMargin: -radius
|
||||
|
||||
radius: 16
|
||||
color: root.defaultColor
|
||||
|
|
@ -59,11 +58,12 @@ PageType {
|
|||
border.width: 1
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: 1
|
||||
y: parent.height - height - parent.radius
|
||||
|
||||
color: root.borderColor
|
||||
width: parent.radius
|
||||
height: parent.radius
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
color: parent.color
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ PageType {
|
|||
|
||||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: root.top
|
||||
anchors.bottom: root.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -40,8 +40,8 @@ PageType {
|
|||
Layout.topMargin: 16
|
||||
|
||||
text: qsTr("Servers")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
iconImage: "qrc:/images/controls/server.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
leftImageSource: "qrc:/images/controls/server.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
goToPage(PageEnum.PageSettingsServersList)
|
||||
|
|
@ -54,8 +54,8 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Connection")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
iconImage: "qrc:/images/controls/radio.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
leftImageSource: "qrc:/images/controls/radio.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
goToPage(PageEnum.PageSettingsConnection)
|
||||
|
|
@ -68,8 +68,8 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Application")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
iconImage: "qrc:/images/controls/app.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
leftImageSource: "qrc:/images/controls/app.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
goToPage(PageEnum.PageSettingsApplication)
|
||||
|
|
@ -82,8 +82,8 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Backup")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
iconImage: "qrc:/images/controls/save.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
leftImageSource: "qrc:/images/controls/save.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
goToPage(PageEnum.PageSettingsBackup)
|
||||
|
|
@ -96,8 +96,8 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("About AmneziaVPN")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
iconImage: "qrc:/images/controls/amnezia.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
leftImageSource: "qrc:/images/controls/amnezia.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
goToPage(PageEnum.PageSettingsAbout)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ PageType {
|
|||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: backButton.bottom
|
||||
anchors.bottom: root.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -102,8 +102,7 @@ And if you don't like the app, all the more support it - the donation will be us
|
|||
|
||||
text: qsTr("Show other methods on Github")
|
||||
|
||||
onClicked: {
|
||||
}
|
||||
onClicked: Qt.openUrlExternally("https://github.com/amnezia-vpn/amnezia-client")
|
||||
}
|
||||
|
||||
ParagraphTextType {
|
||||
|
|
@ -121,11 +120,10 @@ And if you don't like the app, all the more support it - the donation will be us
|
|||
|
||||
text: qsTr("Telegram group")
|
||||
descriptionText: qsTr("To discuss features")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
iconImage: "qrc:/images/controls/telegram.svg"
|
||||
leftImageSource: "qrc:/images/controls/telegram.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
goToPage(PageEnum.PageSettingsAbout)
|
||||
Qt.openUrlExternally("https://t.me/amnezia_vpn_dev")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -136,11 +134,9 @@ And if you don't like the app, all the more support it - the donation will be us
|
|||
|
||||
text: qsTr("Mail")
|
||||
descriptionText: qsTr("For reviews and bug reports")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
iconImage: "qrc:/images/controls/mail.svg"
|
||||
leftImageSource: "qrc:/images/controls/mail.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
goToPage(PageEnum.PageSettingsAbout)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -150,11 +146,10 @@ And if you don't like the app, all the more support it - the donation will be us
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Github")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
iconImage: "qrc:/images/controls/github.svg"
|
||||
leftImageSource: "qrc:/images/controls/github.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
goToPage(PageEnum.PageSettingsAbout)
|
||||
Qt.openUrlExternally("https://github.com/amnezia-vpn/amnezia-client")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -164,11 +159,9 @@ And if you don't like the app, all the more support it - the donation will be us
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Website")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
iconImage: "qrc:/images/controls/amnezia.svg"
|
||||
leftImageSource: "qrc:/images/controls/amnezia.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
goToPage(PageEnum.PageSettingsAbout)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ PageType {
|
|||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: backButton.bottom
|
||||
anchors.bottom: root.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -35,22 +35,21 @@ PageType {
|
|||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
|
||||
spacing: 16
|
||||
|
||||
HeaderType {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
|
||||
headerText: qsTr("Application")
|
||||
}
|
||||
|
||||
LabelWithButtonType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
|
||||
text: qsTr("Language")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
}
|
||||
|
|
@ -62,7 +61,7 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Reset settings and remove all data from the application")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ PageType {
|
|||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: backButton.bottom
|
||||
anchors.bottom: root.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ PageType {
|
|||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: backButton.bottom
|
||||
anchors.bottom: root.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -35,8 +35,6 @@ PageType {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
spacing: 16
|
||||
|
||||
HeaderType {
|
||||
Layout.fillWidth: true
|
||||
Layout.leftMargin: 16
|
||||
|
|
@ -47,6 +45,8 @@ PageType {
|
|||
|
||||
SwitcherType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
Layout.bottomMargin: 16
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ PageType {
|
|||
|
||||
text: qsTr("DNS servers")
|
||||
descriptionText: qsTr("If AmneziaDNS is not used or installed")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
goToPage(PageEnum.PageSettingsDns)
|
||||
|
|
@ -82,7 +82,7 @@ PageType {
|
|||
|
||||
text: qsTr("Split site tunneling")
|
||||
descriptionText: qsTr("Allows you to connect to some sites through a secure connection, and to others bypassing it")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ PageType {
|
|||
|
||||
text: qsTr("Separate application tunneling")
|
||||
descriptionText: qsTr("Allows you to use the VPN only for certain applications")
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ PageType {
|
|||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: backButton.bottom
|
||||
anchors.bottom: root.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ PageType {
|
|||
|
||||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: root.top
|
||||
anchors.bottom: root.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
|||
|
|
@ -54,10 +54,60 @@ PageType {
|
|||
actionButtonImage: "qrc:/images/controls/edit-3.svg"
|
||||
|
||||
headerText: name
|
||||
descriptionText: hostName
|
||||
descriptionText: credentialsLogin + " · " + hostName
|
||||
|
||||
actionButtonFunction: function() {
|
||||
connectionTypeSelection.visible = true
|
||||
serverNameEditDrawer.visible = true
|
||||
}
|
||||
}
|
||||
|
||||
DrawerType {
|
||||
id: serverNameEditDrawer
|
||||
|
||||
width: root.width
|
||||
height: root.height * 0.35
|
||||
|
||||
onVisibleChanged: {
|
||||
if (serverNameEditDrawer.visible) {
|
||||
serverName.textField.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: 16
|
||||
anchors.leftMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
|
||||
TextFieldWithHeaderType {
|
||||
id: serverName
|
||||
|
||||
Layout.fillWidth: true
|
||||
headerText: qsTr("Server name")
|
||||
textFieldText: name
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: qsTr("Save")
|
||||
|
||||
onClicked: {
|
||||
if (serverName.textFieldText !== name) {
|
||||
name = serverName.textFieldText
|
||||
serverNameEditDrawer.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ PageType {
|
|||
|
||||
text: name
|
||||
descriptionText: hostName
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
ServersModel.setCurrentlyProcessedServerIndex(index)
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ PageType {
|
|||
|
||||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: root.top
|
||||
anchors.bottom: root.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -58,8 +58,8 @@ PageType {
|
|||
Layout.topMargin: 16
|
||||
|
||||
text: "Файл с настройками подключения"
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
iconImage: "qrc:/images/controls/folder-open.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
leftImageSource: "qrc:/images/controls/folder-open.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
onClicked: fileDialog.open()
|
||||
|
|
@ -81,8 +81,8 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: "QR-код"
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
iconImage: "qrc:/images/controls/qr-code.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
leftImageSource: "qrc:/images/controls/qr-code.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
}
|
||||
|
|
@ -94,8 +94,8 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
|
||||
text: "Ключ в виде текста"
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
iconImage: "qrc:/images/controls/text-cursor.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
leftImageSource: "qrc:/images/controls/text-cursor.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
goToPage(PageEnum.PageSetupWizardTextKey)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ PageType {
|
|||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: backButton.bottom
|
||||
anchors.bottom: root.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ PageType {
|
|||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: backButton.bottom
|
||||
anchors.bottom: root.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.implicitHeight + continueButton.anchors.bottomMargin
|
||||
|
||||
Column {
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ PageType {
|
|||
|
||||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: root.top
|
||||
anchors.bottom: root.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
Column {
|
||||
|
|
@ -87,7 +87,7 @@ PageType {
|
|||
|
||||
text: name
|
||||
descriptionText: description
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(index))
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ PageType {
|
|||
|
||||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: root.top
|
||||
anchors.bottom: root.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ PageType {
|
|||
|
||||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: root.top
|
||||
anchors.bottom: root.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ PageType {
|
|||
FlickableType {
|
||||
id: fl
|
||||
anchors.top: backButton.bottom
|
||||
anchors.bottom: root.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.implicitHeight + connectButton.implicitHeight
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ PageType {
|
|||
}
|
||||
|
||||
FlickableType {
|
||||
anchors.top: root.top
|
||||
anchors.bottom: root.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -121,6 +121,7 @@ PageType {
|
|||
|
||||
ParagraphTextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 24
|
||||
|
||||
text: accessTypeSelector.currentIndex === 0 ? qsTr("VPN access without the ability to manage the server") :
|
||||
qsTr("Full access to server")
|
||||
|
|
@ -222,7 +223,6 @@ PageType {
|
|||
roleName: "isInstalled"
|
||||
value: true
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -231,6 +231,7 @@ PageType {
|
|||
clickedFunction: function () {
|
||||
serverSelector.text += ", " + selectedText
|
||||
shareConnectionDrawer.headerText = qsTr("Connection to ") + serverSelector.text
|
||||
shareConnectionDrawer.configContentHeaderText = qsTr("File with connection settings to ") + serverSelector.text
|
||||
ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(currentIndex))
|
||||
|
||||
protocolSelector.visible = false
|
||||
|
|
@ -242,6 +243,7 @@ PageType {
|
|||
Component.onCompleted: {
|
||||
serverSelector.text += ", " + selectedText
|
||||
shareConnectionDrawer.headerText = qsTr("Connection to ") + serverSelector.text
|
||||
shareConnectionDrawer.configContentHeaderText = qsTr("File with connection settings to ") + serverSelector.text
|
||||
ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(currentIndex))
|
||||
|
||||
fillConnectionTypeModel()
|
||||
|
|
|
|||
|
|
@ -59,11 +59,13 @@ PageType {
|
|||
anchors.bottom: parent.bottom
|
||||
|
||||
topPadding: 8
|
||||
bottomPadding: 34
|
||||
bottomPadding: 8//34
|
||||
leftPadding: 96
|
||||
rightPadding: 96
|
||||
|
||||
background: Rectangle {
|
||||
border.width: 1
|
||||
border.color: "#2C2D30"
|
||||
color: "#1C1D21"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ Item {
|
|||
Layout.rightMargin: 16
|
||||
|
||||
text: "IP, логин и пароль от сервера"
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
|
@ -139,7 +139,7 @@ Item {
|
|||
Layout.rightMargin: 16
|
||||
|
||||
text: "QR-код, ключ или файл настроек"
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue