SSE reconnect, task switcher state/inbox/new task, stream throttle
This commit is contained in:
Vendored
+11
@@ -14,6 +14,13 @@ const views = {
|
||||
settings: { label: "Settings", mount: mountSettings },
|
||||
};
|
||||
const order = ["transcript", "changes", "tasks", "inbox", "admin", "settings"];
|
||||
const panes = [];
|
||||
export function openTranscript() {
|
||||
if (panes.some((p) => p.current() === "transcript")) {
|
||||
return;
|
||||
}
|
||||
(panes.find((p) => p.current() !== "tasks") ?? panes[0])?.show("transcript");
|
||||
}
|
||||
export class Pane {
|
||||
key;
|
||||
el;
|
||||
@@ -29,6 +36,10 @@ export class Pane {
|
||||
const saved = localStorage.getItem(this.storageKey());
|
||||
this.view = saved && saved in views ? saved : fallback;
|
||||
this.show(this.view);
|
||||
panes.push(this);
|
||||
}
|
||||
current() {
|
||||
return this.view;
|
||||
}
|
||||
show(view) {
|
||||
this.dispose();
|
||||
|
||||
Reference in New Issue
Block a user