Files
amnezia-client/client/ui/qml/Pages2/PageSettings.qml
T

154 lines
4.1 KiB
QML
Raw Normal View History

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
2023-06-01 11:25:33 +08:00
import QtQuick.Dialogs
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
anchors.top: parent.top
anchors.bottom: parent.bottom
2023-06-01 11:25:33 +08:00
contentHeight: content.height
ColumnLayout {
id: content
2023-06-01 11:25:33 +08:00
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
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-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-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-06-01 11:25:33 +08:00
text: qsTr("Servers")
rightImageSource: "qrc:/images/controls/chevron-right.svg"
leftImageSource: "qrc:/images/controls/server.svg"
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-06-01 11:25:33 +08:00
text: qsTr("Connection")
rightImageSource: "qrc:/images/controls/chevron-right.svg"
leftImageSource: "qrc:/images/controls/radio.svg"
2023-06-01 11:25:33 +08:00
clickedFunction: function() {
2023-09-06 13:37:37 +05:00
PageController.goToPage(PageEnum.PageSettingsConnection)
}
2024-04-18 17:54:55 +04:00
KeyNavigation.tab: application.rightButton
}
2023-06-01 11:25:33 +08:00
DividerType {}
2023-06-01 11:25:33 +08:00
LabelWithButtonType {
2024-04-18 17:54:55 +04:00
id: application
Layout.fillWidth: true
2023-06-01 11:25:33 +08:00
text: qsTr("Application")
rightImageSource: "qrc:/images/controls/chevron-right.svg"
leftImageSource: "qrc:/images/controls/app.svg"
2023-06-01 11:25:33 +08:00
clickedFunction: function() {
2023-09-06 13:37:37 +05:00
PageController.goToPage(PageEnum.PageSettingsApplication)
}
2024-04-18 17:54:55 +04:00
KeyNavigation.tab: backup.rightButton
}
2023-06-01 11:25:33 +08:00
DividerType {}
2023-06-01 11:25:33 +08:00
LabelWithButtonType {
2024-04-18 17:54:55 +04:00
id: backup
Layout.fillWidth: true
2023-06-01 11:25:33 +08:00
text: qsTr("Backup")
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)
}
2024-04-18 17:54:55 +04:00
KeyNavigation.tab: about.rightButton
2023-06-01 11:25:33 +08:00
}
2023-06-01 11:25:33 +08:00
DividerType {}
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")
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)
}
2024-04-18 17:54:55 +04:00
KeyNavigation.tab: close
}
2023-06-01 11:25:33 +08:00
DividerType {}
LabelWithButtonType {
2024-04-18 17:54:55 +04:00
id: close
2023-10-14 23:59:46 +01:00
visible: GC.isDesktop()
Layout.fillWidth: true
2023-10-12 01:15:05 +01:00
Layout.preferredHeight: about.height
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)
clickedFunction: function() {
PageController.closeApplication()
}
}
DividerType {
2023-10-14 23:59:46 +01:00
visible: GC.isDesktop()
}
}
2023-06-01 11:25:33 +08:00
}
}