fix(desktop): add Windows Help > About shortcut by zonemeen · Pull Request #54872 · anomalyco/opencode · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions packages/app/e2e/regression/settings.spec.ts
1 change: 1 addition & 0 deletions packages/app/e2e/utils/windows-menu.fixture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export function mount(input: { server: string }) {
const platform: Platform = {
platform: "desktop",
os: "windows",
version: "2.0.0-test",
windowID: "windows-menu-test",
openExternal: () => undefined,
openDirectoryPickerDialog: async () => null,
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/runtime/i18n/desktop-native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ export const DESKTOP_NATIVE_ENGLISH = {
"desktop.menu.supportForum": "Support Forum",
"desktop.menu.shareFeedback": "Share Feedback",
"desktop.menu.reportBug": "Report a Bug",
"desktop.menu.about": "About",
"desktop.menu.ariaLabel": "OpenCode menu",

"desktop.cli.installed.title": "CLI Installed",
Expand Down
7 changes: 7 additions & 0 deletions packages/app/src/settings/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export function useSettingsCommand() {
const command = useCommand()
const language = useLanguage()
const show = useSettingsDialog()
const about = useSettingsDialog("about")

command.register("settings", () => [
{
Expand All @@ -22,6 +23,12 @@ export function useSettingsCommand() {
keybind: "mod+comma",
onSelect: show,
},
{
id: "settings.about",
title: language.t("desktop.menu.about"),
hidden: true,
onSelect: about,
},
])

return show
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/shell/commands/desktop-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ export const DESKTOP_MENU: DesktopMenu[] = [
labelKey: "desktop.menu.reportBug",
href: "https://github.com/anomalyco/opencode/issues/new?template=bug_report.yml",
},
{ type: "separator", platforms: ["windows"] },
{ type: "item", labelKey: "desktop.menu.about", command: "settings.about", platforms: ["windows"] },
],
},
]
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/shell/titlebar/titlebar.tsx
Loading