()
| 101 | } |
| 102 | |
| 103 | const 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 |
| 131 | setDevMenuMethodsForTouchBar([]) |
no test coverage detected