From c86232cf6a56f4b48e6012b930c24c994a8519eb Mon Sep 17 00:00:00 2001 From: legonzaur Date: Mon, 13 May 2024 15:41:43 +0200 Subject: [PATCH] Change CardPreview component to use only card ID --- components/CardPreview.vue | 12 +- components/CardsGrouped.vue | 2 +- components/LoginView.vue | 8 +- components/MarketCards.vue | 11 +- components/PlayerListElement.vue | 2 +- components/PlayerSlot.vue | 6 +- components/RulesDisplay.vue | 446 +++++++++++++++++-------------- components/SelfView.vue | 10 +- 8 files changed, 266 insertions(+), 231 deletions(-) diff --git a/components/CardPreview.vue b/components/CardPreview.vue index e9067f1..2d1621f 100644 --- a/components/CardPreview.vue +++ b/components/CardPreview.vue @@ -3,7 +3,7 @@ import type { Card } from '~/netcode/Card'; export interface Props { - data: Card | null | undefined + card_id: number | undefined locked?: boolean wrapped?: boolean } @@ -18,7 +18,7 @@ const emit = defineEmits(["click"]) const childCount = ref(0) function cardClick() { - if (!props.data) return + if (!props.card_id) return emit("click") } @@ -30,7 +30,7 @@ const rotation = ref(0) watch( - () => props.data, + () => props.card_id, () => { rotation.value = Math.random() > .5 ? 2 : -2 }, @@ -43,10 +43,10 @@ watch(
- + - + diff --git a/components/CardsGrouped.vue b/components/CardsGrouped.vue index ae14fb3..c4eb3d3 100644 --- a/components/CardsGrouped.vue +++ b/components/CardsGrouped.vue @@ -15,7 +15,7 @@ const props = withDefaults(defineProps(), {
diff --git a/components/LoginView.vue b/components/LoginView.vue index b051141..541b3aa 100644 --- a/components/LoginView.vue +++ b/components/LoginView.vue @@ -17,12 +17,12 @@ async function discordLogin() {
Entrez dans le Royaume de Héron !
- +
- +
- +
Mode spectateur
@@ -90,7 +90,7 @@ async function discordLogin() { height: 120px; transition-duration: 0.4s; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); - box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19); + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); } footer { diff --git a/components/MarketCards.vue b/components/MarketCards.vue index 316e5c2..1f8d57e 100644 --- a/components/MarketCards.vue +++ b/components/MarketCards.vue @@ -9,10 +9,11 @@ const isTurn = computed(() => goStore.self && goStore.current_game?.started && (