Update angular-ui-notification and show unread notifications
This commit is contained in:
@@ -9,6 +9,7 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
|
||||
$scope.client = Client;
|
||||
$scope.appstoreConfig = {};
|
||||
$scope.subscription = {};
|
||||
$scope.notifications = [];
|
||||
$scope.ready = false;
|
||||
|
||||
$scope.hideNavBarActions = $location.path() === '/logs';
|
||||
@@ -105,6 +106,14 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
|
||||
|
||||
Client.notify('Reboot Required', 'To finish security updates, a reboot is necessary.', true /* persistent */, 'warning', actionScope);
|
||||
});
|
||||
|
||||
Client.getNotifications(false, 1, 100, function (error, results) {
|
||||
$scope.notifications = results;
|
||||
|
||||
results.forEach(function (n) {
|
||||
Client.notify(n.title, n.message, true /* persistent */, 'info', n.action);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$scope.fetchAppstoreProfileAndSubscription = function (callback) {
|
||||
|
||||
Reference in New Issue
Block a user