mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 19:15:04 -04:00
implement html5 notifications. (have to be explicitly requested under Config)
This commit is contained in:
parent
48f4497fe9
commit
60245c4f90
4 changed files with 37 additions and 3 deletions
|
@ -45,6 +45,12 @@ angular.module('MatrixWebClientController', ['matrixService'])
|
|||
$scope.config = matrixService.config();
|
||||
}
|
||||
};
|
||||
|
||||
$scope.closeConfig = function() {
|
||||
if ($scope.config) {
|
||||
$scope.config = undefined;
|
||||
}
|
||||
};
|
||||
|
||||
if (matrixService.config()) {
|
||||
eventStreamService.resume();
|
||||
|
@ -69,6 +75,15 @@ angular.module('MatrixWebClientController', ['matrixService'])
|
|||
console.log("Invalid access token -> log user out");
|
||||
$scope.logout();
|
||||
});
|
||||
|
||||
$scope.requestNotifications = function() {
|
||||
if (window.Notification) {
|
||||
console.log("Notification.permission: " + window.Notification.permission);
|
||||
window.Notification.requestPermission(function(){});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue