From 738eb1f8313afdae0e7ebfc11a78d5a1b27c552c Mon Sep 17 00:00:00 2001 From: lxsang Date: Mon, 22 Mar 2021 19:15:37 +0100 Subject: [PATCH] Remove loading animation in push notification service --- src/packages/Syslog/PushNotification.ts | 34 ------------------------- src/packages/Syslog/package.json | 2 +- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/src/packages/Syslog/PushNotification.ts b/src/packages/Syslog/PushNotification.ts index a5e1671..d8b109b 100644 --- a/src/packages/Syslog/PushNotification.ts +++ b/src/packages/Syslog/PushNotification.ts @@ -28,7 +28,6 @@ namespace OS { * @extends {BaseService} */ export class PushNotification extends BaseService { - private pending: number[]; private cb: (e: JQuery.ClickEvent) => void; private view: boolean; private mlist: TAG.ListViewTag; @@ -48,7 +47,6 @@ namespace OS { super("PushNotification", args); this.iconclass = "fa fa-bars"; this.cb = undefined; - this.pending = []; this.logs = []; this.logmon = undefined; } @@ -64,23 +62,6 @@ namespace OS { 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("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.fzone.height = "100%"; diff --git a/src/packages/Syslog/package.json b/src/packages/Syslog/package.json index 4206c96..f395f42 100644 --- a/src/packages/Syslog/package.json +++ b/src/packages/Syslog/package.json @@ -13,7 +13,7 @@ "credit": "dedicated to some one here", "licences": "GPLv3" }, - "version": "0.0.1-a", + "version": "0.1.1-a", "category": "System", "iconclass": "fa fa-bug", "mimes": []