MCPcopy
hub / github.com/wavetermdev/waveterm / QuickTipsViewModel

Class QuickTipsViewModel

frontend/app/view/quicktipsview/quicktipsview.tsx:10–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8import { Atom, atom, PrimitiveAtom } from "jotai";
9
10class QuickTipsViewModel implements ViewModel {
11 viewType: string;
12 blockId: string;
13 nodeModel: BlockNodeModel;
14 tabModel: TabModel;
15 showTocAtom: PrimitiveAtom<boolean>;
16 endIconButtons: Atom<IconButtonDecl[]>;
17
18 constructor({ blockId, nodeModel, tabModel }: ViewModelInitType) {
19 this.blockId = blockId;
20 this.nodeModel = nodeModel;
21 this.tabModel = tabModel;
22 this.viewType = "tips";
23 this.showTocAtom = atom(false);
24 }
25
26 get viewComponent(): ViewComponent {
27 return QuickTipsView;
28 }
29
30 showTocToggle() {
31 globalStore.set(this.showTocAtom, !globalStore.get(this.showTocAtom));
32 }
33}
34
35function QuickTipsView({ model }: { model: QuickTipsViewModel }) {
36 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected