Skip to content

Commit 7371235

Browse files
committed
feat(self-care): pagina /self-care con micro-promemoria e segnali burnout (Wave 5 fase 3)
1 parent 0e2feaf commit 7371235

6 files changed

Lines changed: 230 additions & 3 deletions

File tree

frontend/src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import InviteAcceptPage from './pages/InviteAcceptPage';
1515
import AccountPage from './pages/AccountPage';
1616
import AuditPage from './pages/AuditPage';
1717
import SupportPage from './pages/SupportPage';
18+
import SelfCarePage from './pages/SelfCarePage';
1819

1920
export default function App() {
2021
return (
@@ -34,6 +35,7 @@ export default function App() {
3435
<Route path="/invite/:token" element={<InviteAcceptPage />} />
3536
<Route path="/account" element={<RequireAuth><AccountPage /></RequireAuth>} />
3637
<Route path="/support" element={<SupportPage />} />
38+
<Route path="/self-care" element={<SelfCarePage />} />
3739
<Route path="*" element={<Navigate to="/" replace />} />
3840
</Route>
3941
</Routes>

frontend/src/components/WellbeingSection.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ export default function WellbeingSection() {
133133
<Trend items={items} t={t} />
134134

135135
<p className="muted" style={{ marginTop: '1rem' }}>
136+
<Link to="/self-care" className="text-accanto-700 underline">
137+
{t('account.wellbeing.selfCareLink')}
138+
</Link>
139+
{' · '}
136140
<Link to="/support" className="text-accanto-700 underline">
137141
{t('account.wellbeing.supportLink')}
138142
</Link>

frontend/src/i18n/locales/en.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,59 @@
138138
"trendEmpty": "At least two check-ins are needed to see a trend.",
139139
"history": "History ({{count}})",
140140
"confirmDelete": "Delete this check-in?",
141-
"supportLink": "Need to talk to someone? Find support"
141+
"supportLink": "Need to talk to someone? Find support",
142+
"selfCareLink": "Caring for yourself"
142143
}
143144
},
145+
"selfCare": {
146+
"title": "Caring for yourself",
147+
"intro": "People who care for someone they love often forget to look after themselves. It isn't selfishness — it's necessary maintenance, like the car that carries everyone home.",
148+
"daily": {
149+
"title": "A small gesture for today",
150+
"tips": {
151+
"0": "Drink a glass of water, now, before going back to anything else.",
152+
"1": "Three slow breaths: in for 4, out for 6. Just that.",
153+
"2": "For five minutes put your phone on silent and do one thing for yourself.",
154+
"3": "Send a message to someone who loves you: even a plain 'hi' counts.",
155+
"4": "Step outside your door, look around, feel the air.",
156+
"5": "Eat something, even a little. Don't skip meals.",
157+
"6": "Lie down for five minutes. You don't have to sleep, just stop.",
158+
"7": "Write one sentence: what feels heaviest today.",
159+
"8": "Think of one thing you did well today. Just one.",
160+
"9": "Ask yourself: is there one thing I can hand off to someone today?"
161+
}
162+
},
163+
"burnout": {
164+
"title": "Signs not to ignore",
165+
"intro": "Caregiver burnout is real. If you recognise several of these together, don't wait.",
166+
"signs": [
167+
"Tiredness that sleep doesn't fix",
168+
"Irritability toward the person you care for",
169+
"Insomnia or broken sleep",
170+
"Frequent crying, sense of emptiness",
171+
"Isolation from friends and family",
172+
"Neglecting yourself: hygiene, meals, health",
173+
"Thoughts of running away or not being able to go on"
174+
],
175+
"outro": "If more than three of these feel familiar, talk to your doctor or a listening service. It isn't weakness — it's useful information."
176+
},
177+
"rest": {
178+
"title": "The rule of rest",
179+
"body": "Rest isn't a reward, it's fuel. Schedule rest the way you schedule medication: at fixed times, even when it 'doesn't feel necessary'. By the time the need hits, it's often too late."
180+
},
181+
"boundaries": {
182+
"title": "Healthy limits",
183+
"intro": "Saying 'no' to something means saying 'yes' to something else: to you, to your health, to care that lasts.",
184+
"points": [
185+
"You are not required to be available 24/7.",
186+
"Asking for help isn't failure: it's strategy.",
187+
"Sharing tasks with people around you (family, services) is an act of responsibility.",
188+
"Mixed feelings are normal: love and exhaustion, gratitude and anger. They coexist."
189+
]
190+
},
191+
"supportLink": "Find contacts and support services",
192+
"disclaimer": "These pages do not replace medical or psychological advice. If you are suffering, talk to a professional."
193+
},
144194
"support": {
145195
"title": "Find support",
146196
"intro": "A small list of Italian organisations that listen and walk alongside people who care for someone else. No one should do this alone.",

frontend/src/i18n/locales/es.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,59 @@
138138
"trendEmpty": "Hacen falta al menos dos check-in para ver una tendencia.",
139139
"history": "Historial ({{count}})",
140140
"confirmDelete": "¿Eliminar este check-in?",
141-
"supportLink": "¿Necesitas hablar con alguien? Encuentra apoyo"
141+
"supportLink": "¿Necesitas hablar con alguien? Encuentra apoyo",
142+
"selfCareLink": "Cuidándote"
142143
}
143144
},
145+
"selfCare": {
146+
"title": "Cuidándote",
147+
"intro": "Quien cuida a un ser querido a menudo se olvida de cuidarse. No es egoísmo: es mantenimiento necesario, como el coche que lleva a todos a casa.",
148+
"daily": {
149+
"title": "Un pequeño gesto para hoy",
150+
"tips": {
151+
"0": "Bebe un vaso de agua, ahora, antes de volver a cualquier otra cosa.",
152+
"1": "Tres respiraciones lentas: inhala 4, exhala 6. Solo eso.",
153+
"2": "Durante cinco minutos pon el móvil en silencio y haz algo para ti.",
154+
"3": "Manda un mensaje a alguien que te quiere: un simple «hola» basta.",
155+
"4": "Sal al umbral, mira fuera, siente el aire.",
156+
"5": "Come algo, aunque sea poco. No te saltes las comidas.",
157+
"6": "Túmbate cinco minutos. No tienes que dormir, solo parar.",
158+
"7": "Escribe una frase: qué es lo que más pesa hoy.",
159+
"8": "Piensa una cosa que hayas hecho bien hoy. Solo una.",
160+
"9": "Pregúntate: ¿hay algo que pueda delegar hoy en alguien?"
161+
}
162+
},
163+
"burnout": {
164+
"title": "Señales que no hay que ignorar",
165+
"intro": "El desgaste del cuidador es real. Si reconoces varias de estas señales juntas, no esperes.",
166+
"signs": [
167+
"Cansancio que no se cura con el sueño",
168+
"Irritabilidad hacia la persona a la que cuidas",
169+
"Insomnio o sueño fragmentado",
170+
"Llanto frecuente, sensación de vacío",
171+
"Aislamiento de amigos y familia",
172+
"Descuido de ti: higiene, comidas, salud",
173+
"Pensamientos de huir o de no poder más"
174+
],
175+
"outro": "Si te reconoces en más de tres puntos, habla con tu médico o con un servicio de escucha. No es debilidad: es información útil."
176+
},
177+
"rest": {
178+
"title": "La regla del descanso",
179+
"body": "Descansar no es una recompensa, es combustible. Programa el descanso como programas los medicamentos: a horario fijo, incluso cuando «parece que no hace falta». Cuando la necesidad aprieta, ya suele ser tarde."
180+
},
181+
"boundaries": {
182+
"title": "Límites sanos",
183+
"intro": "Decir «no» a algo significa decir «sí» a otra cosa: a ti, a tu salud, a un cuidado que dure en el tiempo.",
184+
"points": [
185+
"No tienes que estar disponible 24 horas al día.",
186+
"Pedir ayuda no es fracaso: es estrategia.",
187+
"Repartir tareas con quien te rodea (familia, servicios) es un acto de responsabilidad.",
188+
"Es normal sentir cosas contradictorias: amor y agotamiento, gratitud y rabia. Conviven."
189+
]
190+
},
191+
"supportLink": "Encuentra contactos y servicios de apoyo",
192+
"disclaimer": "Estas páginas no sustituyen un consejo médico o psicológico. Si lo estás pasando mal, habla con un profesional."
193+
},
144194
"support": {
145195
"title": "Encuentra apoyo",
146196
"intro": "Una peque\u00f1a lista de organizaciones italianas que escuchan y acompa\u00f1an a quien cuida de otra persona. Nadie deber\u00eda estar solo en esto.",

frontend/src/i18n/locales/it.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,59 @@
138138
"trendEmpty": "Servono almeno due check-in per vedere un andamento.",
139139
"history": "Storico ({{count}})",
140140
"confirmDelete": "Eliminare questo check-in?",
141-
"supportLink": "Hai bisogno di parlare con qualcuno? Trova supporto"
141+
"supportLink": "Hai bisogno di parlare con qualcuno? Trova supporto",
142+
"selfCareLink": "Cura di te"
142143
}
143144
},
145+
"selfCare": {
146+
"title": "Cura di te",
147+
"intro": "Chi accudisce una persona cara spesso dimentica di accudire sé stesso. Non è egoismo: è manutenzione necessaria, come l’auto che porta tutti a destinazione.",
148+
"daily": {
149+
"title": "Un piccolo gesto per oggi",
150+
"tips": {
151+
"0": "Bevi un bicchiere d’acqua, adesso, prima di tornare a fare altro.",
152+
"1": "Tre respiri lenti: dentro per 4, fuori per 6. Solo questo.",
153+
"2": "Per cinque minuti metti il telefono in silenzioso e fai una cosa per te.",
154+
"3": "Manda un messaggio a chi ti vuole bene: anche un «ciao» basta.",
155+
"4": "Esci sulla soglia di casa, guarda fuori, senti l’aria.",
156+
"5": "Mangia qualcosa, anche poco. Non saltare i pasti.",
157+
"6": "Stenditi cinque minuti. Non devi addormentarti, basta fermarti.",
158+
"7": "Scrivi una frase: cos’è che oggi pesa di più.",
159+
"8": "Pensa una cosa che hai fatto bene oggi. Una basta.",
160+
"9": "Chiediti: c’è una cosa che posso delegare oggi a qualcuno?"
161+
}
162+
},
163+
"burnout": {
164+
"title": "Segnali da non ignorare",
165+
"intro": "Il logoramento del caregiver è reale. Se ne riconosci diversi insieme, non aspettare.",
166+
"signs": [
167+
"Stanchezza che non passa con il sonno",
168+
"Irritabilità verso la persona di cui ti prendi cura",
169+
"Insonnia o sonno frammentato",
170+
"Pianto frequente, senso di vuoto",
171+
"Isolamento dagli amici e dalla famiglia",
172+
"Trascuratezza di sé: igiene, pasti, salute",
173+
"Pensieri di fuga o di non farcela più"
174+
],
175+
"outro": "Se ti riconosci in più di tre punti, parla con il tuo medico o con un servizio di ascolto. Non è debolezza: è informazione utile."
176+
},
177+
"rest": {
178+
"title": "La regola del riposo",
179+
"body": "Riposare non è ricompensa, è carburante. Programma il riposo come programmi le medicine: a orario fisso, anche quando «sembra che non ce ne sia bisogno». Quando il bisogno si fa sentire, è spesso troppo tardi."
180+
},
181+
"boundaries": {
182+
"title": "Confini sani",
183+
"intro": "Dire «no» a qualcosa significa dire «sì» a qualcos’altro: a te, alla tua salute, a una cura sostenibile nel tempo.",
184+
"points": [
185+
"Non sei tenuto a essere disponibile 24 ore su 24.",
186+
"Chiedere aiuto non è fallimento: è strategia.",
187+
"Dividere i compiti con chi ti sta intorno (famiglia, servizi) è un atto di responsabilità.",
188+
"È normale provare sentimenti contrastanti: amore e stanchezza, gratitudine e rabbia. Convivono."
189+
]
190+
},
191+
"supportLink": "Trova contatti e servizi di supporto",
192+
"disclaimer": "Queste pagine non sostituiscono un consulto medico o psicologico. Se stai male, parlane con un professionista."
193+
},
144194
"support": {
145195
"title": "Trovi supporto",
146196
"intro": "Una piccola lista di realt\u00e0 italiane che ascoltano e accompagnano chi si prende cura di qualcuno. Nessuno deve fare tutto da solo.",
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import { useMemo } from 'react';
2+
import { Link } from 'react-router-dom';
3+
import { useTranslation } from 'react-i18next';
4+
5+
// Numero di micro-promemoria: deve coincidere con i18n key selfCare.daily.tips[0..N-1].
6+
const TIP_COUNT = 10;
7+
8+
function dayOfYear(d: Date): number {
9+
const start = new Date(d.getFullYear(), 0, 0);
10+
const diff = d.getTime() - start.getTime();
11+
return Math.floor(diff / 86_400_000);
12+
}
13+
14+
export default function SelfCarePage() {
15+
const { t } = useTranslation();
16+
17+
const tipIndex = useMemo(() => dayOfYear(new Date()) % TIP_COUNT, []);
18+
const signs = t('selfCare.burnout.signs', { returnObjects: true }) as string[];
19+
const boundaries = t('selfCare.boundaries.points', { returnObjects: true }) as string[];
20+
21+
return (
22+
<div className="max-w-md mx-auto pt-2">
23+
<div className="flex items-center justify-between mb-2">
24+
<h1 className="text-2xl font-semibold">{t('selfCare.title')}</h1>
25+
<Link to="/" className="text-sm text-accanto-500 hover:underline">
26+
{t('nav.home', { defaultValue: 'Home' })}
27+
</Link>
28+
</div>
29+
<p className="text-accanto-500 mb-6">{t('selfCare.intro')}</p>
30+
31+
<section className="card mb-4">
32+
<h2 className="font-semibold mb-1">{t('selfCare.daily.title')}</h2>
33+
<p>{t(`selfCare.daily.tips.${tipIndex}`)}</p>
34+
</section>
35+
36+
<section className="mb-6">
37+
<h2 className="text-lg font-semibold mb-2">{t('selfCare.burnout.title')}</h2>
38+
<p className="text-sm text-accanto-700 mb-3">{t('selfCare.burnout.intro')}</p>
39+
<ul className="space-y-2 list-disc list-inside text-sm">
40+
{signs.map((s, i) => (
41+
<li key={i}>{s}</li>
42+
))}
43+
</ul>
44+
<p className="text-sm text-accanto-500 mt-3">{t('selfCare.burnout.outro')}</p>
45+
</section>
46+
47+
<section className="mb-6">
48+
<h2 className="text-lg font-semibold mb-2">{t('selfCare.rest.title')}</h2>
49+
<p className="text-sm text-accanto-700">{t('selfCare.rest.body')}</p>
50+
</section>
51+
52+
<section className="mb-6">
53+
<h2 className="text-lg font-semibold mb-2">{t('selfCare.boundaries.title')}</h2>
54+
<p className="text-sm text-accanto-700 mb-2">{t('selfCare.boundaries.intro')}</p>
55+
<ul className="space-y-2 list-disc list-inside text-sm">
56+
{boundaries.map((s, i) => (
57+
<li key={i}>{s}</li>
58+
))}
59+
</ul>
60+
</section>
61+
62+
<p className="text-sm text-accanto-500">
63+
<Link to="/support" className="text-accanto-700 underline">
64+
{t('selfCare.supportLink')}
65+
</Link>
66+
</p>
67+
68+
<p className="mt-8 text-xs text-accanto-500">{t('selfCare.disclaimer')}</p>
69+
</div>
70+
);
71+
}

0 commit comments

Comments
 (0)