Files
evilspins/app/components/deck.vue
valere 3ad8cb8795
All checks were successful
Deploy App / build (push) Successful in 2m14s
Deploy App / deploy (push) Successful in 14s
eS v1
2025-10-16 00:42:38 +02:00

53 lines
1.2 KiB
Vue

<template>
<div>
<div class="z-50 tools fixed top-0 -left-0 hidden">
<button @click="setDisplay('pile')">pile</button>
<button @click="setDisplay('plateau')">plateau</button>
<button @click="setDisplay('holdem')">holdem</button>
</div>
<div ref="deck" class="deck flex flex-wrap justify-center gap-4">
<card v-for="(track, i) in tracks" :key="track.id" :track="track" tabindex="i" />
</div>
</div>
</template>
<script setup lang="ts">
import { computed, ref } from 'vue'
import { useDataStore } from '~/store/data'
import type { Box } from '~~/types/types'
const props = defineProps<{
box: Box
}>()
const dataStore = useDataStore()
const deck = ref()
const tracks = computed(() => dataStore.getTracksByboxId(props.box.id))
function setDisplay(displayMode) {
deck.value.classList.remove('pile', 'plateau', 'holdem')
deck.value.classList.add(displayMode)
}
</script>
<style lang="scss">
.deck {
@apply transition-all;
&.pile {
@apply relative;
.card {
@apply absolute top-0;
}
}
&.plateau {
@apply mt-8 p-8 w-full flex flex-wrap justify-around;
}
&.holdem {
/* style holdem */
}
}
</style>