Android notification and routing (#797)

Android notification and routing
This commit is contained in:
albexk 2024-05-12 18:04:14 +03:00 committed by GitHub
parent ff348a348c
commit abb3c918e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 1108 additions and 543 deletions

View file

@ -74,7 +74,8 @@ PageType {
}
}
KeyNavigation.tab: labelWithButtonLanguage.rightButton
KeyNavigation.tab: Qt.platform.os === "android" && !SettingsController.isNotificationPermissionGranted ?
labelWithButtonNotification.rightButton : labelWithButtonLanguage.rightButton
parentFlickable: fl
}
@ -82,6 +83,27 @@ PageType {
visible: GC.isMobile()
}
LabelWithButtonType {
id: labelWithButtonNotification
visible: Qt.platform.os === "android" && !SettingsController.isNotificationPermissionGranted
Layout.fillWidth: true
text: qsTr("Enable notifications")
descriptionText: qsTr("Enable notifications to show the VPN state in the status bar")
rightImageSource: "qrc:/images/controls/chevron-right.svg"
KeyNavigation.tab: labelWithButtonLanguage.rightButton
parentFlickable: fl
clickedFunction: function() {
SettingsController.requestNotificationPermission()
}
}
DividerType {
visible: Qt.platform.os === "android" && !SettingsController.isNotificationPermissionGranted
}
SwitcherType {
id: switcherAutoStart
visible: !GC.isMobile()
@ -173,7 +195,6 @@ PageType {
}
}
DividerType {}
LabelWithButtonType {