MCPcopy Create free account
hub / github.com/jhen0409/react-native-debugger / setDevMenuMethodsForTouchBar

Function setDevMenuMethodsForTouchBar

app/utils/devMenu.js:103–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101}
102
103const setDevMenuMethodsForTouchBar = () => {
104 if (process.platform !== 'darwin') return
105 initNamedImages()
106
107 leftBar = {
108 // Default items
109 networkInspect: new TouchBarButton({
110 icon: namedImages.networkInspect,
111 click: devMenuMethods.networkInspect,
112 backgroundColor: networkInspect.getHighlightColor(),
113 }),
114 }
115 if (availableMethods.includes('reload')) {
116 leftBar.reload = new TouchBarButton({
117 icon: namedImages.reload,
118 click: devMenuMethods.reload,
119 })
120 }
121 if (availableMethods.includes('toggleElementInspector')) {
122 leftBar.toggleElementInspector = new TouchBarButton({
123 icon: namedImages.toggleElementInspector,
124 click: devMenuMethods.toggleElementInspector,
125 })
126 }
127 setTouchBar()
128}
129
130// Reset TouchBar when reload the app
131setDevMenuMethodsForTouchBar([])

Callers 2

devMenu.jsFile · 0.85
setDevMenuMethodsFunction · 0.85

Calls 2

initNamedImagesFunction · 0.85
setTouchBarFunction · 0.85

Tested by

no test coverage detected