From 296b15a7d4d891925e393a3e733081a5a74cf561 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Thu, 13 Feb 2025 11:32:11 +0800 Subject: [PATCH] feat: add platform-specific keyboard shortcut display --- src/components/Footer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 399b1c5..7bd3d17 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -5,6 +5,7 @@ import { useTranslation } from "react-i18next" const Footer: React.FC = () => { const { t } = useTranslation() + const isMac = /macintosh|mac os x/i.test(navigator.userAgent) const { data: settingData } = useQuery({ queryKey: ["setting"], @@ -27,7 +28,7 @@ const Footer: React.FC = () => {
- ⌘K + {isMac ? ⌘ : "Ctrl "}K