()
| 1 | export default function AppMenus() { |
| 2 | function openDocs() { |
| 3 | NSWorkspace.sharedWorkspace.openURL( |
| 4 | NSURL.URLWithString("https://solidjs.com") |
| 5 | ); |
| 6 | } |
| 7 | |
| 8 | function openGithub() { |
| 9 | NSWorkspace.sharedWorkspace.openURL( |
| 10 | NSURL.URLWithString("https://github.com/solidjs/solid") |
| 11 | ); |
| 12 | } |
| 13 | |
| 14 | function openDiscord() { |
| 15 | NSWorkspace.sharedWorkspace.openURL( |
| 16 | NSURL.URLWithString("https://discord.com/invite/solidjs") |
| 17 | ); |
| 18 | } |
| 19 | |
| 20 | return ( |
| 21 | <> |
| 22 | <menu attachToMainMenu> |
| 23 | <menu-item |
| 24 | title="Quit" |
| 25 | shortcutKey="q" |
| 26 | onClick={() => { |
| 27 | NSApp.terminate(NSApp); |
| 28 | }} |
| 29 | /> |
| 30 | </menu> |
| 31 | <menu title="Help" attachToMainMenu> |
| 32 | <menu-item title="Open Docs" shortcutKey="i" onClick={openDocs} /> |
| 33 | <menu-item title="Open Github" shortcutKey="g" onClick={openGithub} /> |
| 34 | <menu-item title="Discord" shortcutKey="d" onClick={openDiscord} /> |
| 35 | </menu> |
| 36 | </> |
| 37 | ); |
| 38 | } |
nothing calls this directly
no outgoing calls
no test coverage detected