MCPcopy Create free account
hub / github.com/deta/surf / updateCheckboxStates

Method updateCheckboxStates

app/src/main/appMenu.ts:57–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55 }
56
57 private updateCheckboxStates(): void {
58 const userConfig = getUserConfig()
59 const isVertical = userConfig.settings.tabs_orientation === 'vertical'
60
61 // Update the checkbox state for "Show Tabs in Sidebar"
62 for (const menuItem of this.template) {
63 if (menuItem.submenu) {
64 const tabsMenuItem = menuItem.submenu.find((item) => item.id === 'showTabsInSidebar')
65 if (tabsMenuItem) {
66 tabsMenuItem.checked = isVertical
67 break
68 }
69 }
70 }
71 }
72
73 public updateMenuItem(id: string, newLabel: string): void {
74 for (const menuItem of this.template) {

Callers 1

buildMenuMethod · 0.95

Calls 1

getUserConfigFunction · 0.90

Tested by

no test coverage detected