fix: revisione legale e dei fatti prima del rilascio
- privacy: sezione sulle mappe di Google (consenso, contitolarità C-40/17, Data Privacy Framework), PEC personale della Dott.ssa Giulia Grasso, trasferimenti condizionati a fornitori.soloSee, art. 13, frasi sul consenso e sul modulo solo quando servono, grammatica dei destinatari - mappe: avviso sulla scelta valida per tutto il sito e pulsante «Non caricare più le mappe» con test di revoca - modulo: checkbox di presa visione, informativa breve dai dati dello Studio, nota diversa per php/endpoint, fornitori.modulo obbligatorio in modalità endpoint, messaggi da testi.ts - contact.php: HMAC dell'IP con segreto casuale, cartella privata 0700/0600 fuori dalla webroot, cancellazione dopo un'ora - note legali e accessibilità: D.Lgs. 139/2005 e Codice deontologico, clausola di responsabilità, usi di JavaScript completi - testi senza promesse di tempi; TODO B2/B3/B4/B5/C12, DECISIONS D-036–D-039 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016zJ9ZWGKvoKoxYwbmnRKdJ
This commit is contained in:
23 files changed
+474
-164
No files matched your search
@@ -1,7 +1,8 @@
|
||||
/**
|
||||
* Mappe Google caricate solo dopo il consenso esplicito (clic su «Carica la mappa»).
|
||||
* Nessun cookie: la scelta è ricordata in sessionStorage (dato tecnico, nessun dato personale)
|
||||
* e vale fino alla chiusura della scheda.
|
||||
* e vale fino alla chiusura della scheda o alla revoca con «Non caricare più le mappe», che
|
||||
* rimuove le mappe della pagina e ripristina i riquadri.
|
||||
*/
|
||||
|
||||
const STORAGE_KEY = 'mappa-consentita';
|
||||
@@ -14,6 +15,14 @@ function rememberConsent(): void {
|
||||
}
|
||||
}
|
||||
|
||||
function forgetConsent(): void {
|
||||
try {
|
||||
sessionStorage.removeItem(STORAGE_KEY);
|
||||
} catch {
|
||||
// sessionStorage non disponibile: la scelta non era stata memorizzata.
|
||||
}
|
||||
}
|
||||
|
||||
function hasConsent(): boolean {
|
||||
try {
|
||||
return sessionStorage.getItem(STORAGE_KEY) === '1';
|
||||
@@ -39,10 +48,24 @@ function loadMap(block: HTMLElement, moveFocus: boolean): void {
|
||||
frame.append(iframe);
|
||||
frame.hidden = false;
|
||||
placeholder.hidden = true;
|
||||
const revoke = block.querySelector<HTMLButtonElement>('[data-map-revoke]');
|
||||
if (revoke) revoke.hidden = false;
|
||||
block.dataset.mapLoaded = 'true';
|
||||
if (moveFocus) iframe.focus();
|
||||
}
|
||||
|
||||
function unloadMap(block: HTMLElement): void {
|
||||
if (block.dataset.mapLoaded !== 'true') return;
|
||||
const frame = block.querySelector<HTMLElement>('[data-map-frame]');
|
||||
const placeholder = block.querySelector<HTMLElement>('[data-map-placeholder]');
|
||||
const revoke = block.querySelector<HTMLButtonElement>('[data-map-revoke]');
|
||||
frame?.replaceChildren();
|
||||
if (frame) frame.hidden = true;
|
||||
if (placeholder) placeholder.hidden = false;
|
||||
if (revoke) revoke.hidden = true;
|
||||
delete block.dataset.mapLoaded;
|
||||
}
|
||||
|
||||
function init(): void {
|
||||
const blocks = Array.from(document.querySelectorAll<HTMLElement>('[data-map-consent]'));
|
||||
if (blocks.length === 0) return;
|
||||
@@ -53,6 +76,12 @@ function init(): void {
|
||||
rememberConsent();
|
||||
loadMap(block, true);
|
||||
});
|
||||
const revoke = block.querySelector<HTMLButtonElement>('[data-map-revoke]');
|
||||
revoke?.addEventListener('click', () => {
|
||||
forgetConsent();
|
||||
for (const b of blocks) unloadMap(b);
|
||||
button?.focus();
|
||||
});
|
||||
}
|
||||
|
||||
if (hasConsent()) for (const block of blocks) loadMap(block, false);
|
||||
|
||||
Reference in new issue
Block a user