mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
Android notification and routing (#797)
Android notification and routing
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user