- Updated app.json to set userInterfaceStyle to automatic for improved theme adaptability. - Refactored layout components to utilize useAppColors for dynamic theming, ensuring consistent color usage. - Introduced SystemChrome component to manage system UI background color based on theme. - Enhanced TabsLayout, ProfileStackLayout, and other components to leverage new theming structure. - Improved QRCodeScanner, SearchBar, and CommentItem styles to align with the updated theme system. - Consolidated styles in SystemMessageItem and TabBar for better maintainability and visual coherence.
29 lines
823 B
TypeScript
29 lines
823 B
TypeScript
/**
|
||
* 胡萝卜BBS 主题:明暗色板、Paper 主题、设计 token
|
||
* 新代码请优先使用 useAppColors();静态 colors 为浅色快照,与深色模式不同步。
|
||
*/
|
||
|
||
export { lightColors, darkColors, type AppColors } from './palettes';
|
||
export { buildPaperTheme } from './paperTheme';
|
||
export * from './tokens';
|
||
|
||
export {
|
||
useAppColors,
|
||
useThemePreference,
|
||
useResolvedColorScheme,
|
||
useSetThemePreference,
|
||
usePaperThemeFromStore,
|
||
ThemeBootstrap,
|
||
useThemeStore,
|
||
type ThemePreference,
|
||
type ResolvedScheme,
|
||
} from '../stores/themeStore';
|
||
|
||
import { lightColors } from './palettes';
|
||
import { buildPaperTheme } from './paperTheme';
|
||
|
||
/** 浅色静态快照;随主题切换请使用 useAppColors() */
|
||
export const colors = lightColors;
|
||
|
||
export const paperTheme = buildPaperTheme(lightColors, false);
|