mirror of
https://gh-proxy.org/https://github.com/tiajinsha/JKVideo
synced 2026-07-07 23:18:38 +08:00
feat: 性能优化 + Bug修复 + 搜索增强
- expo-image 替换 RN Image(VideoCard/LiveCard/BigVideoCard/CommentItem,recyclingKey) - DanmakuList Animated.Value 对象池,减少 GC 压力 - FlatList 性能参数:windowSize=7 / maxToRenderPerBatch=6 / removeClippedSubviews - bilibili.ts 请求去重(getVideoDetail/getPlayUrl) - SESSDATA 迁移至 expo-secure-store(utils/secureStorage.ts,启动自动迁移) - 主题系统扩展:新增 sheetBg/modalBg/modalText/placeholder/iconDefault/danger 等 token - 多组件深色模式适配:DownloadSheet/LivePlayer/NativeVideoPlayer/DownloadProgressBtn/CommentItem/LoginModal - 搜索页增强:搜索建议 + 热搜榜(hooks/useSearch.ts + app/search.tsx) - LoginModal 修复轮询竞态(cancelled flag + try-catch) - 修复 downloads.tsx 冗余三元表达式
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
import { useSettingsStore } from '../store/settingsStore';
|
||||
|
||||
export type ThemeColors = {
|
||||
bg: string; // 页面/列表背景
|
||||
card: string; // 卡片/section 背景
|
||||
text: string; // 主文字
|
||||
textSub: string; // 次要文字
|
||||
border: string; // 分割线
|
||||
inputBg: string; // 输入框背景
|
||||
bg: string; // 页面/列表背景
|
||||
card: string; // 卡片/section 背景
|
||||
text: string; // 主文字
|
||||
textSub: string; // 次要文字
|
||||
border: string; // 分割线
|
||||
inputBg: string; // 输入框背景
|
||||
sheetBg: string; // 底部弹出面板背景
|
||||
modalBg: string; // 弹窗/面板背景
|
||||
modalText: string; // 弹窗主文字
|
||||
modalTextSub: string; // 弹窗次要文字
|
||||
modalBorder: string; // 弹窗分割线
|
||||
placeholder: string; // 占位背景(图片加载中)
|
||||
iconDefault: string; // 默认图标色
|
||||
danger: string; // 危险操作色
|
||||
};
|
||||
|
||||
const light: ThemeColors = {
|
||||
@@ -16,6 +24,14 @@ const light: ThemeColors = {
|
||||
textSub: '#999',
|
||||
border: '#eee',
|
||||
inputBg: '#f0f0f0',
|
||||
sheetBg: '#fff',
|
||||
modalBg: '#fff',
|
||||
modalText: '#212121',
|
||||
modalTextSub: '#555',
|
||||
modalBorder: '#eee',
|
||||
placeholder: '#ddd',
|
||||
iconDefault: '#999',
|
||||
danger: '#ff4757',
|
||||
};
|
||||
|
||||
const dark: ThemeColors = {
|
||||
@@ -25,6 +41,14 @@ const dark: ThemeColors = {
|
||||
textSub: '#666',
|
||||
border: '#2a2a2a',
|
||||
inputBg: '#2a2a2a',
|
||||
sheetBg: '#222',
|
||||
modalBg: '#2a2a2a',
|
||||
modalText: '#e0e0e0',
|
||||
modalTextSub: '#888',
|
||||
modalBorder: '#3a3a3a',
|
||||
placeholder: '#333',
|
||||
iconDefault: '#777',
|
||||
danger: '#ff6b81',
|
||||
};
|
||||
|
||||
export function useTheme(): ThemeColors {
|
||||
|
||||
Reference in New Issue
Block a user