feat(signage): gallery widget (pictures and videos one after another, from a list or a media folder); media folders on the Media page

Folders are only a grouping in the database (media_folders, media.folder_id, Alembic
0046): made, renamed, deleted (files stay) on the Media page, a file filed from its
details, uploads go into the folder shown, the picker filters by folder. The gallery
widget: its own pictures/videos in order or a folder as it is now, seconds each,
fade / slide / zoom, cover / contain. Plan 6R.16, F-114.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 14:41:17 +02:00
co-authored by Claude Opus 5.5
parent 189bd2777b
commit 1eb7e5e3a9
24 changed files with 549 additions and 51 deletions
+17
View File
@@ -179,6 +179,23 @@ try {
(await page.getByTestId('media-used-by').innerText().catch(() => '')).includes(p1.name) && await page.getByTestId('media-delete').isDisabled())
await page.keyboard.press('Escape')
// ── 6R.16: folders: one made on the page, a file filed from its details, the folder shows only it ──
await page.getByTestId('media-folder-new').click()
await page.getByTestId('media-folder-name').fill('Dishes')
await page.getByTestId('media-folder-save').click()
const made = await waitFor(async () => (await page.locator('[data-testid="media-folder"][data-name="Dishes"]').getAttribute('aria-pressed').catch(() => null)) === 'true' || null, 8000, 200)
r.check('6R.16: a folder made on the Media page (and opened: empty)', made === true && (await page.getByTestId('media-item').count()) === 0)
await page.getByTestId('media-folder-all').click()
await page.locator(`[data-testid="media-item"][data-id="${after1.image.id}"]`).click()
await page.getByTestId('media-folder-pick').click()
await page.getByRole('option', { name: 'Dishes' }).click()
await sleep(600)
await page.keyboard.press('Escape')
await page.locator('[data-testid="media-folder"][data-name="Dishes"]').click()
r.check('6R.16: a file filed in it from its details; the folder shows just that file',
await waitFor(async () => (await page.getByTestId('media-item').count()) === 1 || null, 8000, 200) === true
&& (await page.locator('[data-testid="media-folder"][data-name="Dishes"]').textContent()).includes('1'))
// ── 5.3: the customer display's looks pick their pictures from the library ──
await api('PUT', '/api/platform/modules/customer_display', { token: boss, body: { enabled: true } }).catch(() => {})
await page.goto(`${MANAGER}/settings`)