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
|
2024-08-20 16:54:05 +07:00
|
|
|
import Style 1.0
|
2023-05-25 15:40:17 +08:00
|
|
|
|
|
|
|
|
import "./"
|
|
|
|
|
import "../Controls2"
|
|
|
|
|
import "../Controls2/TextTypes"
|
|
|
|
|
import "../Config"
|
|
|
|
|
|
|
|
|
|
PageType {
|
|
|
|
|
id: root
|
|
|
|
|
|
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
|
|
|
|
|
|
2025-05-02 23:54:36 -07:00
|
|
|
BaseHeaderType {
|
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")
|
|
|
|
|
}
|
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
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
}
|
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
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-01 11:25:33 +08:00
|
|
|
DividerType {}
|
2023-05-27 22:46:41 +08:00
|
|
|
|
2025-06-20 02:22:44 +04:00
|
|
|
LabelWithButtonType {
|
|
|
|
|
id: news
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
|
|
text: qsTr("News & Notifications")
|
|
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
leftImageSource: NewsModel.hasUnread ? "qrc:/images/controls/news-unread.svg" : "qrc:/images/controls/news.svg"
|
|
|
|
|
|
|
|
|
|
clickedFunction: function() {
|
|
|
|
|
PageController.goToPage(PageEnum.PageSettingsNewsNotifications)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DividerType {}
|
|
|
|
|
|
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
|
|
|
}
|
2023-06-01 11:25:33 +08:00
|
|
|
}
|
2023-05-27 22:46:41 +08:00
|
|
|
|
2025-01-28 14:55:08 +07: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
|
|
|
}
|
|
|
|
|
}
|
2023-06-01 11:25:33 +08:00
|
|
|
|
|
|
|
|
DividerType {}
|
2023-10-09 19:16:06 +05:00
|
|
|
|
2024-08-20 16:54:05 +07:00
|
|
|
LabelWithButtonType {
|
|
|
|
|
id: devConsole
|
|
|
|
|
visible: SettingsController.isDevModeEnabled
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
|
|
text: qsTr("Dev console")
|
|
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
leftImageSource: "qrc:/images/controls/bug.svg"
|
|
|
|
|
|
|
|
|
|
clickedFunction: function() {
|
|
|
|
|
PageController.goToPage(PageEnum.PageDevMenu)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DividerType {
|
|
|
|
|
visible: SettingsController.isDevModeEnabled
|
|
|
|
|
}
|
|
|
|
|
|
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-12-31 04:16:52 +01:00
|
|
|
isLeftImageHoverEnabled: false
|
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
|
|
|
}
|