From dae302b2cd2293649178799e6f8068153afd55d1 Mon Sep 17 00:00:00 2001 From: Ben Schumacher Date: Sat, 24 Sep 2022 17:01:16 +0000 Subject: [PATCH] Add shortcut hint for command switcher --- packages/web/components/top_bar.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/web/components/top_bar.tsx b/packages/web/components/top_bar.tsx index 4e0f8ff..5732f24 100644 --- a/packages/web/components/top_bar.tsx +++ b/packages/web/components/top_bar.tsx @@ -7,6 +7,7 @@ import { import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useEffect, useState } from "react"; import { Notification } from "../types"; +import { isMacLike } from "../../common/util"; function prettyName(s: string | undefined): string { if (!s) { @@ -40,6 +41,8 @@ export function TopBar({ }) { const [theme, setTheme] = useState(localStorage.theme ?? "light"); + const isMac = isMacLike(); + return (
{lhs} @@ -83,7 +86,7 @@ export function TopBar({ onActionClick(); e.stopPropagation(); }} - title="Open the command palette" + title={"Open the command palette (" + (isMac ? "Cmd" : "Ctrl") + "+/)"} >