E4: schermate dei video fermi e ritocchi di stile

Sette schermate nuove (27-31) dalla dimostrazione, sette rifatte perché la
Libreria ha «Video fermi» e il visualizzatore «È un video fermo?», e il
confronto con i mockup in differenze.md (§10.7).

Corretti i difetti visti guardando le pagine: lo spazio sotto l'anteprima di
«Salva il fotogramma», le azioni del visualizzatore e gli strumenti della
Libreria al telefono, i menu dei filtri a capo non allineati, le righe di
«Ultimi lavori» fuori dal riquadro al telefono.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-12-01 16:43:33 +01:00
1 parent 066addbc84
commit 7d988dde7b
24 files changed
+246 -13

No files matched your search

+10
View File
@@ -70,6 +70,16 @@ internal static class Shots
new("/libreria?tema=chiaro", "24-visualizzatore-fotogramma.png", Step: "visualizzatore-fotogramma.js"),
new("/libreria?tema=chiaro", "25-copia-in-formati.png", 1440, 1000, Step: "copia-in-formati.js"),
new("/impostazioni/esportazione?tema=chiaro", "26-conversione-libreria.png", Step: "conversione-libreria.js"),
// Part 5: video fermi (tappa E4, spec §4.10 and §10.3, composed from mockups 02, 13, 01 and 06). The last one starts
// «Cerca i video fermi» (an analysis, nothing is copied or written): it comes after every screenshot above.
new("/libreria?tipo=fermi&tema=chiaro", "27-visualizzatore-video-fermo.png", Step: "visualizzatore-video-fermo.js"),
new("/libreria?tema=chiaro", "27-visualizzatore-da-analizzare.png", Step: "visualizzatore-da-analizzare.js"),
new("/libreria?tema=chiaro", "27-visualizzatore-non-analizzabile.png", Step: "visualizzatore-non-analizzabile.js"),
new("/libreria?tipo=fermi&tema=chiaro", "28-salva-fotogramma.png", 1440, 1000, Step: "salva-fotogramma.js"),
new("/libreria?tipo=fermi&tema=chiaro", "29-libreria-video-fermi.png"),
new("/libreria?account=2&tema=chiaro", "30-video-fermi-selezione.png", 1440, 1000, Step: "video-fermi-selezione.js"),
new("/libreria?tema=chiaro", "31-dashboard-video-fermi.png", Step: "dashboard-video-fermi.js"),
];
/// <summary>
@@ -0,0 +1,18 @@
// «Cerca i video fermi» at work in Dashboard → Esportazione (spec §4.10, §10.3, tappa E4; composed from mockup 06 and the
// second step of the import, mockup 09): the search of every video of the library, started from another page (as the
// selection does), then the Dashboard as it is after the first videos. From then on the page reads no more of the
// progress, so the picture does not change while it is taken; the search itself goes on and ends in a few seconds. The
// only step that starts something: its screenshot comes last.
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const until = async (test, tries = 1000) => { for (let i = 0; i < tries && !test(); i++) await sleep(25); return test(); };
await until(() => document.querySelector('.mosaico .tess[data-id]'));
const plain = window.fetch;
await plain('/api/still-videos/start', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ query: 'kind=videos' }) });
const { navigate } = await import('/js/core/shell.js');
await navigate('/dashboard/esportazione');
const bar = () => document.querySelector('.avanzamento-fermi');
await until(() => Number(bar()?.querySelector('[role=progressbar]')?.getAttribute('aria-valuenow')) > 0);
window.fetch = (url, options) => (String(url?.url || url).includes('/api/still-videos/progress') ? new Promise(() => {}) : plain(url, options));
await sleep(300);
document.activeElement?.blur();
return bar()?.querySelector('.conteggio')?.textContent;
@@ -0,0 +1,21 @@
// «Salva il fotogramma» of the still video of @marta.demo (spec §4.10, tappa E4; the dialog «Fotogrammi» of 22 without
// its three ways, over mockup 02): the preview of the sharpest frame, the format, «Il fotogramma non ha l'audio» and
// «Nella cartella delle copie» with the row of the folder. Nothing is downloaded or copied.
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const until = async (test, tries = 100) => { for (let i = 0; i < tries && !test(); i++) await sleep(100); return test(); };
const json = (path) => fetch(path, { headers: { Accept: 'application/json' } }).then((r) => r.json());
const marta = (await json('/api/accounts')).accounts.find((a) => a.username === 'marta.demo');
const still = (await json(`/api/library?kind=stillvideos&accounts=${marta.id}&limit=1`)).tiles[0];
const tile = () => document.querySelector(`.mosaico .tess[data-entry="${still.id}"]`);
await until(tile);
tile().click();
await until(() => document.querySelector('.vis .azione-salva-fotogramma') && document.querySelector('.vis video')?.readyState >= 1);
document.querySelector('.vis .azione-salva-fotogramma').click();
const dialog = () => document.querySelector('.dialogo.fotogrammi');
await until(() => dialog()?.querySelector('.anteprima-fotogramma img')?.naturalWidth > 0);
dialog().querySelector('input[value=cartella]').click();
await until(() => dialog().querySelector('.riepilogo-fotogrammi .destinazioni-copia'));
await sleep(500);
document.activeElement?.blur();
return [dialog().querySelector('.istante-mostrato')?.textContent, dialog().querySelector('.riepilogo-fotogrammi')?.textContent];
@@ -0,0 +1,23 @@
// «Cerca i video fermi» from the selection bar of the Libreria (spec §4.10, tappa E4; composed from the dialogs of
// mockup 13): @marta.demo, «Seleziona», five tiles of videos (some already analysed) and four of photos, then the
// confirmation with its counts. Nothing starts.
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const until = async (test, tries = 100) => { for (let i = 0; i < tries && !test(); i++) await sleep(100); return test(); };
const tiles = () => [...document.querySelectorAll('.mosaico .tess[data-id]')];
const isVideo = (tile) => Boolean(tile.querySelector('use[href="#i-play"]'));
await until(() => tiles().filter(isVideo).length >= 5 && tiles().length >= 9);
[...document.querySelectorAll('.strumenti .btn')].find((b) => b.textContent.includes('Seleziona')).click();
await sleep(300);
const chosen = [...tiles().filter(isVideo).slice(0, 5), ...tiles().filter((x) => !isVideo(x)).slice(0, 4)];
for (const tile of chosen) {
tile.click();
await sleep(60);
}
const search = () => document.querySelector('.salva .fermi-selezione');
await until(() => search() && !search().disabled);
search().click();
const dialog = () => document.querySelector('.dialogo.cerca-fermi');
await until(() => dialog()?.querySelector('.riepilogo-copia'));
await sleep(500);
document.activeElement?.blur();
return dialog().querySelector('.riepilogo-fermi').textContent;
@@ -0,0 +1,29 @@
// The viewer of a video of @marta.demo never analysed (spec §4.10, tappa E4; composed from mockup 02): «È un video
// fermo?» among the actions, no row «Video fermo». Nothing is analysed.
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const until = async (test, tries = 100) => { for (let i = 0; i < tries && !test(); i++) await sleep(100); return test(); };
const json = (path) => fetch(path, { headers: { Accept: 'application/json' } }).then((r) => r.json());
const marta = (await json('/api/accounts')).accounts.find((a) => a.username === 'marta.demo');
const tiles = (await json(`/api/library?accounts=${marta.id}&kind=videos&limit=100`)).tiles;
let found = null;
for (const x of tiles) {
const entry = await json(`/api/entries/${x.id}`);
if (entry.media.length === 1 && entry.media[0].available && !entry.media[0].still && entry.media[0].framesAvailable) {
found = entry;
break;
}
}
const { navigate } = await import('/js/core/shell.js');
await navigate(`/libreria?account=${marta.id}&dal=${found.publishedDay}&al=${found.publishedDay}`);
const tile = () => document.querySelector(`.mosaico .tess[data-entry="${found.id}"]`);
await until(tile);
tile().click();
await until(() => document.querySelector('.vis .azione-video-fermo') && document.querySelector('.vis video')?.readyState >= 2);
const video = document.querySelector('.vis video');
video.pause();
video.currentTime = 1;
await until(() => !video.seeking, 50);
await sleep(600);
document.activeElement?.blur();
return document.querySelector('.vis .azione-video-fermo')?.textContent;
@@ -0,0 +1,29 @@
// The viewer of the video of @marta.demo whose analysis took too long (spec §4.10, tappa E4; composed from mockup 02):
// the row «Non analizzabile: l'analisi richiedeva troppo tempo» with «Analizza di nuovo». Nothing is analysed.
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const until = async (test, tries = 100) => { for (let i = 0; i < tries && !test(); i++) await sleep(100); return test(); };
const json = (path) => fetch(path, { headers: { Accept: 'application/json' } }).then((r) => r.json());
const marta = (await json('/api/accounts')).accounts.find((a) => a.username === 'marta.demo');
const tiles = (await json(`/api/library?accounts=${marta.id}&kind=videos&limit=100`)).tiles;
let found = null;
for (const x of tiles) {
const entry = await json(`/api/entries/${x.id}`);
if (entry.media[0].still?.outcome === 'notAnalyzable') {
found = entry;
break;
}
}
const { navigate } = await import('/js/core/shell.js');
await navigate(`/libreria?account=${marta.id}&dal=${found.publishedDay}&al=${found.publishedDay}`);
const tile = () => document.querySelector(`.mosaico .tess[data-entry="${found.id}"]`);
await until(tile);
tile().click();
await until(() => document.querySelector('.vis .analizza-di-nuovo') && document.querySelector('.vis video')?.readyState >= 2);
const video = document.querySelector('.vis video');
video.pause();
video.currentTime = 1;
await until(() => !video.seeking, 50);
await sleep(600);
document.activeElement?.blur();
return document.querySelector('.vis .riga-fermo')?.textContent;
@@ -0,0 +1,20 @@
// The viewer of the still video of @marta.demo (spec §4.6, §4.10, tappa E4; composed from mockup 02): the chip «Video
// fermo», the row «Un'immagine sola per tutto il video: basta un fotogramma · fotogramma a …» and «Salva il fotogramma»
// among the actions. The player is stopped past the fade from black.
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const until = async (test, tries = 100) => { for (let i = 0; i < tries && !test(); i++) await sleep(100); return test(); };
const json = (path) => fetch(path, { headers: { Accept: 'application/json' } }).then((r) => r.json());
const marta = (await json('/api/accounts')).accounts.find((a) => a.username === 'marta.demo');
const still = (await json(`/api/library?kind=stillvideos&accounts=${marta.id}&limit=1`)).tiles[0];
const tile = () => document.querySelector(`.mosaico .tess[data-entry="${still.id}"]`);
await until(tile);
tile().click();
await until(() => document.querySelector('.vis .azione-salva-fotogramma') && document.querySelector('.vis video')?.readyState >= 2);
const video = document.querySelector('.vis video');
video.pause();
video.currentTime = 1;
await until(() => !video.seeking, 50);
await sleep(600);
document.activeElement?.blur();
return [document.querySelector('.vis .etichette')?.textContent, document.querySelector('.vis .riga-fermo')?.textContent];