feat: implement plant identification result card component and initialize backend server infrastructure
This commit is contained in:
@@ -100,8 +100,8 @@ export const ResultCard: React.FC<ResultCardProps> = ({
|
||||
<View style={styles.careGrid}>
|
||||
{[
|
||||
{ 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 },
|
||||
{ icon: 'sunny' as const, label: t.light, value: (result.careInfo.light && result.careInfo.light !== 'Unknown') ? result.careInfo.light : t.unknown, color: colors.warning, bg: colors.warningSoft },
|
||||
{ icon: 'thermometer' as const, label: t.temp, value: (result.careInfo.temp && result.careInfo.temp !== 'Unknown') ? 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 || t.unknown), color: colors.warning },
|
||||
{ text: t.careTextTemp.replace('{0}', result.careInfo.temp || t.unknown), color: colors.danger },
|
||||
{ text: t.careTextLight.replace('{0}', (result.careInfo.light && result.careInfo.light !== 'Unknown') ? result.careInfo.light : t.unknown), color: colors.warning },
|
||||
{ text: t.careTextTemp.replace('{0}', (result.careInfo.temp && result.careInfo.temp !== 'Unknown') ? 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