fixes notification for invalid credentials
This commit is contained in:
parent
ad45eca130
commit
b08ccb6111
6 changed files with 24 additions and 18 deletions
|
|
@ -185,6 +185,7 @@ factory('notification', ['$timeout',
|
|||
'timestamp': +new Date(),
|
||||
'userData': userData
|
||||
};
|
||||
|
||||
notifications.push(notification);
|
||||
|
||||
if (settings.html5Mode) {
|
||||
|
|
@ -193,7 +194,10 @@ factory('notification', ['$timeout',
|
|||
}, function() {
|
||||
// inner on close function
|
||||
});
|
||||
} else {
|
||||
}
|
||||
|
||||
//this is done because html5Notify() changes the variable settings.html5Mode
|
||||
if (!settings.html5Mode) {
|
||||
queue.push(notification);
|
||||
$timeout(function removeFromQueueTimeout() {
|
||||
queue.splice(queue.indexOf(notification), 1);
|
||||
|
|
@ -202,11 +206,14 @@ factory('notification', ['$timeout',
|
|||
|
||||
// Mobile notification
|
||||
if (window && window.navigator && window.navigator.vibrate) {
|
||||
window.navigator.vibrate([200,100,200]);
|
||||
window.navigator.vibrate([200, 100, 200]);
|
||||
};
|
||||
|
||||
if (document.hidden && (type == 'info' || type == 'funds')) {
|
||||
new window.Notification(title, {body: content, icon:'img/notification.png'});
|
||||
new window.Notification(title, {
|
||||
body: content,
|
||||
icon: 'img/notification.png'
|
||||
});
|
||||
}
|
||||
|
||||
this.save();
|
||||
|
|
@ -234,8 +241,7 @@ factory('notification', ['$timeout',
|
|||
|
||||
};
|
||||
}
|
||||
]).
|
||||
directive('notifications', function(notification, $compile) {
|
||||
]).directive('notifications', function(notification, $compile) {
|
||||
/**
|
||||
*
|
||||
* It should also parse the arguments passed to it that specify
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue