* add package.json Signed-off-by: Jess Frazelle <github@jessfraz.com> initial run; Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> more fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> clientsidescne Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> paths Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix styles Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> combine Signed-off-by: Jess Frazelle <github@jessfraz.com> eslint rule Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> my ocd Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> constants file Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> no more import sceneInfra Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> try fix circular import Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
116 lines
3.0 KiB
TypeScript
116 lines
3.0 KiB
TypeScript
import type { BrowserWindow } from 'electron'
|
|
import { shell } from 'electron'
|
|
|
|
import { reportRejection } from '@src/lib/trap'
|
|
import { typeSafeWebContentsSend } from '@src/menu/channels'
|
|
import type { ZooMenuItemConstructorOptions } from '@src/menu/roles'
|
|
|
|
export const helpRole = (
|
|
mainWindow: BrowserWindow
|
|
): ZooMenuItemConstructorOptions => {
|
|
return {
|
|
label: 'Help',
|
|
submenu: [
|
|
{
|
|
id: 'Help.Show all commands',
|
|
label: 'Show all commands',
|
|
click: () => {
|
|
typeSafeWebContentsSend(mainWindow, 'menu-action-clicked', {
|
|
menuLabel: 'Help.Command Palette...',
|
|
})
|
|
},
|
|
},
|
|
{
|
|
label: 'KCL code samples',
|
|
id: 'Help.KCL code samples',
|
|
click: () => {
|
|
shell
|
|
.openExternal('https://zoo.dev/docs/kcl-samples')
|
|
.catch(reportRejection)
|
|
},
|
|
},
|
|
{
|
|
label: 'KCL docs',
|
|
click: () => {
|
|
shell.openExternal('https://zoo.dev/docs/kcl').catch(reportRejection)
|
|
},
|
|
},
|
|
{
|
|
label: 'Get started with Text-to-CAD',
|
|
click: () => {
|
|
shell
|
|
.openExternal('https://text-to-cad.zoo.dev/dashboard')
|
|
.catch(reportRejection)
|
|
},
|
|
},
|
|
{ type: 'separator' },
|
|
{
|
|
label: 'Ask the community discord',
|
|
click: () => {
|
|
shell
|
|
.openExternal('https://discord.gg/JQEpHR7Nt2')
|
|
.catch(reportRejection)
|
|
},
|
|
},
|
|
{
|
|
label: 'Ask the community discourse',
|
|
click: () => {
|
|
shell
|
|
.openExternal('https://community.zoo.dev/')
|
|
.catch(reportRejection)
|
|
},
|
|
},
|
|
{ type: 'separator' },
|
|
{
|
|
label: 'Refresh and report a bug',
|
|
id: 'Help.Refresh and report a bug',
|
|
click: () => {
|
|
typeSafeWebContentsSend(mainWindow, 'menu-action-clicked', {
|
|
menuLabel: 'Help.Refresh and report a bug',
|
|
})
|
|
},
|
|
},
|
|
{
|
|
label: 'Request a feature',
|
|
click: () => {
|
|
shell
|
|
.openExternal(
|
|
'https://github.com/KittyCAD/modeling-app/discussions'
|
|
)
|
|
.catch(reportRejection)
|
|
},
|
|
},
|
|
{ type: 'separator' },
|
|
{
|
|
id: 'Help.Reset onboarding',
|
|
label: 'Reset onboarding',
|
|
click: () => {
|
|
typeSafeWebContentsSend(mainWindow, 'menu-action-clicked', {
|
|
menuLabel: 'Help.Reset onboarding',
|
|
})
|
|
},
|
|
},
|
|
{ type: 'separator' },
|
|
{ role: 'toggleDevTools' },
|
|
{ role: 'reload' },
|
|
{ role: 'forceReload' },
|
|
{ type: 'separator' },
|
|
{
|
|
label: 'Show release notes',
|
|
click: () => {
|
|
shell
|
|
.openExternal('https://github.com/KittyCAD/modeling-app/releases')
|
|
.catch(reportRejection)
|
|
},
|
|
},
|
|
{ type: 'separator' },
|
|
{
|
|
label: 'Manage account',
|
|
click: () => {
|
|
shell.openExternal('https://zoo.dev/account').catch(reportRejection)
|
|
},
|
|
},
|
|
],
|
|
}
|
|
}
|