Переглянути джерело

Merge pull request #5419 from DDMeaqua/feat-shortcutkey

chore: 手机端隐藏快捷键展示
Lloyd Zhou 1 рік тому
батько
коміт
57fcda80df
1 змінених файлів з 9 додано та 5 видалено
  1. 9 5
      app/components/chat.tsx

+ 9 - 5
app/components/chat.tsx

@@ -507,6 +507,8 @@ export function ChatActions(props: {
   const currentStyle =
     chatStore.currentSession().mask.modelConfig?.style ?? "vivid";
 
+  const isMobileScreen = useMobileScreen();
+
   useEffect(() => {
     const show = isVisionModel(currentModel);
     setShowUploadImage(show);
@@ -761,11 +763,13 @@ export function ChatActions(props: {
         />
       )}
 
-      <ChatAction
-        onClick={() => props.setShowShortcutKeyModal(true)}
-        text={Locale.Chat.ShortcutKey.Title}
-        icon={<ShortcutkeyIcon />}
-      />
+      {!isMobileScreen && (
+        <ChatAction
+          onClick={() => props.setShowShortcutKeyModal(true)}
+          text={Locale.Chat.ShortcutKey.Title}
+          icon={<ShortcutkeyIcon />}
+        />
+      )}
     </div>
   );
 }