// apps/mobile/app/(tabs)/dash.tsx // Dashboard tab — session stats, usage, system status // Design ref: docs/v3/designs/dashboard.html import { View, ScrollView, StyleSheet } from 'react-native' import { useSafeAreaInsets } from 'react-native-safe-area-context' import { MetalCard, PhosphorText, Led, ScreenPanel, AppStatusBar, Header, d3roNativePalette } from '@d3ro/ui-native' import { useI18n } from '@d3ro/i18n' export default function DashScreen(): React.ReactElement { const insets = useSafeAreaInsets() const { t } = useI18n() return (
{/* Session Overview — InsetPanel */} {t('mobile.dash.sessionOverview')} 0 {t('mobile.dash.today')} {t('mobile.dash.tapToRecord')} {t('mobile.dash.words')} 0 {t('mobile.dash.streak')} 0 {/* 2x2 Stats Grid */} {t('mobile.dash.rec')} 0 {t('mobile.dash.min')} {t('mobile.dash.words')} 0 {t('mobile.dash.today')} 0 {t('mobile.dash.streak')} 0 {/* Backend Info */} {t('mobile.dash.backend')} CLOUD (CLAUDE) {t('mobile.dash.tier')} {t('mobile.dash.free')} {/* Usage */} {t('mobile.dash.usage')} ) } function UsageRow({ label, value, progress }: { label: string value: string progress?: number }): React.ReactElement { return ( {label} {value} {progress != null && ( )} ) } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: d3roNativePalette.bg.app }, content: { paddingHorizontal: 20 }, overviewPanel: { marginBottom: 12 }, sectionLabel: { marginBottom: 16 }, bigNumber: { flexDirection: 'row', alignItems: 'baseline', marginBottom: 8 }, todayLabel: { marginLeft: 12 }, guideText: { marginBottom: 20 }, overviewFooter: { flexDirection: 'row', justifyContent: 'space-between', borderTopWidth: 1, borderTopColor: d3roNativePalette.border.subtle, paddingTop: 12 }, alignEnd: { alignItems: 'flex-end' }, statsGrid: { flexDirection: 'row', flexWrap: 'wrap', gap: 12, marginBottom: 12 }, statCard: { width: '47%' as unknown as number, alignItems: 'center', paddingVertical: 16, gap: 4 }, infoCard: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginBottom: 12, paddingVertical: 14 }, infoRow: { flexDirection: 'row', alignItems: 'center' }, infoValue: { marginLeft: 8 }, usageTitle: { letterSpacing: 3, marginBottom: 8, marginLeft: 4 }, usageCard: { marginBottom: 12, padding: 0, overflow: 'hidden' }, usageRow: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', padding: 16 }, usageRight: { alignItems: 'flex-end', gap: 4 }, usageDivider: { height: 1, backgroundColor: d3roNativePalette.border.subtle }, progressBar: { width: 80, height: 4, backgroundColor: d3roNativePalette.bg.inset, borderRadius: 2, overflow: 'hidden' }, progressFill: { height: '100%' as unknown as number, backgroundColor: d3roNativePalette.accent.green, borderRadius: 2 } })