Skip to content

Commit

Permalink
App Menu Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskerr committed Nov 2, 2023
1 parent acb5267 commit 63cbd2e
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions apps/zui/src/electron/windows/search/app-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ export function compileTemplate(
click: () => window.send("closeTab"),
}

const preferences: MenuItemConstructorOptions = {
const settings: MenuItemConstructorOptions = {
id: "preferences",
label: env.isMac ? "Preferences..." : "Settings",
label: "Settings...",
click: () => showPreferencesOp(),
}

Expand All @@ -85,13 +85,13 @@ export function compileTemplate(
accelerator: "CmdOrCtrl+O",
}

const brimMenu: MenuItemConstructorOptions = {
const appNameMenu: MenuItemConstructorOptions = {
label: app.getName(),
submenu: [
aboutApp,
checkForUpdates,
__,
preferences,
settings,
{role: "services", submenu: []},
__,
{role: "hide"},
Expand All @@ -112,7 +112,7 @@ export function compileTemplate(
openFile,
exportResults,
__,
preferences,
settings,
__,
closeTab,
closeWindow,
Expand Down Expand Up @@ -237,27 +237,29 @@ export function compileTemplate(
function helpSubmenu() {
const submenu: MenuItemConstructorOptions[] = [
{
label: "Release Notes",
click() {
showReleaseNotesOp()
},
label: "Welcome",
click: () => sendToFocusedWindow("window.showWelcomePage"),
},
{
label: "Zui Docs",
label: "Zui Documentation",
click() {
shell.openExternal(links.ZUI_DOCS_ROOT)
},
},
{
label: "Zed Syntax Docs",
label: "Zed Language Documentation",
click() {
shell.openExternal(links.ZED_DOCS_LANGUAGE)
},
},

{
label: "Show Welcome Page",
click: () => sendToFocusedWindow("window.showWelcomePage"),
label: "Show Release Notes",
click() {
showReleaseNotesOp()
},
},
__,
{
label: "Slack Support Channel",
click() {
Expand All @@ -271,7 +273,7 @@ export function compileTemplate(
},
},
{
label: "Submit Issue...",
label: "Report Issue",
click() {
shell.openExternal(
"https://zui.brimdata.io/docs/support/Troubleshooting#opening-an-issue"
Expand All @@ -281,7 +283,7 @@ export function compileTemplate(
]

if (!mac) {
submenu.push(__, aboutApp)
submenu.push(__, checkForUpdates, __, aboutApp)
}
return submenu
}
Expand All @@ -294,7 +296,7 @@ export function compileTemplate(
{role: "window", submenu: windowSubmenu()},
{role: "help", submenu: helpSubmenu()},
]
if (mac) template.unshift(brimMenu)
if (mac) template.unshift(appNameMenu)
return template
}

Expand Down

0 comments on commit 63cbd2e

Please sign in to comment.