From ba34ecece0c882f246d4193194a3f0a98f8a3830 Mon Sep 17 00:00:00 2001 From: valere Date: Wed, 26 Nov 2025 16:19:21 +0100 Subject: [PATCH] playlist is a yellow box --- server/api/boxes.ts | 123 +++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 63 deletions(-) diff --git a/server/api/boxes.ts b/server/api/boxes.ts index 390a7b9..6a47eae 100644 --- a/server/api/boxes.ts +++ b/server/api/boxes.ts @@ -1,71 +1,68 @@ import { eventHandler } from 'h3' import type { Box } from '~~/types/types' -const boxes: Box[] = [ - { - id: 'ES01', - type: 'compilation', - name: '...', - description: '...', - state: 'box-hidden', - duration: 3487 + 3773, // Somme des durées A et B - sides: { - A: { - name: '...', - description: '...', - duration: 3487, - color1: '#c7b3aa', - color2: '#000100' +export default eventHandler(() => { + return [ + { + id: 'ES01', + type: 'compilation', + name: '...', + description: '...', + state: 'box-hidden', + duration: 3487 + 3773, // Somme des durées A et B + sides: { + A: { + name: '...', + description: '...', + duration: 3487, + color1: '#c7b3aa', + color2: '#000100' + }, + B: { + name: '... B', + description: '...', + duration: 3773, + color1: '#f7dd01', + color2: '#010103' + } }, - B: { - name: '... B', - description: '...', - duration: 3773, - color1: '#f7dd01', - color2: '#010103' - } + activeSide: 'A' }, - activeSide: 'A' - }, - { - id: 'ES00', - type: 'compilation', - name: 'manifeste', - description: 'Zero is for manifesto', - state: 'box-hidden', - duration: 2794 + 2470, // Somme des durées A et B - sides: { - A: { - name: 'manifeste', - description: 'Zero is for manifesto', - duration: 2794, - color1: '#ffffff', - color2: '#48959d' + { + id: 'ES00', + type: 'compilation', + name: 'manifeste', + description: 'Zero is for manifesto', + state: 'box-hidden', + duration: 2794 + 2470, // Somme des durées A et B + sides: { + A: { + name: 'manifeste', + description: 'Zero is for manifesto', + duration: 2794, + color1: '#ffffff', + color2: '#48959d' + }, + B: { + name: 'manifeste B', + description: 'Even Zero has a b-side', + duration: 2470, + color1: '#0d01b9', + color2: '#3b7589' + } }, - B: { - name: 'manifeste B', - description: 'Even Zero has a b-side', - duration: 2470, - color1: '#0d01b9', - color2: '#3b7589' - } + activeSide: 'A' }, - activeSide: 'A' - }, - { - id: 'ESPLAYLIST', - type: 'playlist', - name: 'playlists', - duration: 0, - description: '♠♦♣♥', - state: 'box-hidden', - activeSide: 'A' - } -] - -export default eventHandler(() => { - return boxes.map((box) => ({ - ...box, - state: 'box-hidden' as const - })) + { + id: 'ESPLAYLIST', + type: 'playlist', + name: 'playlists', + duration: 0, + description: '♠♦♣♥', + state: 'box-hidden', + activeSide: 'A', + color1: '#fdec50ff', + color2: '#fdec50ff' + } + ] })