peppa/apps/web/app/(app)/help/shortcuts/page.tsx

37 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Link from "@/components/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";
import { pageTitle } from "@/lib/title";
// PEP-274: the browser tab says which page it is.
export async function generateMetadata() {
const t = await getT();
return pageTitle(t, t("Горячие клавиши"));
}
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>
);
}
/** PEP-52: list of keyboard shortcuts (the same list as the «?» dialog). */