feat: FRO-3 FRO-4 Added vue compontents to ingame and lobby #100

Merged
Janis merged 4 commits from feat/FRO-3 into main 2025-12-04 08:00:58 +01:00
5 changed files with 703 additions and 493 deletions
Showing only changes of commit ecb9d91991 - Show all commits

View File

@@ -59,8 +59,7 @@ const PlayerHandComponent = {
},
computed: {
isHandInactive() {
console.log("isHandInactive got executed" + !canPlayCard)
return !canPlayCard
//TODO: Needs implementation
}
},
template: `
@@ -122,6 +121,8 @@ const PlayerHandComponent = {
easing: 'ease-in-out',
fill: 'forwards'
};
const targetButton = this.$el.querySelector(`[data-card-id="${cardidx}"]`);
const cardElement = targetButton ? targetButton.closest('.handcard') : null;
const payload = {
cardindex: cardidx.toString(),
@@ -138,8 +139,14 @@ const PlayerHandComponent = {
}
).catch(
(err) => {
if (cardElement) {
cardElement.animate(wiggleKeyframes, wiggleTiming);
} else {
console.warn(`Could not find DOM element for card index ${cardidx} to wiggle.`);
}
this.isAwaitingResponse = false;
canPlayCard = true;
}
)
},