MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / buildTabBarContextMenu

Function buildTabBarContextMenu

frontend/app/tab/tabcontextmenu.ts:20–37  ·  view source on GitHub ↗
(env: TabEnv)

Source from the content-addressed store, hash-verified

18];
19
20export function buildTabBarContextMenu(env: TabEnv): ContextMenuItem[] {
21 const currentTabBar = globalStore.get(env.getSettingsKeyAtom("app:tabbar")) ?? "top";
22 const tabBarSubmenu: ContextMenuItem[] = [
23 {
24 label: "Top",
25 type: "checkbox",
26 checked: currentTabBar === "top",
27 click: () => fireAndForget(() => env.rpc.SetConfigCommand(TabRpcClient, { "app:tabbar": "top" })),
28 },
29 {
30 label: "Left",
31 type: "checkbox",
32 checked: currentTabBar === "left",
33 click: () => fireAndForget(() => env.rpc.SetConfigCommand(TabRpcClient, { "app:tabbar": "left" })),
34 },
35 ];
36 return [{ label: "Tab Bar Position", type: "submenu", submenu: tabBarSubmenu }];
37}
38
39export function buildTabContextMenu(
40 id: string,

Callers 2

VTabBarFunction · 0.90
buildTabContextMenuFunction · 0.85

Calls 3

fireAndForgetFunction · 0.90
getMethod · 0.80
SetConfigCommandMethod · 0.65

Tested by

no test coverage detected