add debug mode
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user