Make user confirm that they use an external disk

This commit is contained in:
Girish Ramakrishnan
2018-06-07 11:19:43 -07:00
parent 04dd8914cd
commit e3897c4c34
3 changed files with 24 additions and 9 deletions

View File

@@ -152,6 +152,10 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
Notification.error({ title: 'Cloudron Error', message: message });
};
Client.prototype.clearNotifications = function () {
Notification.clearAll();
};
/*
Example usage with an action:
@@ -162,10 +166,10 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
Client.notify('title', 'message', true, actionScope);
*/
Client.prototype.notify = function (title, message, persitent, type, actionScope) {
Client.prototype.notify = function (title, message, persistent, type, actionScope) {
var options = { title: title, message: message};
if (persitent) options.delay = 'never'; // any non Number means never timeout
if (persistent) options.delay = 'never'; // any non Number means never timeout
if (actionScope) {
if (typeof actionScope.action !== 'string') throw('an actionScope has to have an action url');