fix term view icon/title

This commit is contained in:
sawka 2024-07-25 16:45:07 -07:00
parent 67ee0df322
commit 875fbb87c4

View File

@ -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 {