badges on the right, evolution api sender
This commit is contained in:
@@ -183,6 +183,12 @@ class OpsShell extends HTMLElement {
|
||||
this.setView("takeovers", {}, { updateUrl: true });
|
||||
};
|
||||
|
||||
// Listen for new takeovers via SSE - update badge immediately
|
||||
this._unsubTakeover = on("takeover:created", () => {
|
||||
this._takeoverCount++;
|
||||
this.updateTakeoverBadge(this._takeoverCount);
|
||||
});
|
||||
|
||||
// Start polling for takeovers
|
||||
this.pollTakeovers();
|
||||
this._pollInterval = setInterval(() => this.pollTakeovers(), 30000);
|
||||
@@ -192,6 +198,7 @@ class OpsShell extends HTMLElement {
|
||||
this._unsub?.();
|
||||
this._unsubSwitch?.();
|
||||
this._unsubRouter?.();
|
||||
this._unsubTakeover?.();
|
||||
if (this._pollInterval) clearInterval(this._pollInterval);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user