fix: only show relevant actions

This commit is contained in:
2026-01-04 12:34:29 -05:00
Unverified
parent ce13bf838b
commit 47970891ef

View File

@@ -332,16 +332,20 @@ export default function DeviceListScreen() {
</View> </View>
<View style={styles.deviceActions}> <View style={styles.deviceActions}>
{item.status?.toLowerCase() === 'offline' && (
<ActionIcon <ActionIcon
name="Wake" name="Wake"
symbolName="bolt.fill" symbolName="bolt.circle.fill"
fallbackName="flash" fallbackName="flash"
color="#4CAF50" color="#4CAF50"
onPress={() => handleWake(item)} onPress={() => handleWake(item)}
/> />
)}
{item.status?.toLowerCase() === 'online' && (
<>
<ActionIcon <ActionIcon
name="Sleep" name="Sleep"
symbolName="moon.fill" symbolName="moon.circle.fill"
fallbackName="moon" fallbackName="moon"
color="#FF9800" color="#FF9800"
onPress={() => handleSleep(item)} onPress={() => handleSleep(item)}
@@ -360,6 +364,8 @@ export default function DeviceListScreen() {
color="#f44336" color="#f44336"
onPress={() => handleShutdown(item)} onPress={() => handleShutdown(item)}
/> />
</>
)}
</View> </View>
</View> </View>
</View> </View>