2023-05-06 06:52:23 +03:00
|
|
|
import QtQuick
|
2023-05-25 15:40:17 +08:00
|
|
|
import QtQuick.Controls
|
|
|
|
|
import QtQuick.Layouts
|
2023-06-01 11:25:33 +08:00
|
|
|
import QtQuick.Dialogs
|
2023-05-06 06:52:23 +03:00
|
|
|
|
2023-05-25 15:40:17 +08:00
|
|
|
import PageEnum 1.0
|
|
|
|
|
|
|
|
|
|
import "./"
|
|
|
|
|
import "../Controls2"
|
|
|
|
|
import "../Controls2/TextTypes"
|
|
|
|
|
import "../Config"
|
|
|
|
|
|
|
|
|
|
PageType {
|
|
|
|
|
id: root
|
|
|
|
|
|
2024-04-18 17:54:55 +04:00
|
|
|
defaultActiveFocusItem: header
|
|
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
FlickableType {
|
|
|
|
|
id: fl
|
2023-06-20 10:25:24 +09:00
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.bottom: parent.bottom
|
2023-06-01 11:25:33 +08:00
|
|
|
contentHeight: content.height
|
2023-05-25 15:40:17 +08:00
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
id: content
|
|
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
2023-05-25 15:40:17 +08:00
|
|
|
|
2023-08-26 10:08:50 +03:00
|
|
|
spacing: 0
|
|
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
HeaderType {
|
2024-04-18 17:54:55 +04:00
|
|
|
id: header
|
2023-06-01 11:25:33 +08:00
|
|
|
Layout.fillWidth: true
|
2023-08-26 10:08:50 +03:00
|
|
|
Layout.topMargin: 24
|
2023-06-01 11:25:33 +08:00
|
|
|
Layout.rightMargin: 16
|
|
|
|
|
Layout.leftMargin: 16
|
2023-05-25 15:40:17 +08:00
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
headerText: qsTr("Settings")
|
2024-04-18 17:54:55 +04:00
|
|
|
|
|
|
|
|
KeyNavigation.tab: account.rightButton
|
2023-06-01 11:25:33 +08:00
|
|
|
}
|
2023-05-25 15:40:17 +08:00
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
LabelWithButtonType {
|
2024-04-18 17:54:55 +04:00
|
|
|
id: account
|
2023-06-01 11:25:33 +08:00
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.topMargin: 16
|
2023-05-25 15:40:17 +08:00
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
text: qsTr("Servers")
|
2023-06-20 10:25:24 +09:00
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
leftImageSource: "qrc:/images/controls/server.svg"
|
2023-05-25 15:40:17 +08:00
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
clickedFunction: function() {
|
2023-09-06 13:37:37 +05:00
|
|
|
PageController.goToPage(PageEnum.PageSettingsServersList)
|
2023-06-01 11:25:33 +08:00
|
|
|
}
|
2024-04-18 17:54:55 +04:00
|
|
|
|
|
|
|
|
KeyNavigation.tab: connection.rightButton
|
2023-06-01 11:25:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DividerType {}
|
|
|
|
|
|
|
|
|
|
LabelWithButtonType {
|
2024-04-18 17:54:55 +04:00
|
|
|
id: connection
|
2023-06-01 11:25:33 +08:00
|
|
|
Layout.fillWidth: true
|
2023-05-25 15:40:17 +08:00
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
text: qsTr("Connection")
|
2023-06-20 10:25:24 +09:00
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
leftImageSource: "qrc:/images/controls/radio.svg"
|
2023-05-25 15:40:17 +08:00
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
clickedFunction: function() {
|
2023-09-06 13:37:37 +05:00
|
|
|
PageController.goToPage(PageEnum.PageSettingsConnection)
|
2023-05-25 15:40:17 +08:00
|
|
|
}
|
2024-04-18 17:54:55 +04:00
|
|
|
|
|
|
|
|
KeyNavigation.tab: application.rightButton
|
2023-05-25 15:40:17 +08:00
|
|
|
}
|
2023-05-27 22:46:41 +08:00
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
DividerType {}
|
2023-05-27 22:46:41 +08:00
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
LabelWithButtonType {
|
2024-04-18 17:54:55 +04:00
|
|
|
id: application
|
2023-05-27 22:46:41 +08:00
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
text: qsTr("Application")
|
2023-06-20 10:25:24 +09:00
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
leftImageSource: "qrc:/images/controls/app.svg"
|
2023-05-27 22:46:41 +08:00
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
clickedFunction: function() {
|
2023-09-06 13:37:37 +05:00
|
|
|
PageController.goToPage(PageEnum.PageSettingsApplication)
|
2023-05-27 22:46:41 +08:00
|
|
|
}
|
2024-04-18 17:54:55 +04:00
|
|
|
|
|
|
|
|
KeyNavigation.tab: backup.rightButton
|
2023-05-27 22:46:41 +08:00
|
|
|
}
|
|
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
DividerType {}
|
2023-05-27 22:46:41 +08:00
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
LabelWithButtonType {
|
2024-04-18 17:54:55 +04:00
|
|
|
id: backup
|
2023-05-27 22:46:41 +08:00
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
text: qsTr("Backup")
|
2023-06-20 10:25:24 +09:00
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
leftImageSource: "qrc:/images/controls/save.svg"
|
2023-06-01 11:25:33 +08:00
|
|
|
|
|
|
|
|
clickedFunction: function() {
|
2023-09-06 13:37:37 +05:00
|
|
|
PageController.goToPage(PageEnum.PageSettingsBackup)
|
2023-05-27 22:46:41 +08:00
|
|
|
}
|
2024-04-18 17:54:55 +04:00
|
|
|
|
|
|
|
|
KeyNavigation.tab: about.rightButton
|
2023-06-01 11:25:33 +08:00
|
|
|
}
|
2023-05-27 22:46:41 +08:00
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
DividerType {}
|
2023-05-27 22:46:41 +08:00
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
LabelWithButtonType {
|
2023-10-12 01:15:05 +01:00
|
|
|
id: about
|
2023-06-01 11:25:33 +08:00
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
|
|
text: qsTr("About AmneziaVPN")
|
2023-06-20 10:25:24 +09:00
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
leftImageSource: "qrc:/images/controls/amnezia.svg"
|
2023-06-01 11:25:33 +08:00
|
|
|
|
|
|
|
|
clickedFunction: function() {
|
2023-09-06 13:37:37 +05:00
|
|
|
PageController.goToPage(PageEnum.PageSettingsAbout)
|
2023-05-27 22:46:41 +08:00
|
|
|
}
|
2024-04-18 17:54:55 +04:00
|
|
|
KeyNavigation.tab: close
|
|
|
|
|
|
2023-05-27 22:46:41 +08:00
|
|
|
}
|
2023-06-01 11:25:33 +08:00
|
|
|
|
|
|
|
|
DividerType {}
|
2023-10-09 19:16:06 +05:00
|
|
|
|
|
|
|
|
LabelWithButtonType {
|
2024-04-18 17:54:55 +04:00
|
|
|
id: close
|
2023-10-14 23:59:46 +01:00
|
|
|
visible: GC.isDesktop()
|
2023-10-09 19:16:06 +05:00
|
|
|
Layout.fillWidth: true
|
2023-10-12 01:15:05 +01:00
|
|
|
Layout.preferredHeight: about.height
|
2023-10-09 19:16:06 +05:00
|
|
|
|
|
|
|
|
text: qsTr("Close application")
|
|
|
|
|
leftImageSource: "qrc:/images/controls/x-circle.svg"
|
2024-04-18 17:54:55 +04:00
|
|
|
isLeftImageHoverEnabled: false
|
|
|
|
|
|
|
|
|
|
Keys.onTabPressed: lastItemTabClicked(header)
|
2023-10-09 19:16:06 +05:00
|
|
|
|
|
|
|
|
clickedFunction: function() {
|
|
|
|
|
PageController.closeApplication()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-12 10:57:13 +05:00
|
|
|
DividerType {
|
2023-10-14 23:59:46 +01:00
|
|
|
visible: GC.isDesktop()
|
2023-10-12 10:57:13 +05:00
|
|
|
}
|
2023-05-25 15:40:17 +08:00
|
|
|
}
|
2023-06-01 11:25:33 +08:00
|
|
|
}
|
2023-05-06 06:52:23 +03:00
|
|
|
}
|