-
+
Soglie
@@ -90,7 +88,7 @@ function DettaglioBadge({ def, stato }: { def: BadgeDef; stato?: BadgeStato }) {
>
@@ -104,7 +102,7 @@ function DettaglioBadge({ def, stato }: { def: BadgeDef; stato?: BadgeStato }) {
>
{def.soglie[g]}
-
{def.unita}
+
{def.unita}
);
})}
diff --git a/src/components/crapp/BottomNav.tsx b/src/components/crapp/BottomNav.tsx
index 9db2121..8e7913a 100644
--- a/src/components/crapp/BottomNav.tsx
+++ b/src/components/crapp/BottomNav.tsx
@@ -2,7 +2,7 @@ import { Link } from "@tanstack/react-router";
import { CalendarDays, Home, Trophy, User, Users } from "lucide-react";
const items = [
- { to: "/", label: "Home", icon: Home },
+ { to: "/", label: "Oggi", icon: Home },
{ to: "/calendario", label: "Calendario", icon: CalendarDays },
{ to: "/squadra", label: "Squadra", icon: Users },
{ to: "/classifica", label: "Classifica", icon: Trophy },
@@ -11,17 +11,33 @@ const items = [
export function BottomNav() {
return (
-
-
- Vinto
-
+
Vinto
{conteggio}{" "}
@@ -141,7 +139,7 @@ export function CollezioneBadge({
-
+
Collezione badge
@@ -158,7 +156,7 @@ export function CollezioneBadge({
{vicino ? (
-
+
Prossimo traguardo
{vicino.def.nome}
@@ -171,7 +169,7 @@ export function CollezioneBadge({
{c.sbloccati.length > 0 ? (
-
+
Sbloccati ({c.sbloccati.length})
@@ -186,7 +184,7 @@ export function CollezioneBadge({
{c.inProgresso.length > 0 ? (
-
+
In progresso ({c.inProgresso.length})
@@ -201,7 +199,7 @@ export function CollezioneBadge({
{socialVinti.length > 0 ? (
-
+
Votati dai compagni
@@ -210,7 +208,7 @@ export function CollezioneBadge({
{cat.emoji}
{cat.nome}
-
+
Vinto {social[cat.id]} {social[cat.id] === 1 ? "volta" : "volte"}
@@ -221,7 +219,7 @@ export function CollezioneBadge({
) : null}
-
+
Badge segreti
@@ -232,7 +230,7 @@ export function CollezioneBadge({
{b.def.nome}
-
+
{b.def.celebrazione ?? "Badge segreto sbloccato."}
@@ -246,7 +244,7 @@ export function CollezioneBadge({
>
???
-
Badge segreto da scoprire
+
Badge segreto da scoprire
))}
diff --git a/src/components/crapp/EventoCard.tsx b/src/components/crapp/EventoCard.tsx
index 51fabc4..f485a57 100644
--- a/src/components/crapp/EventoCard.tsx
+++ b/src/components/crapp/EventoCard.tsx
@@ -1,6 +1,7 @@
import { MapPin, Clock, Users, Cake, ArrowRight } from "lucide-react";
import { Link } from "@tanstack/react-router";
import { cn } from "@/lib/utils";
+import { Card } from "@/components/crapp/ui-bits";
import { formatData, statoMeta, type Stato } from "@/lib/crapp-data";
import type { Evento } from "@/lib/eventi";
import { Barra } from "@/components/motion/Barra";
@@ -53,7 +54,7 @@ export function EventoCard({
if (isCompleanno) {
return (
-
+
@@ -63,21 +64,21 @@ export function EventoCard({
{evento.data.slice(8, 10)}
-
+
{formatData(evento.data).split(" ")[2]?.slice(0, 3)}
-
+
);
}
return (
-
+
@@ -87,7 +88,7 @@ export function EventoCard({
{evento.data.slice(8, 10)}
-
+
{formatData(evento.data).split(" ")[2]?.slice(0, 3)}
@@ -98,7 +99,7 @@ export function EventoCard({
{linkTo.label}
@@ -121,7 +122,7 @@ export function EventoCard({
{io ? (
-
+
{stati.map((s) => {
const meta = statoMeta[s];
const attivo = stato === s;
@@ -137,8 +138,11 @@ export function EventoCard({
stato: attivo ? null : s,
})
}
+ aria-pressed={attivo}
className={cn(
- "rounded-full border border-border px-2.5 py-1.5 text-[11px] font-semibold transition-all active:scale-95",
+ // min-h-11: sono i controlli più toccati dell'app, sotto i
+ // 44px si sbaglia bersaglio.
+ "min-h-11 rounded-full border border-border px-3 text-xs font-semibold transition-all active:scale-95",
attivo
? cn(meta.className, "border-transparent shadow-card")
: "bg-background text-muted-foreground",
@@ -150,6 +154,6 @@ export function EventoCard({
})}
) : null}
-
+
);
}
diff --git a/src/components/crapp/Pagelle.tsx b/src/components/crapp/Pagelle.tsx
index cb23062..f36c266 100644
--- a/src/components/crapp/Pagelle.tsx
+++ b/src/components/crapp/Pagelle.tsx
@@ -2,6 +2,7 @@ import { useState } from "react";
import { ClipboardCheck, Lock } from "lucide-react";
import { toast } from "sonner";
import { cn } from "@/lib/utils";
+import { Card } from "@/components/crapp/ui-bits";
import { Avatar } from "@/components/crapp/Avatar";
import type { Giocatore } from "@/lib/crapp-data";
import { useGiocatoreCorrente } from "@/lib/user-store";
@@ -41,21 +42,23 @@ export function Pagelle({
}
return (
-
+
-
+
Pagelle anonime
-
+
{chiuse ? "Votazioni chiuse" : `${fatti}/${daVotare.length} votati`}
-
+
Dai un voto da 1 a 10 ai compagni: nessuno vedrà chi ha votato cosa, solo la media.
{isPending ? (
- Carico le pagelle…
+
+ Carico le pagelle…
+
) : (
{convocati.map((g) => {
@@ -69,12 +72,12 @@ export function Pagelle({
{g.nome}
-
+
{media ? `Media ${media.media} · ${media.voti} voti` : "Nessun voto"}
{sonoIo ? (
-
+
Sei tu
) : chiuse ? (
@@ -85,7 +88,7 @@ export function Pagelle({
disabled={!io || vota.isPending}
onClick={() => setApertoPer(aperto ? null : g.id)}
className={cn(
- "shrink-0 rounded-full px-3 py-1 text-[10px] font-bold uppercase transition-colors disabled:opacity-50",
+ "shrink-0 rounded-full px-3 py-1 text-xs font-bold uppercase transition-colors disabled:opacity-50",
mio !== undefined
? "bg-accent text-accent-foreground"
: "bg-card text-foreground",
@@ -103,7 +106,7 @@ export function Pagelle({
type="button"
onClick={() => invia(g.id, v)}
className={cn(
- "rounded-lg py-1.5 text-[11px] font-bold tabular-nums transition-transform active:scale-90",
+ "rounded-lg py-1.5 text-xs font-bold tabular-nums transition-transform active:scale-90",
mio === v
? "bg-accent text-accent-foreground"
: "bg-card text-foreground",
@@ -119,6 +122,6 @@ export function Pagelle({
})}
)}
-
+
);
}
diff --git a/src/components/crapp/ProfiloAmministrativo.tsx b/src/components/crapp/ProfiloAmministrativo.tsx
index f4f97c0..3ef62a7 100644
--- a/src/components/crapp/ProfiloAmministrativo.tsx
+++ b/src/components/crapp/ProfiloAmministrativo.tsx
@@ -27,7 +27,7 @@ const classiInput = "w-full rounded-xl border border-border bg-background px-3 p
function Campo({ label, children }: { label: string; children: React.ReactNode }) {
return (