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>
22 lines
1.6 KiB
JavaScript
22 lines
1.6 KiB
JavaScript
// «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];
|