feat: Phase 4 — Live, Vitals, Zones, MAT, Settings screens
LiveScreen: GaussianSplatWebView + gaussian-splats.html (Three.js 3D viz), LiveHUD VitalsScreen: BreathingGauge, HeartRateGauge, MetricCard (Reanimated arcs) ZonesScreen: FloorPlanSvg (SVG heatmap 20x20), ZoneLegend, useOccupancyGrid MATScreen: MatWebView + mat-dashboard.html (pure-JS disaster response), AlertCard/List, SurvivorCounter SettingsScreen: ServerUrlInput (URL validation + test), ThemePicker, RssiToggle Verified: tsc 0 errors, jest passes
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import { FlatList, View } from 'react-native';
|
||||
import { ThemedText } from '@/components/ThemedText';
|
||||
import { colors } from '@/theme/colors';
|
||||
import { spacing } from '@/theme/spacing';
|
||||
import type { Alert } from '@/types/mat';
|
||||
import { AlertCard } from './AlertCard';
|
||||
|
||||
type AlertListProps = {
|
||||
alerts: Alert[];
|
||||
};
|
||||
|
||||
export const AlertList = ({ alerts }: AlertListProps) => {
|
||||
if (alerts.length === 0) {
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
padding: spacing.md,
|
||||
borderWidth: 1,
|
||||
borderColor: colors.border,
|
||||
borderRadius: 12,
|
||||
backgroundColor: '#111827',
|
||||
}}
|
||||
>
|
||||
<ThemedText preset="bodyMd">No alerts — system nominal</ThemedText>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<FlatList
|
||||
data={alerts}
|
||||
keyExtractor={(item) => item.id}
|
||||
renderItem={({ item }) => <AlertCard alert={item} />}
|
||||
contentContainerStyle={{ paddingBottom: spacing.md }}
|
||||
showsVerticalScrollIndicator={false}
|
||||
removeClippedSubviews={false}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user