From 36726cfb80ad3030c74b017d03a5e4489528d6d6 Mon Sep 17 00:00:00 2001 From: Matthew Diamant Date: Fri, 28 Feb 2025 12:35:10 -0800 Subject: [PATCH] feat(desktop-ui): Command/ctrl + comma goes to Settings view (#1439) --- ui/desktop/src/App.tsx | 6 ++++++ ui/desktop/src/components/MoreMenu.tsx | 2 +- ui/desktop/src/main.ts | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ui/desktop/src/App.tsx b/ui/desktop/src/App.tsx index c7e80ace..bef7f792 100644 --- a/ui/desktop/src/App.tsx +++ b/ui/desktop/src/App.tsx @@ -150,6 +150,12 @@ export default function App() { }; }, []); + useEffect(() => { + const handleSetView = (_, view) => setView(view); + window.electron.on('set-view', handleSetView); + return () => window.electron.off('set-view', handleSetView); + }, []); + const handleConfirm = async () => { if (pendingLink && !isInstalling) { setIsInstalling(true); diff --git a/ui/desktop/src/components/MoreMenu.tsx b/ui/desktop/src/components/MoreMenu.tsx index b1bd51ae..64c49dfc 100644 --- a/ui/desktop/src/components/MoreMenu.tsx +++ b/ui/desktop/src/components/MoreMenu.tsx @@ -228,7 +228,7 @@ export default function MoreMenu({ setView }: { setView: (view: View) => void }) }} className="w-full text-left p-2 text-sm hover:bg-bgSubtle transition-colors" > - Settings + Settings (cmd+,)