eletrotupi / tcc/ commit / ec834db

frontend: rework copy text for actions

Pedro Lucas Porcellis porcellis@eletrotupi.com 1 month ago ec834db7af26c3f993f9ef96ee20860b8e46c8a0
Parents: 00adbb7
1 file(s) changed
  • frontend/app/(tabs)/actions.tsx +68 -59
frontend/app/(tabs)/actions.tsx
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';
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 {
11 +
  Shadows,
12 +
  Colors,
13 +
  Typography,
14 +
  Spacing,
15 +
  BorderRadius,
16 +
} from "@/constants/theme";
17 +
import { Ionicons, Octicons } from "@expo/vector-icons";
18 +
import { Link, router } from "expo-router";
13 19

14 20
export default function Actions() {
15 21
  const { user } = useAuth();
16 22

17 23
  const onPressSleep = () => {
18 -
    router.push('/sleep/new')
19 -
  }
24 +
    router.push("/sleep/new");
25 +
  };
20 26

21 27
  const onPressTrigger = () => {
22 -
    router.push('/triggers/new')
23 -
  }
28 +
    router.push("/triggers/new");
29 +
  };
24 30

25 31
  return (
26 -
    <ScreenLayout userName={user.firstName} userAvatar={user.avatarURL}
27 -
      onNotificationPress={() => console.log('Notifications')}
28 -
      showNotificationBadge={true}>
32 +
    <ScreenLayout
33 +
      userName={user.firstName}
34 +
      userAvatar={user.avatarURL}
35 +
      onNotificationPress={() => console.log("Notifications")}
36 +
      showNotificationBadge={true}
37 +
    >
29 38
      <Section>
30 39
        <SectionHeader
31 -
          title="Hub de Ações e Gestão"
32 -
          subtitle="Sua ferramenta de apoio para menter a rotina de saúde organizada e monitorada"
33 -
          >
34 -
        </SectionHeader>
40 +
          title="Ações de Cuidado"
41 +
          subtitle="Registre atividades, acompanhe medicamentos e mantenha sua rotina organizada"
42 +
        ></SectionHeader>
35 43

36 -
        <Button title="Registrar Intervenção" size="large" style={{
37 -
          ...Shadows.lg
38 -
        }} />
44 +
        <Button
45 +
          title="Registrar ação de cuidado"
46 +
          size="large"
47 +
          style={{
48 +
            ...Shadows.lg,
49 +
          }}
50 +
        />
39 51
      </Section>
40 52

41 53
      <Card style={{ padding: Spacing.cardGap, height: 150 }}>
42 -
        <View style={[styles.cardIcon, { backgroundColor: '#E7FDEF' }]}>
54 +
        <View style={[styles.cardIcon, { backgroundColor: "#E7FDEF" }]}>
43 55
          <Ionicons name="bandage-outline" size={20} color="#13EC5B" />
44 56
        </View>
45 57

46 -
        <Text style={styles.cardTitleHeadline}>
47 -
          Gerenciar Medicamentos
48 -
        </Text>
58 +
        <Text style={styles.cardTitleHeadline}>Gerenciar Medicamentos</Text>
49 59

50 60
        <Text style={styles.cardDescriptionHeadline}>
51 -
          Controle horários, doses e estoque de suas prescrições.
61 +
          Organize seus medicamentos, horários e doses
52 62
        </Text>
53 63
      </Card>
54 64

55 65
      <Grid gap={4}>
56 66
        <Card onPress={onPressSleep} style={{ padding: Spacing.cardGap }}>
57 -
          <View style={[styles.cardIcon, { backgroundColor: '#EFF6FF' }]}>
67 +
          <View style={[styles.cardIcon, { backgroundColor: "#EFF6FF" }]}>
58 68
            <Ionicons name="moon-outline" size={20} color="#2563EB" />
59 69
          </View>
60 70

61 -
          <Text style={styles.cardTitle}>
62 -
            Registrar Sono
63 -
          </Text>
71 +
          <Text style={styles.cardTitle}>Registrar Sono</Text>
64 72

65 73
          <Text style={styles.cardDescription}>
66 -
            Informe duração e qualidade do sono.
74 +
            Registre a duração e a qualidade do sono
67 75
          </Text>
68 76
        </Card>
69 77

70 78
        <Card style={{ padding: Spacing.cardGap }} onPress={onPressTrigger}>
71 -
          <View style={[styles.cardIcon, { backgroundColor: '#FFF7ED' }]}>
79 +
          <View style={[styles.cardIcon, { backgroundColor: "#FFF7ED" }]}>
72 80
            <Ionicons name="flash-outline" size={20} color="#EA580C" />
73 81
          </View>
74 82

75 -
          <Text style={styles.cardTitle}>
76 -
            Adicionar Gatilho
77 -
          </Text>
83 +
          <Text style={styles.cardTitle}>Registrar Gatilho</Text>
78 84

79 85
          <Text style={styles.cardDescription}>
80 -
            Registre eventos que aferatam seu humor.
86 +
            Registre eventos que aferatam seu humor
81 87
          </Text>
82 88
        </Card>
83 89
      </Grid>
84 90

85 91
      <Card style={styles.disclaimerCard}>
86 92
        <View style={styles.disclaimerTitleContainer}>
87 -
          <Ionicons name="information-circle-outline" size={20} color={Colors.light.tint} />
93 +
          <Ionicons
94 +
            name="information-circle-outline"
95 +
            size={20}
96 +
            color={Colors.light.tint}
97 +
          />
88 98
          <Text style={styles.disclaimerTitleText}>Nota de Apoio</Text>
89 99
        </View>
90 100

91 101
        <Text style={styles.disclaimerText}>
92 -
          Este aplicativo é um assistente digital para
93 -
          auxiliar no seu monitoramento diário. Em caso
94 -
          de emergência ou sintomas graves, entre em
95 -
          contato imediatamente com seu médico ou
96 -
          serviços de saúde locais.
102 +
          Este aplicativo é um assistente digital para auxiliar no seu
103 +
          monitoramento diário. Em caso de emergência ou sintomas graves, entre
104 +
          em contato imediatamente com seu médico ou serviços de saúde locais.
97 105
        </Text>
98 106

99 107
        <View style={styles.disclaimerHelp}>
100 108
          <Link href="https://expo.dev" style={styles.disclaimerHelpText}>
101 -
            Ver canais de ajuda <Octicons name="link-external" size={12} color="black" />
109 +
            Ver canais de ajuda{" "}
110 +
            <Octicons name="link-external" size={12} color="black" />
102 111
          </Link>
103 112
        </View>
104 113
      </Card>
105 114
    </ScreenLayout>
106 -
  )
115 +
  );
107 116
}
108 117

109 118
const styles = StyleSheet.create({
110 119
  cardIcon: {
111 120
    paddingVertical: 15,
▸ 2 unchanged lines
114 123
    borderRadius: BorderRadius.md,
115 124
  },
116 125
  cardTitleHeadline: {
117 126
    ...Typography.headlineMd,
118 127
    lineHeight: 20,
119 -
    marginTop: 4
128 +
    marginTop: 4,
120 129
  },
121 130
  cardTitle: {
122 131
    ...Typography.bodyLg,
123 132
    lineHeight: 20,
124 -
    marginTop: 4
133 +
    marginTop: 4,
125 134
  },
126 135
  cardDescriptionHeadline: {
127 136
    ...Typography.bodyMg,
128 137
    color: Colors.light.textSecondary,
129 -
    marginTop: 4
138 +
    marginTop: 4,
130 139
  },
131 140
  cardDescription: {
132 141
    ...Typography.labelSm,
133 142
    color: Colors.light.textSecondary,
134 -
    marginTop: 4
143 +
    marginTop: 4,
135 144
  },
136 145
  disclaimerCard: {
137 146
    padding: Spacing.cardGap,
138 -
    marginTop: 20
147 +
    marginTop: 20,
139 148
  },
140 149
  disclaimerTitleContainer: {
141 150
    flex: 1,
142 -
    flexDirection: 'row',
151 +
    flexDirection: "row",
143 152
    gap: 5,
144 -
    marginBottom: 10
153 +
    marginBottom: 10,
145 154
  },
146 155
  disclaimerTitleText: {
147 156
    fontWeight: 600,
148 157
    fontSize: 16,
149 158
    lineHeight: 20,
▸ 12 unchanged lines
162 171
  disclaimerHelpText: {
163 172
    color: "#0f172a",
164 173
    fontWeight: 500,
165 174
    fontSize: 12,
166 175
    lineHeight: 16,
167 -
    alignItems: 'center'
168 -
  }
169 -
})
176 +
    alignItems: "center",
177 +
  },
178 +
});