From 13f66e508c19eba596275ce3f2c402ab8f57fc1e Mon Sep 17 00:00:00 2001 From: leeguooooo Date: Mon, 9 Nov 2026 10:08:48 +0900 Subject: [PATCH] =?UTF-8?q?fix(ios):=20=E6=92=AD=E6=94=BE=E9=A1=B5?= =?UTF-8?q?=E3=80=81=E9=A6=96=E9=A1=B5=E3=80=81=E5=9B=BE=E6=96=87=E9=A1=B5?= =?UTF-8?q?=E3=80=81=E6=88=91=E7=9A=84=E9=A1=B5=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E7=BB=9F=E4=B8=80=E6=94=B9=E7=94=A8=20isMobi?= =?UTF-8?q?le?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Feed.tsx | 4 ++-- src/pages/Home.tsx | 4 ++-- src/pages/Posts.tsx | 4 ++-- src/pages/Profile.tsx | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/Feed.tsx b/src/components/Feed.tsx index 9b3a323..21d5176 100644 --- a/src/components/Feed.tsx +++ b/src/components/Feed.tsx @@ -1,5 +1,5 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react"; -import { api, cover, fmt, fmtTime, mediaUrl, platform } from "../api"; +import { api, cover, fmt, fmtTime, isMobile, mediaUrl } from "../api"; import type { Detail, Episode, Post, VideoCard } from "../types"; import { useStore } from "../store"; import { Avatar, Img, Sheet } from "./ui"; @@ -34,7 +34,7 @@ const stripHtml = (s: string) => s.replace(/<[^>]+>/g, " ").replace(/ /g, " export default function Feed({ videoIds, startIndex = 0, title = "", mode, kind = "video", active, bottomInset, onBack, onNearEnd, startEp, startTime }: Props) { const store = useStore(); const { isLiked, isFav, toggleLikeLocal, toggleFavLocal, toggleFollowLocal, muted, setMuted, volume, setVolume, toast, addHistory, user, setLoginOpen } = store; - const isDesktop = platform !== "android"; + const isDesktop = !isMobile; const boxRef = useRef(null); const videoRef = useRef(null); diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 338bd00..4b4ad1f 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -1,6 +1,6 @@ import { useCallback, useEffect, useRef, useState } from "react"; import Feed from "../components/Feed"; -import { api, platform } from "../api"; +import { api, isMobile } from "../api"; import type { VideoCard } from "../types"; import { useStore } from "../store"; import { ISearch, IVol, IVolMute } from "../icons"; @@ -59,7 +59,7 @@ export default function Home({ active, bottomInset }: { active: boolean; bottomI )} {/* 移动端:静音 + 搜索(压在视频上,固定白字 + 半透明黑底) */} - {platform === "android" && !fs && ( + {isMobile && !fs && (
吃瓜详情
diff --git a/src/pages/Profile.tsx b/src/pages/Profile.tsx index 9dc1b21..46c9552 100644 --- a/src/pages/Profile.tsx +++ b/src/pages/Profile.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; -import { api, APP_VERSION, fmt, fmtTime, platform } from "../api"; +import { api, APP_VERSION, fmt, fmtTime, isMobile, platform } from "../api"; import type { Detail } from "../types"; import { useStore } from "../store"; import { Avatar, Empty, Img } from "../components/ui"; @@ -34,7 +34,7 @@ export default function Profile({ wide }: { wide: boolean }) {
我的
- {platform === "android" && ( + {isMobile && (
-
HGhub {APP_VERSION} · {platform === "android" ? "Android" : platform === "macos" ? "macOS" : "Windows"} 客户端
+
HGhub {APP_VERSION} · {platform === "android" ? "Android" : platform === "ios" ? "iOS" : platform === "macos" ? "macOS" : "Windows"} 客户端
);