mirror of
https://gh-proxy.org/https://github.com/tiajinsha/JKVideo
synced 2026-07-08 07:28:37 +08:00
feat: UP主页/视频详情页 UI 优化 + 多处交互修复
- creator: 头部模糊背景 + 滚动渐变 topBar,移除 removeClippedSubviews 修复列表抖动 - video: 简介 2 行折叠(onTextLayout 探测真实行数),tname 分区标签,统计数据前移到 UP 主行 - VideoCard/LiveCard: title 设 minHeight 解决两列卡片底部对齐 - LoginModal: 二维码过期支持原地重试,无需关闭重开 - search: 初始 loading 显示 indicator,搜索/选建议时自动收起键盘 - 统一图片组件为 expo-image:LiveCard / FollowedLiveStrip / downloads - types: VideoItem 补 tname / pubdate 字段
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
FlatList,
|
||||
ActivityIndicator,
|
||||
ScrollView,
|
||||
Keyboard,
|
||||
} from 'react-native';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
import { useRouter } from 'expo-router';
|
||||
@@ -43,12 +44,14 @@ export default function SearchScreen() {
|
||||
const term = (kw ?? keyword).trim();
|
||||
if (term) {
|
||||
if (kw) setKeyword(kw);
|
||||
Keyboard.dismiss();
|
||||
search(kw ?? keyword, true);
|
||||
}
|
||||
}, [keyword, search, setKeyword]);
|
||||
|
||||
const handleSuggestionPress = useCallback((value: string) => {
|
||||
setKeyword(value);
|
||||
Keyboard.dismiss();
|
||||
search(value, true);
|
||||
}, [search, setKeyword]);
|
||||
|
||||
@@ -110,7 +113,11 @@ export default function SearchScreen() {
|
||||
}, [hasResults, sort, changeSort, theme.card]);
|
||||
|
||||
const ListEmptyComponent = () => {
|
||||
if (loading) return null;
|
||||
if (loading) return (
|
||||
<View style={styles.emptyBox}>
|
||||
<ActivityIndicator color="#00AEEC" size="large" />
|
||||
</View>
|
||||
);
|
||||
if (!keyword.trim()) return null;
|
||||
return (
|
||||
<View style={styles.emptyBox}>
|
||||
|
||||
Reference in New Issue
Block a user