Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client/keyboard shortcuts cheatsheet: add an edit button
Adorian Doran732494dfc512
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 8f6767d9a8..5143015943 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.tsxindex d5c2f695d5..f6c0c96d60 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 (<Modaltitle={t("help.title")} className="help-dialog use-tn-links" minWidth="90%" size="lg" scrollable+ customTitleBarButtons={[{title: t("help.editShortcuts"), iconClassName: "bxs-pencil", onClick: editShortcuts}]}onHidden={() => setShown(false)}show={shown}>@@ -160,3 +161,7 @@ function Card({ title, children }: { title: string, children: ComponentChildren</div>)}++function editShortcuts() {+ appContext.tabManager.openContextWithNote("_optionsShortcuts", { activate: true });+}\ No newline at end of file