feat(i18n): 添加国际化支持和中英文切换功能
- 实现完整的中英文国际化系统,支持动态语言切换 - 新增健康数据权限说明页面,提供HealthKit数据使用说明 - 为服药记录添加庆祝动画效果,提升用户体验 - 优化药品添加页面的阴影效果和视觉层次 - 更新个人页面以支持多语言显示和语言选择模态框
This commit is contained in:
@@ -134,6 +134,10 @@ export default function AddMedicationScreen() {
|
||||
const glassDisabledTint = useMemo(() => withAlpha(colors.border, theme === 'dark' ? 0.45 : 0.6), [colors.border, theme]);
|
||||
const glassPrimaryBackground = useMemo(() => withAlpha(colors.primary, theme === 'dark' ? 0.35 : 0.7), [colors.primary, theme]);
|
||||
const glassDisabledBackground = useMemo(() => withAlpha(colors.border, theme === 'dark' ? 0.35 : 0.5), [colors.border, theme]);
|
||||
const cardShadowColor = useMemo(
|
||||
() => (theme === 'dark' ? 'rgba(15, 23, 42, 0.45)' : 'rgba(15, 23, 42, 0.16)'),
|
||||
[theme]
|
||||
);
|
||||
|
||||
const [photoPreview, setPhotoPreview] = useState<string | null>(null);
|
||||
const [photoUrl, setPhotoUrl] = useState<string | null>(null);
|
||||
@@ -617,9 +621,10 @@ export default function AddMedicationScreen() {
|
||||
<View
|
||||
style={[
|
||||
styles.searchField,
|
||||
styles.inputShadow,
|
||||
{
|
||||
backgroundColor: colors.surface,
|
||||
borderColor: softBorderColor,
|
||||
shadowColor: cardShadowColor,
|
||||
},
|
||||
]}
|
||||
>
|
||||
@@ -687,9 +692,10 @@ export default function AddMedicationScreen() {
|
||||
<View
|
||||
style={[
|
||||
styles.dosageField,
|
||||
styles.inputShadow,
|
||||
{
|
||||
borderColor: softBorderColor,
|
||||
backgroundColor: colors.surface,
|
||||
shadowColor: cardShadowColor,
|
||||
},
|
||||
]}
|
||||
>
|
||||
@@ -868,7 +874,16 @@ export default function AddMedicationScreen() {
|
||||
<View style={styles.stepSection}>
|
||||
<View style={styles.inputGroup}>
|
||||
<ThemedText style={[styles.groupLabel, { color: colors.textSecondary }]}>备注</ThemedText>
|
||||
<View style={styles.noteInputWrapper}>
|
||||
<View
|
||||
style={[
|
||||
styles.noteInputWrapper,
|
||||
styles.inputShadow,
|
||||
{
|
||||
backgroundColor: colors.surface,
|
||||
shadowColor: dictationActive ? colors.primary : cardShadowColor,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<TextInput
|
||||
multiline
|
||||
numberOfLines={4}
|
||||
@@ -879,7 +894,6 @@ export default function AddMedicationScreen() {
|
||||
style={[
|
||||
styles.noteInput,
|
||||
{
|
||||
borderColor: dictationActive ? colors.primary : softBorderColor,
|
||||
backgroundColor: colors.surface,
|
||||
color: colors.text,
|
||||
},
|
||||
@@ -1357,10 +1371,17 @@ const styles = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
paddingHorizontal: 16,
|
||||
borderRadius: 16,
|
||||
borderWidth: 1,
|
||||
height: 56,
|
||||
gap: 12,
|
||||
},
|
||||
inputShadow: {
|
||||
borderWidth: 0,
|
||||
shadowColor: 'rgba(15, 23, 42, 0.16)',
|
||||
shadowOffset: { width: 0, height: 8 },
|
||||
shadowOpacity: 0.12,
|
||||
shadowRadius: 14,
|
||||
elevation: 6,
|
||||
},
|
||||
searchInput: {
|
||||
flex: 1,
|
||||
fontSize: 16,
|
||||
@@ -1451,7 +1472,6 @@ const styles = StyleSheet.create({
|
||||
letterSpacing: 0.2,
|
||||
},
|
||||
dosageField: {
|
||||
borderWidth: 1,
|
||||
borderRadius: 16,
|
||||
paddingHorizontal: 16,
|
||||
paddingVertical: 12,
|
||||
@@ -1582,7 +1602,6 @@ const styles = StyleSheet.create({
|
||||
fontWeight: '600',
|
||||
},
|
||||
noteInput: {
|
||||
borderWidth: 1,
|
||||
borderRadius: 20,
|
||||
padding: 16,
|
||||
paddingRight: 72,
|
||||
@@ -1594,6 +1613,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
noteInputWrapper: {
|
||||
position: 'relative',
|
||||
borderRadius: 24,
|
||||
},
|
||||
noteVoiceButton: {
|
||||
position: 'absolute',
|
||||
|
||||
Reference in New Issue
Block a user