From 732494dfc51286926d86d49a73d3915a4aa22ef9 Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Sun, 30 Nov 2025 02:54:51 +0200 Subject: [PATCH] client/keyboard shortcuts cheatsheet: add an edit button --- apps/client/src/translations/en/translation.json | 1 + apps/client/src/widgets/dialogs/help.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json index 8f6767d9a..514301594 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -112,6 +112,7 @@ }, "help": { "title": "Cheatsheet", + "editShortcuts": "Edit keyboard shortcuts", "noteNavigation": "Note navigation", "goUpDown": "go up/down in the list of notes", "collapseExpand": "collapse/expand node", diff --git a/apps/client/src/widgets/dialogs/help.tsx b/apps/client/src/widgets/dialogs/help.tsx index d5c2f695d..f6c0c96d6 100644 --- a/apps/client/src/widgets/dialogs/help.tsx +++ b/apps/client/src/widgets/dialogs/help.tsx @@ -1,7 +1,7 @@ import Modal from "../react/Modal.jsx"; import { t } from "../../services/i18n.js"; import { ComponentChildren } from "preact"; -import { CommandNames } from "../../components/app_context.js"; +import appContext, { CommandNames } from "../../components/app_context.js"; import RawHtml from "../react/RawHtml.jsx"; import { useEffect, useState } from "preact/hooks"; import keyboard_actions from "../../services/keyboard_actions.js"; @@ -14,6 +14,7 @@ export default function HelpDialog() { return ( setShown(false)} show={shown} > @@ -160,3 +161,7 @@ function Card({ title, children }: { title: string, children: ComponentChildren ) } + +function editShortcuts() { + appContext.tabManager.openContextWithNote("_optionsShortcuts", { activate: true }); +} \ No newline at end of file