mirror of
https://github.com/wavetermdev/waveterm
synced 2026-05-05 22:48:48 +00:00
fix term view icon/title
This commit is contained in:
parent
67ee0df322
commit
875fbb87c4
1 changed files with 7 additions and 0 deletions
|
|
@ -127,6 +127,8 @@ class TermViewModel {
|
|||
termMode: jotai.Atom<string>;
|
||||
htmlElemFocusRef: React.RefObject<HTMLInputElement>;
|
||||
blockId: string;
|
||||
viewIcon: jotai.Atom<string>;
|
||||
viewText: jotai.Atom<string>;
|
||||
|
||||
constructor(blockId: string) {
|
||||
this.blockId = blockId;
|
||||
|
|
@ -135,6 +137,11 @@ class TermViewModel {
|
|||
const blockData = get(this.blockAtom);
|
||||
return blockData?.meta?.["term:mode"] ?? "term";
|
||||
});
|
||||
this.viewIcon = jotai.atom("terminal");
|
||||
this.viewText = jotai.atom((get) => {
|
||||
const blockData = get(this.blockAtom);
|
||||
return blockData?.meta?.title ?? "";
|
||||
});
|
||||
}
|
||||
|
||||
giveFocus(): boolean {
|
||||
|
|
|
|||
Loading…
Reference in a new issue