Feat : allow buying cards
This commit is contained in:
@@ -7,11 +7,13 @@ export interface Props {
|
||||
playingTurn?: PlayingTurn;
|
||||
wrapped?: boolean;
|
||||
hidden?: boolean;
|
||||
noEffects?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
wrapped: () => false,
|
||||
hidden: () => false,
|
||||
noEffects: () => false,
|
||||
});
|
||||
|
||||
const emit = defineEmits(["cardClick"]);
|
||||
@@ -82,18 +84,17 @@ function endAnimation() {
|
||||
// animationCallbacks.value.push(done);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
onUnmounted(() => {
|
||||
// containerEvents.delete(props.container._id);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="cards_container" :class="{ wrapped, rotate:container.shuffling }">
|
||||
<TransitionGroup
|
||||
name="list"
|
||||
>
|
||||
<div
|
||||
class="cards_container"
|
||||
:class="{ wrapped, rotate: container.shuffling }"
|
||||
>
|
||||
<TransitionGroup name="list">
|
||||
<CardPreview
|
||||
@click="$emit('cardClick', c._id)"
|
||||
v-for="c in cards"
|
||||
@@ -104,6 +105,7 @@ onUnmounted(() => {
|
||||
:locked="
|
||||
!playingTurn || playingTurn?.cardsLocked.includes(c._id.toString())
|
||||
"
|
||||
:noEffects="noEffects"
|
||||
>
|
||||
</CardPreview>
|
||||
</TransitionGroup>
|
||||
@@ -126,7 +128,7 @@ onUnmounted(() => {
|
||||
|
||||
.list-leave-active {
|
||||
position: absolute;
|
||||
height:unset;
|
||||
height: unset;
|
||||
}
|
||||
|
||||
.rotate {
|
||||
|
||||
Reference in New Issue
Block a user