Show placeholder for empty location in Equipment screen
Display "No location set" in italic style when sensor has no location configured. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
c46af1ea1d
commit
52def3cb79
@ -451,9 +451,12 @@ export default function EquipmentScreen() {
|
|||||||
<Text style={styles.deviceMetaSeparator}>•</Text>
|
<Text style={styles.deviceMetaSeparator}>•</Text>
|
||||||
<Text style={styles.deviceRoom}>{formatLastSeen(sensor.lastSeen)}</Text>
|
<Text style={styles.deviceRoom}>{formatLastSeen(sensor.lastSeen)}</Text>
|
||||||
</View>
|
</View>
|
||||||
{sensor.location && (
|
<Text style={[
|
||||||
<Text style={styles.deviceLocation}>{sensor.location}</Text>
|
styles.deviceLocation,
|
||||||
)}
|
!sensor.location && styles.deviceLocationPlaceholder
|
||||||
|
]}>
|
||||||
|
{sensor.location || 'No location set'}
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
@ -867,4 +870,8 @@ const styles = StyleSheet.create({
|
|||||||
color: AppColors.textMuted,
|
color: AppColors.textMuted,
|
||||||
marginTop: 2,
|
marginTop: 2,
|
||||||
},
|
},
|
||||||
|
deviceLocationPlaceholder: {
|
||||||
|
fontStyle: 'italic',
|
||||||
|
opacity: 0.6,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user