feat: implement plant health check functionality with AI analysis, credit management, and UI integration
This commit is contained in:
@@ -99,9 +99,9 @@ export const ResultCard: React.FC<ResultCardProps> = ({
|
||||
|
||||
<View style={styles.careGrid}>
|
||||
{[
|
||||
{ icon: 'water' as const, label: t.water, value: result.careInfo.waterIntervalDays <= 7 ? t.waterModerate : t.waterLittle, color: colors.info, bg: colors.infoSoft },
|
||||
{ icon: 'sunny' as const, label: t.light, value: result.careInfo.light, color: colors.warning, bg: colors.warningSoft },
|
||||
{ icon: 'thermometer' as const, label: t.temp, value: result.careInfo.temp, color: colors.danger, bg: colors.dangerSoft },
|
||||
{ icon: 'water' as const, label: t.water, value: t.waterEveryXDays.replace('{0}', result.careInfo.waterIntervalDays.toString()), color: colors.info, bg: colors.infoSoft },
|
||||
{ icon: 'sunny' as const, label: t.light, value: result.careInfo.light || t.unknown, color: colors.warning, bg: colors.warningSoft },
|
||||
{ icon: 'thermometer' as const, label: t.temp, value: result.careInfo.temp || t.unknown, color: colors.danger, bg: colors.dangerSoft },
|
||||
].map((item) => (
|
||||
<View key={item.label} style={[styles.careCard, { backgroundColor: colors.surface, borderColor: colors.border }]}>
|
||||
<View style={[styles.careIcon, { backgroundColor: item.bg }]}>
|
||||
@@ -118,8 +118,8 @@ export const ResultCard: React.FC<ResultCardProps> = ({
|
||||
<Text style={[styles.detailsTitle, { color: colors.textSecondary }]}>{t.detailedCare}</Text>
|
||||
{[
|
||||
{ text: t.careTextWater.replace('{0}', result.careInfo.waterIntervalDays.toString()), color: colors.success },
|
||||
{ text: t.careTextLight.replace('{0}', result.careInfo.light), color: colors.warning },
|
||||
{ text: t.careTextTemp.replace('{0}', result.careInfo.temp), color: colors.danger },
|
||||
{ text: t.careTextLight.replace('{0}', result.careInfo.light || t.unknown), color: colors.warning },
|
||||
{ text: t.careTextTemp.replace('{0}', result.careInfo.temp || t.unknown), color: colors.danger },
|
||||
].map((item, i) => (
|
||||
<View key={i} style={styles.detailRow}>
|
||||
<View style={[styles.detailDot, { backgroundColor: item.color }]} />
|
||||
|
||||
Reference in New Issue
Block a user