Move addCjk into window, move window interactions out of createTerminal

This commit is contained in:
Daniel Imms
2025-12-26 03:51:01 -08:00
parent 6fe5a124ca
commit 4fffb96f25
3 changed files with 68 additions and 56 deletions
+3 -1
View File
@@ -146,7 +146,7 @@ export class ControlBar {
}
}
public registerWindow(window: IControlWindow, options?: { afterId?: string; hidden?: boolean; smallTab?: boolean }): void {
public registerWindow<T extends IControlWindow>(window: T, options?: { afterId?: string; hidden?: boolean; smallTab?: boolean }): T {
// Create button
const button = document.createElement('button');
button.id = `${window.id}button`;
@@ -187,6 +187,8 @@ export class ControlBar {
window.build(content);
this._tabs.set(window.id, { button, content });
return window;
}
public setTabVisible(tabId: string, visible: boolean): void {