mirror of
https://github.com/lxsang/antos-frontend.git
synced 2025-02-22 01:42:47 +01:00
Remove loading animation in push notification service
This commit is contained in:
parent
d384a65b73
commit
738eb1f831
@ -28,7 +28,6 @@ namespace OS {
|
|||||||
* @extends {BaseService}
|
* @extends {BaseService}
|
||||||
*/
|
*/
|
||||||
export class PushNotification extends BaseService {
|
export class PushNotification extends BaseService {
|
||||||
private pending: number[];
|
|
||||||
private cb: (e: JQuery.ClickEvent) => void;
|
private cb: (e: JQuery.ClickEvent) => void;
|
||||||
private view: boolean;
|
private view: boolean;
|
||||||
private mlist: TAG.ListViewTag;
|
private mlist: TAG.ListViewTag;
|
||||||
@ -48,7 +47,6 @@ namespace OS {
|
|||||||
super("PushNotification", args);
|
super("PushNotification", args);
|
||||||
this.iconclass = "fa fa-bars";
|
this.iconclass = "fa fa-bars";
|
||||||
this.cb = undefined;
|
this.cb = undefined;
|
||||||
this.pending = [];
|
|
||||||
this.logs = [];
|
this.logs = [];
|
||||||
this.logmon = undefined;
|
this.logmon = undefined;
|
||||||
}
|
}
|
||||||
@ -64,23 +62,6 @@ namespace OS {
|
|||||||
return this._gui.htmlToScheme(scheme, this, this.host);
|
return this._gui.htmlToScheme(scheme, this, this.host);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {boolean} b
|
|
||||||
* @memberof PushNotification
|
|
||||||
*/
|
|
||||||
private spin(b: boolean): void {
|
|
||||||
if (b && this.iconclass === "fa fa-bars") {
|
|
||||||
this.iconclass = "fa fa-spinner fa-spin";
|
|
||||||
this.update();
|
|
||||||
} else if (!b && this.iconclass === "fa fa-spinner fa-spin") {
|
|
||||||
this.iconclass = "fa fa-bars";
|
|
||||||
this.update();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@ -100,21 +81,6 @@ namespace OS {
|
|||||||
this.subscribe("error", (o) => this.pushout("ERROR", o));
|
this.subscribe("error", (o) => this.pushout("ERROR", o));
|
||||||
this.subscribe("info", (o) => this.pushout("INFO", o));
|
this.subscribe("info", (o) => this.pushout("INFO", o));
|
||||||
|
|
||||||
this.subscribe("loading", (o) => {
|
|
||||||
this.pending.push(o.id);
|
|
||||||
return this.spin(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.subscribe("loaded", (o) => {
|
|
||||||
const i = this.pending.indexOf(o.id);
|
|
||||||
if (i >= 0) {
|
|
||||||
this.pending.splice(i, 1);
|
|
||||||
}
|
|
||||||
if (this.pending.length === 0) {
|
|
||||||
return this.spin(false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.nzone.height = "100%";
|
this.nzone.height = "100%";
|
||||||
this.fzone.height = "100%";
|
this.fzone.height = "100%";
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
"credit": "dedicated to some one here",
|
"credit": "dedicated to some one here",
|
||||||
"licences": "GPLv3"
|
"licences": "GPLv3"
|
||||||
},
|
},
|
||||||
"version": "0.0.1-a",
|
"version": "0.1.1-a",
|
||||||
"category": "System",
|
"category": "System",
|
||||||
"iconclass": "fa fa-bug",
|
"iconclass": "fa fa-bug",
|
||||||
"mimes": []
|
"mimes": []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user