72 lines
1.4 KiB
TypeScript
72 lines
1.4 KiB
TypeScript
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'
|
|
},
|
|
B: {
|
|
name: '... B',
|
|
description: '...',
|
|
duration: 3773,
|
|
color1: '#f7dd01',
|
|
color2: '#010103'
|
|
}
|
|
},
|
|
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'
|
|
},
|
|
B: {
|
|
name: 'manifeste B',
|
|
description: 'Even Zero has a b-side',
|
|
duration: 2470,
|
|
color1: '#0d01b9',
|
|
color2: '#3b7589'
|
|
}
|
|
},
|
|
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
|
|
}))
|
|
})
|