feat: 添加相机和相册权限请求功能
- 在 AI 体态评估页面中集成相机和相册权限请求逻辑 - 更新 app.json 和 Info.plist,添加相应的权限说明 - 修改布局以支持照片上传功能,用户可上传正面、侧面和背面照片 - 更新 package.json 和 package-lock.json,添加 expo-image-picker 依赖
This commit is contained in:
@@ -1,33 +1,103 @@
|
||||
/**
|
||||
* Below are the colors that are used in the app. The colors are defined in the light and dark mode.
|
||||
* There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.
|
||||
* 应用全局配色规范(来自设计规范图)。
|
||||
* 说明:保持原有导出结构不变,同时扩展更完整的语义令牌与原子调色板。
|
||||
*/
|
||||
|
||||
const primaryColor = '#BBF246'; // 应用主题色
|
||||
// 原子调色板(与设计图一致)
|
||||
export const palette = {
|
||||
// Primary
|
||||
primary: '#BBF246',
|
||||
ink: '#192126',
|
||||
|
||||
// Secondary / Neutrals
|
||||
neutral100: '#888F92',
|
||||
neutral200: '#5E6468',
|
||||
neutral300: '#384046',
|
||||
|
||||
// Accents
|
||||
purple: '#A48AED',
|
||||
red: '#ED4747',
|
||||
orange: '#FCC46F',
|
||||
blue: '#95CCE3',
|
||||
} as const;
|
||||
|
||||
const primaryColor = palette.primary; // 应用主题色
|
||||
const tintColorLight = primaryColor;
|
||||
const tintColorDark = '#fff';
|
||||
const tintColorDark = '#FFFFFF';
|
||||
|
||||
export const Colors = {
|
||||
light: {
|
||||
// 基础文本/背景
|
||||
text: '#11181C',
|
||||
background: '#fff',
|
||||
textSecondary: palette.neutral300,
|
||||
textMuted: palette.neutral200,
|
||||
background: '#FFFFFF',
|
||||
surface: '#FFFFFF',
|
||||
card: '#FFFFFF',
|
||||
|
||||
// 品牌与可交互主色
|
||||
tint: tintColorLight,
|
||||
primary: primaryColor,
|
||||
onPrimary: palette.ink, // 与主色搭配的前景色(按钮文字/图标)
|
||||
|
||||
// 中性色与辅助
|
||||
neutral100: palette.neutral100,
|
||||
neutral200: palette.neutral200,
|
||||
neutral300: palette.neutral300,
|
||||
|
||||
// 状态/反馈色
|
||||
success: palette.primary,
|
||||
warning: palette.orange,
|
||||
danger: palette.red,
|
||||
info: palette.blue,
|
||||
accentPurple: palette.purple,
|
||||
|
||||
// 结构色
|
||||
border: palette.neutral100 + '33', // 20% 透明度
|
||||
separator: palette.neutral100 + '33',
|
||||
icon: '#687076',
|
||||
|
||||
// Tab 相关(保持兼容)
|
||||
tabIconDefault: '#687076',
|
||||
tabIconSelected: '#192126', // tab 激活时的文字/图标颜色(深色,在亮色背景上显示)
|
||||
tabBarBackground: '#192126', // tab 栏背景色
|
||||
tabIconSelected: palette.ink, // tab 激活时的文字/图标颜色(深色,在亮色背景上显示)
|
||||
tabBarBackground: palette.ink, // tab 栏背景色
|
||||
tabBarActiveBackground: primaryColor, // tab 激活时的背景色
|
||||
},
|
||||
dark: {
|
||||
// 基础文本/背景
|
||||
text: '#ECEDEE',
|
||||
textSecondary: palette.neutral100,
|
||||
textMuted: '#9BA1A6',
|
||||
background: '#151718',
|
||||
surface: '#1A1D1E',
|
||||
card: '#1A1D1E',
|
||||
|
||||
// 品牌与可交互主色
|
||||
tint: tintColorDark,
|
||||
primary: primaryColor,
|
||||
onPrimary: palette.ink,
|
||||
|
||||
// 中性色与辅助
|
||||
neutral100: palette.neutral100,
|
||||
neutral200: palette.neutral200,
|
||||
neutral300: palette.neutral300,
|
||||
|
||||
// 状态/反馈色
|
||||
success: palette.primary,
|
||||
warning: palette.orange,
|
||||
danger: palette.red,
|
||||
info: palette.blue,
|
||||
accentPurple: palette.purple,
|
||||
|
||||
// 结构色
|
||||
border: '#2A2F32',
|
||||
separator: '#2A2F32',
|
||||
icon: '#9BA1A6',
|
||||
|
||||
// Tab 相关(保持兼容)
|
||||
tabIconDefault: '#9BA1A6',
|
||||
tabIconSelected: '#192126', // 在亮色背景上使用深色文字
|
||||
tabBarBackground: '#192126',
|
||||
tabIconSelected: palette.ink, // 在亮色背景上使用深色文字
|
||||
tabBarBackground: palette.ink,
|
||||
tabBarActiveBackground: primaryColor,
|
||||
},
|
||||
};
|
||||
} as const;
|
||||
|
||||
Reference in New Issue
Block a user