Merge pull request #80 from hanzei/command-switch-hint
Add shortcut hint for command switcherpull/81/head
commit
38bb2c10b2
|
@ -7,6 +7,7 @@ import {
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Notification } from "../types";
|
import { Notification } from "../types";
|
||||||
|
import { isMacLike } from "../../common/util";
|
||||||
|
|
||||||
function prettyName(s: string | undefined): string {
|
function prettyName(s: string | undefined): string {
|
||||||
if (!s) {
|
if (!s) {
|
||||||
|
@ -40,6 +41,8 @@ export function TopBar({
|
||||||
}) {
|
}) {
|
||||||
const [theme, setTheme] = useState<string>(localStorage.theme ?? "light");
|
const [theme, setTheme] = useState<string>(localStorage.theme ?? "light");
|
||||||
|
|
||||||
|
const isMac = isMacLike();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="sb-top" onClick={onClick}>
|
<div id="sb-top" onClick={onClick}>
|
||||||
{lhs}
|
{lhs}
|
||||||
|
@ -83,7 +86,7 @@ export function TopBar({
|
||||||
onActionClick();
|
onActionClick();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}}
|
}}
|
||||||
title="Open the command palette"
|
title={"Open the command palette (" + (isMac ? "Cmd" : "Ctrl") + "+/)"}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={faRunning} />
|
<FontAwesomeIcon icon={faRunning} />
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Reference in New Issue