| 1 | import { View, Text, StyleSheet } from 'react-native';
|
| 2 | import { ThemedText } from '@/components/misc/themed-text';
|
| 3 | import { ThemedView } from '@/components/misc/themed-view';
|
| 4 | import { ScreenLayout } from '@/components/ui/ScreenLayout';
|
| 5 | import { useAuth } from '@/context/AuthContext';
|
| 6 | import { Section, SectionHeader } from '@/components/ui/Sections';
|
| 7 | import { Card, SubtleInfoCard } from '@/components/ui/Cards';
|
| 8 | import { Grid, Col, Row, Between } from '@/components/ui/LayoutHelpers';
|
| 9 | import { Button } from '@/components/ui/Button'
|
| 10 | import { Shadows, Colors, Typography, Spacing, BorderRadius } from '@/constants/theme';
|
| 11 | import { Ionicons, Octicons } from '@expo/vector-icons';
|
| 12 | import { Link, router } from 'expo-router';
|
| 13 |
|
| 14 | export default function Actions() {
|
| 15 | const { user } = useAuth();
|
| 16 |
|
| 17 | const onPressSleep = () => {
|
| 18 | router.push('/sleep/new')
|
| 19 | }
|
| 20 |
|
| 21 | return (
|
| 22 | <ScreenLayout userName={user.firstName} userAvatar={user.avatarURL}
|
| 23 | onNotificationPress={() => console.log('Notifications')}
|
| 24 | showNotificationBadge={true}>
|
| 25 | <Section>
|
| 26 | <SectionHeader
|
| 27 | title="Hub de Ações e Gestão"
|
| 28 | subtitle="Sua ferramenta de apoio para menter a rotina de saúde organizada e monitorada"
|
| 29 | >
|
| 30 | </SectionHeader>
|
| 31 |
|
| 32 | <Button title="Registrar Intervenção" size="large" style={{
|
| 33 | ...Shadows.lg
|
| 34 | }} />
|
| 35 | </Section>
|
| 36 |
|
| 37 | <Card style={{ padding: Spacing.cardGap, height: 150 }}>
|
| 38 | <View style={[styles.cardIcon, { backgroundColor: '#E7FDEF' }]}>
|
| 39 | <Ionicons name="bandage-outline" size={20} color="#13EC5B" />
|
| 40 | </View>
|
| 41 |
|
| 42 | <Text style={styles.cardTitleHeadline}>
|
| 43 | Gerenciar Medicamentos
|
| 44 | </Text>
|
| 45 |
|
| 46 | <Text style={styles.cardDescriptionHeadline}>
|
| 47 | Controle horários, doses e estoque de suas prescrições.
|
| 48 | </Text>
|
| 49 | </Card>
|
| 50 |
|
| 51 | <Grid gap={4}>
|
| 52 | <Card onPress={onPressSleep} style={{ padding: Spacing.cardGap }}>
|
| 53 | <View style={[styles.cardIcon, { backgroundColor: '#EFF6FF' }]}>
|
| 54 | <Ionicons name="moon-outline" size={20} color="#2563EB" />
|
| 55 | </View>
|
| 56 |
|
| 57 | <Text style={styles.cardTitle}>
|
| 58 | Registrar Sono
|
| 59 | </Text>
|
| 60 |
|
| 61 | <Text style={styles.cardDescription}>
|
| 62 | Informe duração e qualidade do sono.
|
| 63 | </Text>
|
| 64 | </Card>
|
| 65 |
|
| 66 | <Card style={{ padding: Spacing.cardGap }}>
|
| 67 | <View style={[styles.cardIcon, { backgroundColor: '#FFF7ED' }]}>
|
| 68 | <Ionicons name="flash-outline" size={20} color="#EA580C" />
|
| 69 | </View>
|
| 70 |
|
| 71 | <Text style={styles.cardTitle}>
|
| 72 | Adicionar Gatilho
|
| 73 | </Text>
|
| 74 |
|
| 75 | <Text style={styles.cardDescription}>
|
| 76 | Registre eventos que aferatam seu humor.
|
| 77 | </Text>
|
| 78 | </Card>
|
| 79 | </Grid>
|
| 80 |
|
| 81 | <Card style={styles.disclaimerCard}>
|
| 82 | <View style={styles.disclaimerTitleContainer}>
|
| 83 | <Ionicons name="information-circle-outline" size={20} color={Colors.light.tint} />
|
| 84 | <Text style={styles.disclaimerTitleText}>Nota de Apoio</Text>
|
| 85 | </View>
|
| 86 |
|
| 87 | <Text style={styles.disclaimerText}>
|
| 88 | Este aplicativo é um assistente digital para
|
| 89 | auxiliar no seu monitoramento diário. Em caso
|
| 90 | de emergência ou sintomas graves, entre em
|
| 91 | contato imediatamente com seu médico ou
|
| 92 | serviços de saúde locais.
|
| 93 | </Text>
|
| 94 |
|
| 95 | <View style={styles.disclaimerHelp}>
|
| 96 | <Link href="https://expo.dev" style={styles.disclaimerHelpText}>
|
| 97 | Ver canais de ajuda <Octicons name="link-external" size={12} color="black" />
|
| 98 | </Link>
|
| 99 | </View>
|
| 100 | </Card>
|
| 101 | </ScreenLayout>
|
| 102 | )
|
| 103 | }
|
| 104 |
|
| 105 | const styles = StyleSheet.create({
|
| 106 | cardIcon: {
|
| 107 | paddingVertical: 15,
|
| 108 | paddingHorizontal: 14,
|
| 109 | width: 48,
|
| 110 | borderRadius: BorderRadius.md,
|
| 111 | },
|
| 112 | cardTitleHeadline: {
|
| 113 | ...Typography.headlineMd,
|
| 114 | lineHeight: 20,
|
| 115 | marginTop: 4
|
| 116 | },
|
| 117 | cardTitle: {
|
| 118 | ...Typography.bodyLg,
|
| 119 | lineHeight: 20,
|
| 120 | marginTop: 4
|
| 121 | },
|
| 122 | cardDescriptionHeadline: {
|
| 123 | ...Typography.bodyMg,
|
| 124 | color: Colors.light.textSecondary,
|
| 125 | marginTop: 4
|
| 126 | },
|
| 127 | cardDescription: {
|
| 128 | ...Typography.labelSm,
|
| 129 | color: Colors.light.textSecondary,
|
| 130 | marginTop: 4
|
| 131 | },
|
| 132 | disclaimerCard: {
|
| 133 | padding: Spacing.cardGap,
|
| 134 | marginTop: 20
|
| 135 | },
|
| 136 | disclaimerTitleContainer: {
|
| 137 | flex: 1,
|
| 138 | flexDirection: 'row',
|
| 139 | gap: 5,
|
| 140 | marginBottom: 10
|
| 141 | },
|
| 142 | disclaimerTitleText: {
|
| 143 | fontWeight: 600,
|
| 144 | fontSize: 16,
|
| 145 | lineHeight: 20,
|
| 146 | },
|
| 147 | disclaimerText: {
|
| 148 | fontSize: 12,
|
| 149 | lineHeight: 18,
|
| 150 | color: Colors.light.textSecondary,
|
| 151 | },
|
| 152 | disclaimerHelp: {
|
| 153 | marginTop: 10,
|
| 154 | borderTopWidth: 1,
|
| 155 | borderTopColor: Colors.light.divider,
|
| 156 | paddingTop: 5,
|
| 157 | },
|
| 158 | disclaimerHelpText: {
|
| 159 | color: "#0f172a",
|
| 160 | fontWeight: 500,
|
| 161 | fontSize: 12,
|
| 162 | lineHeight: 16,
|
| 163 | alignItems: 'center'
|
| 164 | }
|
| 165 | })
|