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:
1 parent
066addbc84
commit
7d988dde7b
24 files changed
+246
-13
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user