Ask for enable html5 notification on chrome
This commit is contained in:
parent
7981f5af66
commit
70cae4135f
3 changed files with 5 additions and 3 deletions
|
|
@ -23,7 +23,6 @@ angular.module('copay.header').controller('HeaderController',
|
||||||
|
|
||||||
// Initialize alert notification (not show when init wallet)
|
// Initialize alert notification (not show when init wallet)
|
||||||
$rootScope.txAlertCount = 0;
|
$rootScope.txAlertCount = 0;
|
||||||
$notification.enableHtml5Mode(); // for chrome: if support, enable it
|
|
||||||
$rootScope.$watch('txAlertCount', function(txAlertCount) {
|
$rootScope.$watch('txAlertCount', function(txAlertCount) {
|
||||||
if (txAlertCount && txAlertCount > 0) {
|
if (txAlertCount && txAlertCount > 0) {
|
||||||
$notification.info('New Transaction', ($rootScope.txAlertCount == 1) ? 'You have a pending transaction proposal' : 'You have ' + $rootScope.txAlertCount + ' pending transaction proposals', txAlertCount);
|
$notification.info('New Transaction', ($rootScope.txAlertCount == 1) ? 'You have a pending transaction proposal' : 'You have ' + $rootScope.txAlertCount + ' pending transaction proposals', txAlertCount);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copay.controllerUtils')
|
angular.module('copay.controllerUtils')
|
||||||
.factory('controllerUtils', function($rootScope, $sce, $location, Socket, video) {
|
.factory('controllerUtils', function($rootScope, $sce, $location, $notification, Socket, video) {
|
||||||
var root = {};
|
var root = {};
|
||||||
var bitcore = require('bitcore');
|
var bitcore = require('bitcore');
|
||||||
|
|
||||||
|
|
@ -49,6 +49,9 @@ angular.module('copay.controllerUtils')
|
||||||
};
|
};
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$notification.enableHtml5Mode(); // for chrome: if support, enable it
|
||||||
|
|
||||||
w.on('badMessage', function(peerId) {
|
w.on('badMessage', function(peerId) {
|
||||||
$rootScope.flashMessage = {
|
$rootScope.flashMessage = {
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
angular.module('notifications', []).
|
angular.module('notifications', []).
|
||||||
factory('$notification', ['$timeout',function($timeout){
|
factory('$notification', ['$timeout',function($timeout){
|
||||||
|
|
||||||
console.log('notification service online');
|
// console.log('notification service online');
|
||||||
var notifications = JSON.parse(localStorage.getItem('$notifications')) || [],
|
var notifications = JSON.parse(localStorage.getItem('$notifications')) || [],
|
||||||
queue = [];
|
queue = [];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue