29 lines
1.3 KiB
TypeScript
29 lines
1.3 KiB
TypeScript
import Link from "next/link";
|
||
import { ShortcutsList } from "@/components/CommandPalette";
|
||
import { PageHeader, Section } from "@/components/common";
|
||
import { Workspace } from "@/components/Workspace";
|
||
import { PALETTE_KEYS } from "@/lib/shortcuts";
|
||
import { getT } from "@/lib/i18n";
|
||
|
||
/** PEP-52: list of keyboard shortcuts (the same list as the «?» dialog). */
|
||
export default async function Shortcuts() {
|
||
const t = await getT();
|
||
return (
|
||
<Workspace>
|
||
<div className="max-w-3xl text-sm">
|
||
<PageHeader crumbs={<Link href="/help" className="text-muted-foreground hover:text-foreground">{t("Помощь")}</Link>} title={t("Горячие клавиши")}>
|
||
{t("Клавиши без ⌘/Ctrl работают, когда курсор не в поле ввода.")}
|
||
</PageHeader>
|
||
<Section title={t("Сочетания")}>
|
||
<div className="rounded-lg border bg-card px-4 py-2">
|
||
<ShortcutsList />
|
||
</div>
|
||
</Section>
|
||
<Section title={t("В палитре")}>
|
||
<p className="m-0 text-muted-foreground">{t(PALETTE_KEYS)}. {t("Поиск — по ключу, названию и проекту; все слова запроса должны совпасть.")}</p>
|
||
</Section>
|
||
</div>
|
||
</Workspace>
|
||
);
|
||
}
|