2 Commits

Author SHA1 Message Date
davide bd90a2efe4 chore(deps): risolve vulnerabilità npm audit e aggiorna a Node 24 LTS
Aggiorna vitest/@vitest/ui alla 4.1.10 (azzera le 14 vulnerabilità
segnalate da npm audit, incluse 2 critiche). Node 20 era ormai a fine
supporto: Dockerfile, .nvmrc ed engines in package.json passano a
Node 24 LTS; il README documenta i requisiti in una sezione dedicata
in cima al file, senza duplicarli altrove.
2026-07-15 10:58:52 +02:00
davide 93372a1299 fix(referto): rimuove il riepilogo set vinti ridondante
Il blocco "3 – 0 / SET VINTI" accanto alla tabella "Risultato finale"
duplicava l'informazione già mostrata in "Vince <squadra> 3 – 0".
2026-07-15 10:36:26 +02:00
6 changed files with 450 additions and 404 deletions
+1
View File
@@ -0,0 +1 @@
24
+2 -2
View File
@@ -1,5 +1,5 @@
# Stage 1: dipendenze condivise (build + dev) # Stage 1: dipendenze condivise (build + dev)
FROM node:20-alpine AS deps FROM node:24-alpine AS deps
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm ci RUN npm ci
@@ -16,7 +16,7 @@ COPY . .
RUN npm run build RUN npm run build
# Stage 4: runtime di produzione # Stage 4: runtime di produzione
FROM node:20-alpine AS runtime FROM node:24-alpine AS runtime
WORKDIR /app WORKDIR /app
ENV NODE_ENV=production PORT=3000 ENV NODE_ENV=production PORT=3000
+16 -10
View File
@@ -1,7 +1,7 @@
# Segnapunti # Segnapunti
![Version](https://img.shields.io/badge/versione-2.1.0-blue) ![Version](https://img.shields.io/badge/versione-2.1.0-blue)
![Node](https://img.shields.io/badge/node-%3E%3D18-green) ![Node](https://img.shields.io/badge/node-%3E%3D24-green)
![Docker](https://img.shields.io/badge/docker-ready-2496ED?logo=docker&logoColor=white) ![Docker](https://img.shields.io/badge/docker-ready-2496ED?logo=docker&logoColor=white)
![License](https://img.shields.io/badge/licenza-privata-lightgrey) ![License](https://img.shields.io/badge/licenza-privata-lightgrey)
@@ -9,8 +9,21 @@ Segnapunti digitale in tempo reale per partite di pallavolo. Un server centrale
--- ---
## Requisiti
| Strumento | Versione minima | Uso |
|---|---|---|
| Node.js | >= 24 | Sviluppo locale (`npm run dev`) |
| npm | >= 11 | Sviluppo locale |
| Docker + Docker Compose | — | Deploy in produzione; alternativa containerizzata allo sviluppo locale |
Versione Node pinnata in `.nvmrc` e in `engines` di `package.json`. Con [nvm](https://github.com/nvm-sh/nvm): `nvm use`.
---
## Indice ## Indice
- [Requisiti](#requisiti)
- [Architettura](#architettura) - [Architettura](#architettura)
- [Guida utente](#guida-utente) - [Guida utente](#guida-utente)
- [Funzionalità](#funzionalità) - [Funzionalità](#funzionalità)
@@ -18,6 +31,7 @@ Segnapunti digitale in tempo reale per partite di pallavolo. Un server centrale
- [Sviluppo](#sviluppo) - [Sviluppo](#sviluppo)
- [Sviluppo con Docker](#sviluppo-con-docker) - [Sviluppo con Docker](#sviluppo-con-docker)
- [Test](#test) - [Test](#test)
- [Changelog](#changelog)
--- ---
@@ -166,7 +180,6 @@ La **partita** è vinta da chi raggiunge 3 set su 5 (modalità `3/5`) o 2 set su
--- ---
## Deploy con Docker ## Deploy con Docker
### Prima installazione ### Prima installazione
@@ -209,13 +222,6 @@ docker run --rm -p 3000:3000 -v ./.segnapunti:/app/.segnapunti segnapunti:local
## Sviluppo ## Sviluppo
### Requisiti
| Strumento | Versione minima |
|---|---|
| Node.js | >= 18 |
| npm | >= 9 |
### Avvio ### Avvio
```bash ```bash
@@ -253,7 +259,7 @@ docker compose -f docker-compose.dev.yml up --build
| `http://localhost:5173/display` | Display | | `http://localhost:5173/display` | Display |
| `http://localhost:5173/controller` | Controller | | `http://localhost:5173/controller` | Controller |
Le modifiche ai file sorgente sull'host si riflettono subito nel container (bind-mount); `node_modules` resta invece un volume anonimo del container, per non farsi sovrascrivere dal bind-mount e per evitare incompatibilità tra i binari nativi installati sull'host e quelli richiesti dal container (es. host ARM / container `node:20-alpine` su x86). Le modifiche ai file sorgente sull'host si riflettono subito nel container (bind-mount); `node_modules` resta invece un volume anonimo del container, per non farsi sovrascrivere dal bind-mount e per evitare incompatibilità tra i binari nativi installati sull'host e quelli richiesti dal container (es. host ARM / container `node:24-alpine` su x86).
Per fermare e rimuovere il container: Per fermare e rimuovere il container:
+426 -382
View File
File diff suppressed because it is too large Load Diff
+5 -2
View File
@@ -3,6 +3,9 @@
"private": true, "private": true,
"version": "2.1.0", "version": "2.1.0",
"type": "module", "type": "module",
"engines": {
"node": ">=24.0.0"
},
"scripts": { "scripts": {
"dev": "vite --host", "dev": "vite --host",
"build": "vite build", "build": "vite build",
@@ -30,12 +33,12 @@
"@playwright/test": "^1.58.2", "@playwright/test": "^1.58.2",
"@types/node": "^25.2.3", "@types/node": "^25.2.3",
"@vitejs/plugin-vue": "^6.0.5", "@vitejs/plugin-vue": "^6.0.5",
"@vitest/ui": "^4.0.18", "@vitest/ui": "^4.1.10",
"@vue/test-utils": "^2.4.6", "@vue/test-utils": "^2.4.6",
"happy-dom": "^20.6.1", "happy-dom": "^20.6.1",
"jsdom": "^28.0.0", "jsdom": "^28.0.0",
"vite": "^7.3.1", "vite": "^7.3.1",
"vite-plugin-pwa": "^1.2.0", "vite-plugin-pwa": "^1.2.0",
"vitest": "^4.0.18" "vitest": "^4.1.10"
} }
} }
-8
View File
@@ -139,10 +139,6 @@ export function buildRefertoHtml(state, now = new Date()) {
.nome-sq { font-size: 18px; font-weight: bold; } .nome-sq { font-size: 18px; font-weight: bold; }
.vs { font-size: 12px; color: #666; font-weight: bold; } .vs { font-size: 12px; color: #666; font-weight: bold; }
.risultato-riepilogo { display: flex; align-items: center; gap: 10px; }
.risultato { font-size: 30px; font-weight: bold; letter-spacing: 3px; }
.modalita-label { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: 0.5px; }
.set-section { display: flex; margin-bottom: 10px; border: 2px solid #111; } .set-section { display: flex; margin-bottom: 10px; border: 2px solid #111; }
.set-barra { flex: 0 0 26px; background: var(--teal); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-right: 2px solid #111; } .set-barra { flex: 0 0 26px; background: var(--teal); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-right: 2px solid #111; }
.set-barra span:first-child { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: bold; font-size: 11px; letter-spacing: 2px; } .set-barra span:first-child { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: bold; font-size: 11px; letter-spacing: 2px; }
@@ -209,10 +205,6 @@ export function buildRefertoHtml(state, now = new Date()) {
</table> </table>
<div class="finale-vince">Vince ${setVinti.home >= setVinti.guest ? nomi.home : nomi.guest} &nbsp;${setVinti.home} ${setVinti.guest}</div> <div class="finale-vince">Vince ${setVinti.home >= setVinti.guest ? nomi.home : nomi.guest} &nbsp;${setVinti.home} ${setVinti.guest}</div>
</div> </div>
<div class="risultato-riepilogo">
<div class="risultato">${setVinti.home} ${setVinti.guest}</div>
<div class="modalita-label">set vinti</div>
</div>
</div> </div>
</div> </div>
</body> </body>