diff --git a/app/components/Card.vue b/app/components/Card.vue index b44d518..b3708db 100644 --- a/app/components/Card.vue +++ b/app/components/Card.vue @@ -7,7 +7,8 @@
-
+ +
@@ -17,31 +18,34 @@
-
+
{{ props.track.order }}
+ +
Pochette de l'album
+ -
-
+ +
+
{{ props.track.order }}

{{ props.track.title }}

-

- +

+ {{ props.track.artist.name }}

+ {{ props.track.url.split('/')[4]?.split('__')[0] }}
diff --git a/app/components/deck/DeckPlaylist.vue b/app/components/deck/DeckPlaylist.vue index 06863dc..fcf5a19 100644 --- a/app/components/deck/DeckPlaylist.vue +++ b/app/components/deck/DeckPlaylist.vue @@ -5,6 +5,10 @@ aria-label="close the box"> close + diff --git a/app/store/card.ts b/app/store/card.ts index f45a4b9..59b49ba 100644 --- a/app/store/card.ts +++ b/app/store/card.ts @@ -1,5 +1,5 @@ import { defineStore } from 'pinia' - +import type { Track } from '~~/types/types' interface CardPosition { x: number y: number @@ -42,6 +42,14 @@ export const useCardStore = defineStore('card', { return this.cardPositions[boxId]?.[trackId] }, + // Basculer l'état de révélation de toutes les cartes + revealAllCards(tracks: Track[]) { + tracks.forEach((track) => { + this.revealCard(track.id) + }) + this.saveToLocalStorage() + }, + // Sauvegarder l'état dans le localStorage saveToLocalStorage() { if (typeof window !== 'undefined') {