Compare commits
3 Commits
0.25.0
...
86dcc6173c
| Author | SHA1 | Date | |
|---|---|---|---|
| 86dcc6173c | |||
| 240be41dc7 | |||
| 3dda2fefc2 |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -165,14 +165,3 @@
|
|||||||
### Features
|
### Features
|
||||||
|
|
||||||
* **ui:** Tie selection ([#26](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/26)) ([6c914b1](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/6c914b1421030897d47449087dd1694068e84436))
|
* **ui:** Tie selection ([#26](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/26)) ([6c914b1](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/6c914b1421030897d47449087dd1694068e84436))
|
||||||
## [0.0.0](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/compare/0.23.0...0.0.0) (2026-01-20)
|
|
||||||
## [0.0.0](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/compare/0.23.1...0.0.0) (2026-01-20)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* Update docker-entrypoint.sh and vite.config.ts for improved runtime handling and API navigation ([cd950e9](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/cd950e952117cebe0ec46a18fc5b2cf90b247766))
|
|
||||||
## [0.0.0](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/compare/0.24.0...0.0.0) (2026-01-22)
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **ui:** FRO-26: Tie Component ([#30](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/30)) ([9823af2](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/9823af2a1cee6cc4063f6f55a8ab64ec63525e84))
|
|
||||||
|
|||||||
@@ -15,5 +15,6 @@ else
|
|||||||
echo "No runtime template found at $TEMPLATE_PATH, skipping"
|
echo "No runtime template found at $TEMPLATE_PATH, skipping"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Start nginx in foreground
|
||||||
exec nginx -g 'daemon off;'
|
exec nginx -g 'daemon off;'
|
||||||
|
|
||||||
|
|||||||
@@ -4,78 +4,37 @@ import {useIngame} from "@/composables/useIngame.ts";
|
|||||||
import type {GameInfo, LobbyInfo, TieInfo, TrumpInfo} from "@/types/GameTypes.ts";
|
import type {GameInfo, LobbyInfo, TieInfo, TrumpInfo} from "@/types/GameTypes.ts";
|
||||||
import {useQuasar} from "quasar";
|
import {useQuasar} from "quasar";
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { computed, nextTick } from 'vue'
|
import { computed } from 'vue'
|
||||||
|
|
||||||
const wb = useWebSocket()
|
const wb = useWebSocket()
|
||||||
const wi = useIngame()
|
const wi = useIngame()
|
||||||
const tieInf = computed(() => wi.data as TieInfo)
|
const tieInf = computed(() => wi.data as TieInfo)
|
||||||
const tieBlankCard = "/images/cards/1B.png"
|
const tieBlankCard = [
|
||||||
|
"/images/cards/AS.png"
|
||||||
|
]
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
function getCardImagePath(cardPath: string) {
|
function getCardImagePath(cardPath: string) {
|
||||||
if (!cardPath) return ''
|
if (!cardPath) return ''
|
||||||
if (cardPath.includes('://') || cardPath.startsWith('/')) return cardPath
|
if (cardPath.includes('://') || cardPath.startsWith('/')) return cardPath
|
||||||
return `/${cardPath}`
|
return `/${cardPath}`
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPlayerName(playerId: string) {
|
|
||||||
return tieInf.value.tiedPlayers.find(p => p.id === playerId)?.name || 'Player';
|
|
||||||
}
|
|
||||||
const myRevealedCard = computed(() => {
|
|
||||||
const myId = tieInf.value.self?.id;
|
|
||||||
|
|
||||||
if (!myId || !tieInf.value.selectedCards) return null;
|
|
||||||
|
|
||||||
const card = tieInf.value.selectedCards[myId];
|
|
||||||
|
|
||||||
return card ? getCardImagePath(card.path) : null;
|
|
||||||
});
|
|
||||||
|
|
||||||
const isFlipping = ref(false);
|
|
||||||
const showPickScreen = computed(() => {
|
|
||||||
const isMyTurn = tieInf.value.self?.id === tieInf.value.currentPlayer?.id;
|
|
||||||
return isFlipping.value || (isMyTurn && !showResultScreen.value);
|
|
||||||
});
|
|
||||||
|
|
||||||
const showResultScreen = computed(() => {
|
|
||||||
const allPicked = Object.keys(tieInf.value.selectedCards).length === tieInf.value.tiedPlayers.length;
|
|
||||||
return allPicked && !isFlipping.value;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
function selectTie(tieIndex: number) {
|
function selectTie(tieIndex: number) {
|
||||||
isFlipping.value = true;
|
wb.sendAndWait("PickTie", { cardIndex: tieIndex }).then(
|
||||||
nextTick(() => {
|
|
||||||
wb.sendAndWait("PickTie", { cardIndex: tieIndex })
|
|
||||||
.then(() => {
|
|
||||||
console.log("Server accepted pick, starting animation...");
|
|
||||||
console.log("CARD SELECTED: " + Object.keys(tieInf.value.selectedCards).length)
|
|
||||||
|
|
||||||
|
|
||||||
$q.notify({
|
$q.notify({
|
||||||
message: "Card revealed!",
|
message: "You've successfully picked your tieCard",
|
||||||
color: "positive",
|
color: "positive",
|
||||||
position: "top",
|
position: "top"
|
||||||
timeout: 1000
|
|
||||||
});
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
isFlipping.value = false;
|
|
||||||
model.value = null;
|
|
||||||
}, 2500);
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
|
||||||
isFlipping.value = false;
|
).catch((error) => {
|
||||||
console.error("Pick failed:", error);
|
|
||||||
$q.notify({
|
$q.notify({
|
||||||
message: error.message || "Failed to pick card",
|
message: error.message,
|
||||||
color: "negative",
|
color: "negative",
|
||||||
position: "top"
|
position: "top"
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
const model = ref<number | null>(null)
|
const model = ref(1)
|
||||||
const options = computed(() => {
|
const options = computed(() => {
|
||||||
const list = []
|
const list = []
|
||||||
const max = tieInf.value.highestAmount?.valueOf() || 0
|
const max = tieInf.value.highestAmount?.valueOf() || 0
|
||||||
@@ -88,398 +47,52 @@ const options = computed(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<transition
|
<q-card v-if="tieInf.self?.name === tieInf.currentPlayer?.name" class="player-profile-card" flat bordered>
|
||||||
appear
|
<q-card-section class="bg-white text-dark text-center q-py-lg">
|
||||||
enter-active-class="animate__animated animate__fadeInDown"
|
<div class="text-h3 text-weight-bolder">
|
||||||
leave-active-class="animate__animated animate__fadeOutDown"
|
{{ tieInf.self?.name || "Loading Player..."}}
|
||||||
mode="out-in"
|
|
||||||
>
|
|
||||||
<q-card v-if="showPickScreen" class="game-container text-center overflow-hidden">
|
|
||||||
|
|
||||||
<div class="bg-glow"></div>
|
|
||||||
|
|
||||||
<q-card-section class="content-layer q-py-xl">
|
|
||||||
<div class="text-overline text-primary letter-spacing-2">Tie-Break Round</div>
|
|
||||||
<div class="text-h4 text-weight-bold text-white q-mb-xl text-uppercase tracking-widest">
|
|
||||||
{{ isFlipping ? 'Your Result' : (model ? `Selection: Card #${model}` : 'Pick Your Card') }}
|
|
||||||
</div>
|
</div>
|
||||||
|
</q-card-section>
|
||||||
<div class="card-fan-container q-mb-xl">
|
<q-card-section class="bg-dark text-dark text-center q-py-lg">
|
||||||
<div
|
<div class="q-pa-md" style="max-width: 500px">
|
||||||
v-for="n in options"
|
<div class="q-gutter-md">
|
||||||
:key="n"
|
<q-select
|
||||||
@click="!isFlipping && (model = n)"
|
v-model="model"
|
||||||
v-show="model === null || model === n"
|
:options="options"
|
||||||
class="tie-card-wrapper"
|
label="Select Amount"
|
||||||
:class="{ 'selected-card': model === n, 'is-flipping': isFlipping && model === n }"
|
filled
|
||||||
>
|
bg-color="white"
|
||||||
<div class="card-inner">
|
label-color="primary"
|
||||||
<q-img
|
color="primary"
|
||||||
:src="(model === n && myRevealedCard) ? myRevealedCard : getCardImagePath(tieBlankCard)"
|
popup-content-class="bg-white text-black"
|
||||||
class="card-image shadow-24"
|
|
||||||
:class="{ 'animate-reveal': isFlipping && model === n }"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div v-if="!isFlipping" class="card-number">
|
|
||||||
{{ n }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="action-area" :class="{ 'visible': model !== null && !isFlipping }">
|
|
||||||
<div class="row q-gutter-md justify-center items-center">
|
|
||||||
<q-btn flat color="grey-4" label="Cancel" @click="model = null" />
|
|
||||||
<q-btn
|
<q-btn
|
||||||
label="Confirm Selection"
|
|
||||||
color="positive"
|
color="positive"
|
||||||
unelevated
|
icon="sports_martial_arts"
|
||||||
@click="selectTie(model!)"
|
@click="selectTie(model)"
|
||||||
class="confirm-btn"
|
class="full-width"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!model && !isFlipping" class="text-grey-6 text-italic q-mt-md">
|
|
||||||
Hover and click to select a card from the deck
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
</q-card>
|
</q-card>
|
||||||
|
<q-card
|
||||||
<q-card v-else-if="!showResultScreen" class="game-container text-center overflow-hidden">
|
v-else
|
||||||
<q-card-section class="content-layer q-py-xl">
|
class="player-profile-card text-center"
|
||||||
<div class="text-overline text-primary letter-spacing-2">Tie-Break Round</div>
|
flat
|
||||||
|
bordered
|
||||||
<div class="column items-center">
|
style="min-height: 200px; display: flex; flex-direction: column; justify-content: center;"
|
||||||
|
|
||||||
<div class="revealed-row q-mb-lg">
|
|
||||||
<div
|
|
||||||
v-for="(card, playerId) in tieInf.selectedCards"
|
|
||||||
:key="playerId"
|
|
||||||
class="revealed-card-wrapper"
|
|
||||||
>
|
>
|
||||||
<div class="text-caption text-grey-5 q-mb-xs">{{ getPlayerName(playerId) }}</div>
|
<q-card-section class="q-pa-lg">
|
||||||
<q-img :src="getCardImagePath(card.path)" class="card-image shadow-24" />
|
<q-spinner-hourglass color="black" size="3em" class="q-mb-md" />
|
||||||
</div>
|
<div class="text-h5 text-grey-8">
|
||||||
</div>
|
Waiting for {{ tieInf.currentPlayer?.name || 'the other player' }} to select card for the tie...
|
||||||
|
|
||||||
<div class="card-fan-container skeleton-fan">
|
|
||||||
<q-skeleton
|
|
||||||
v-for="n in options"
|
|
||||||
:key="n"
|
|
||||||
type="rect"
|
|
||||||
class="skeleton-card"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="q-mt-xl">
|
|
||||||
<q-spinner-hourglass color="white" size="4em" />
|
|
||||||
<div class="text-subtitle1 text-grey-5 q-mt-sm italic">
|
|
||||||
Waiting for <span class="text-white">{{ tieInf.currentPlayer?.name }}</span> to pick a card...
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
|
|
||||||
</q-card>
|
|
||||||
<q-card v-else class="game-container tie-break-card text-center overflow-hidden">
|
|
||||||
<div class="absolute-full bg-gradient-dark opacity-80"></div>
|
|
||||||
|
|
||||||
<q-card-section class="content-layer q-py-xl">
|
|
||||||
<div class="column items-center q-mb-xl">
|
|
||||||
<q-icon
|
|
||||||
:name="(tieInf.winners?.length || 0) > 1 ? 'auto_renew' : 'workspace_premium'"
|
|
||||||
:color="(tieInf.winners?.length || 0) > 1 ? 'info' : 'warning'"
|
|
||||||
size="64px"
|
|
||||||
class="q-mb-sm"
|
|
||||||
/>
|
|
||||||
<div class="text-h3 text-weight-bolder text-white text-uppercase tracking-widest">
|
|
||||||
{{ (tieInf.winners?.length || 0) > 1 ? 'Another Tie!' : 'Tie Broken' }}
|
|
||||||
</div>
|
|
||||||
<p class="text-subtitle1 text-grey-4">
|
|
||||||
{{ (tieInf.winners?.length || 0) > 1 ? 'The high cards matched. Draw again!' : 'We have a winner.' }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row justify-center items-end q-gutter-lg">
|
|
||||||
<div
|
|
||||||
v-for="(card, playerId) in tieInf.selectedCards"
|
|
||||||
:key="playerId"
|
|
||||||
class="revealed-card-wrapper"
|
|
||||||
:class="{
|
|
||||||
'winner-glow': tieInf.winners?.map(player => player.id).includes(playerId),
|
|
||||||
'opacity-40': !tieInf.winners?.map(player => player.id).includes(playerId) && (tieInf.winners?.length || 0) > 0
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<div class="player-tag q-mb-md">
|
|
||||||
<div class="text-overline text-white">{{ getPlayerName(playerId) }}</div>
|
|
||||||
<q-badge
|
|
||||||
v-if="tieInf.winners?.map(player => player.id).includes(playerId)"
|
|
||||||
:color="tieInf.winners.length > 1 ? 'info' : 'positive'"
|
|
||||||
:label="tieInf.winners.length > 1 ? 'Still Tied' : 'Winner'"
|
|
||||||
rounded
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-stack">
|
|
||||||
<q-img
|
|
||||||
:src="getCardImagePath(card.path)"
|
|
||||||
class="card-image-reveal shadow-24"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="column items-center q-mt-lg">
|
|
||||||
<q-spinner-hourglass color="white" size="4em" />
|
|
||||||
<div class="text-subtitle1 text-white q-mt-sm italic">
|
|
||||||
Preparing trumpsuit selection...
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</transition>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.game-container {
|
|
||||||
max-width: 1400px;
|
|
||||||
width: 95vw;
|
|
||||||
margin: 0 auto;
|
|
||||||
background: #0f0f0f;
|
|
||||||
border: 1px solid rgba(255,255,255,0.1);
|
|
||||||
border-radius: 20px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-glow {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
width: 600px;
|
|
||||||
height: 400px;
|
|
||||||
background: radial-gradient(circle, rgba(25, 118, 210, 0.15) 0%, rgba(0,0,0,0) 70%);
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-fan-container {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding: 60px 20px;
|
|
||||||
min-height: 300px;
|
|
||||||
perspective: 1000px;
|
|
||||||
gap: 40px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tie-card-wrapper {
|
|
||||||
position: relative;
|
|
||||||
transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
||||||
margin-left: -35px;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tie-card-wrapper:first-child { margin-left: 0; }
|
|
||||||
|
|
||||||
.card-image {
|
|
||||||
width: 60px;
|
|
||||||
border-radius: 10px;
|
|
||||||
border: 1px solid rgba(255,255,255,0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tie-card-wrapper:hover {
|
|
||||||
transform: translateY(-40px) scale(1.1) rotate(2deg);
|
|
||||||
z-index: 50 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.selected-card {
|
|
||||||
margin-left: 0 !important;
|
|
||||||
transform: scale(1.4) !important;
|
|
||||||
z-index: 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
.selected-card .card-image {
|
|
||||||
border: 3px solid #1976d2;
|
|
||||||
box-shadow: 0 0 30px rgba(25, 118, 210, 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-number {
|
|
||||||
position: absolute;
|
|
||||||
bottom: -30px;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
font-weight: 900;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.confirm-btn {
|
|
||||||
padding: 12px 40px;
|
|
||||||
border-radius: 50px;
|
|
||||||
font-weight: bold;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.letter-spacing-2 { letter-spacing: 2px; }
|
|
||||||
|
|
||||||
|
|
||||||
/* Hide action area when no model is selected */
|
|
||||||
.action-area {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(20px);
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
|
||||||
.action-area.visible {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
.bg-glow.dimmed {
|
|
||||||
background: radial-gradient(circle, rgba(150, 150, 150, 0.05) 0%, rgba(0,0,0,0) 70%);
|
|
||||||
}
|
|
||||||
.tracking-widest {
|
|
||||||
letter-spacing: 0.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes pulse {
|
|
||||||
0%, 100% { transform: scale(1); opacity: 0.2; }
|
|
||||||
50% { transform: scale(1.05); opacity: 0.5; }
|
|
||||||
}
|
|
||||||
.skeleton-fan {
|
|
||||||
opacity: 0.15;
|
|
||||||
perspective: 1000px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skeleton-card {
|
|
||||||
width: 60px;
|
|
||||||
height: 90px;
|
|
||||||
background: rgba(255, 255, 255, 0.1) !important;
|
|
||||||
margin-left: -35px; /* Matches your tie-card-wrapper overlap */
|
|
||||||
border-radius: 10px;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
.skeleton-card:first-child {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
/* Container for the cards that have been "pulled" higher */
|
|
||||||
.revealed-row {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: flex-end;
|
|
||||||
gap: 20px;
|
|
||||||
min-height: 140px; /* Reserves space so the layout doesn't jump */
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.revealed-card-wrapper {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
animation: slideDownFade 0.4s ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Specific styling for the revealed card images */
|
|
||||||
.revealed-card-wrapper .card-image {
|
|
||||||
width: 65px;
|
|
||||||
border-radius: 8px;
|
|
||||||
border: 2px solid var(--q-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Keeping your original skeleton fan look */
|
|
||||||
.skeleton-fan {
|
|
||||||
opacity: 0.15;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skeleton-card {
|
|
||||||
width: 60px;
|
|
||||||
height: 90px;
|
|
||||||
background: rgba(255, 255, 255, 0.1) !important;
|
|
||||||
margin-left: -35px;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skeleton-card:first-child {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes slideDownFade {
|
|
||||||
0% { opacity: 0; transform: translateY(-20px); }
|
|
||||||
100% { opacity: 1; transform: translateY(0); }
|
|
||||||
}
|
|
||||||
.card-inner {
|
|
||||||
perspective: 1000px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The Reveal Animation */
|
|
||||||
.animate-reveal {
|
|
||||||
animation: dramaticFlip 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
|
|
||||||
backface-visibility: hidden;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes dramaticFlip {
|
|
||||||
0% {
|
|
||||||
transform: rotateY(0deg) scale(1);
|
|
||||||
}
|
|
||||||
40% {
|
|
||||||
/* Halfway: Card is vertical and lifted up */
|
|
||||||
transform: rotateY(90deg) scale(1.5) translateY(-30px);
|
|
||||||
filter: brightness(1.3);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
/* Final: Card is flat again, showing the face */
|
|
||||||
transform: rotateY(0deg) scale(1.3) translateY(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Ensure the image isn't mirrored after the rotation logic */
|
|
||||||
.animate-reveal :deep(img) {
|
|
||||||
backface-visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Optional: Slight pulse while the button is waiting to be clicked */
|
|
||||||
.selected-card:not(.is-flipping) {
|
|
||||||
animation: pulse 2s infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes pulse {
|
|
||||||
0% { transform: scale(1.4); }
|
|
||||||
50% { transform: scale(1.45); box-shadow: 0 0 40px rgba(25, 118, 210, 0.6); }
|
|
||||||
100% { transform: scale(1.4); }
|
|
||||||
}
|
|
||||||
/* Add to previous styles */
|
|
||||||
|
|
||||||
.winner-glow .card-image {
|
|
||||||
border-color: #31ccec; /* Default 'info' blue for ongoing ties */
|
|
||||||
transform: scale(1.05) translateY(-10px);
|
|
||||||
box-shadow: 0 10px 40px rgba(49, 204, 236, 0.4) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If there is only one winner, change glow to Gold */
|
|
||||||
.winner-glow:only-child .card-image,
|
|
||||||
.tie-break-card .winner-glow:has(.bg-positive) .card-image {
|
|
||||||
border-color: #f2c037;
|
|
||||||
box-shadow: 0 10px 40px rgba(242, 192, 55, 0.5) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.opacity-40 {
|
|
||||||
opacity: 0.4;
|
|
||||||
filter: grayscale(0.8);
|
|
||||||
transform: scale(0.9);
|
|
||||||
transition: all 0.5s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-stack {
|
|
||||||
perspective: 1000px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card-image-reveal {
|
|
||||||
width: 130px;
|
|
||||||
border-radius: 10px;
|
|
||||||
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ import type {
|
|||||||
PodiumPlayer,
|
PodiumPlayer,
|
||||||
Round,
|
Round,
|
||||||
Trick,
|
Trick,
|
||||||
User,
|
User
|
||||||
Card
|
|
||||||
} from "@/types/GameSubTypes.ts";
|
} from "@/types/GameSubTypes.ts";
|
||||||
|
|
||||||
|
|
||||||
@@ -32,8 +31,6 @@ type TieInfo = {
|
|||||||
self: Player | null
|
self: Player | null
|
||||||
tiedPlayers: Player[]
|
tiedPlayers: Player[]
|
||||||
highestAmount: number
|
highestAmount: number
|
||||||
selectedCards: Record<string, Card>
|
|
||||||
winners: Player[] | null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type TrumpInfo = {
|
type TrumpInfo = {
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
MAJOR=0
|
MAJOR=0
|
||||||
MINOR=25
|
MINOR=23
|
||||||
PATCH=0
|
PATCH=0
|
||||||
|
|||||||
@@ -22,9 +22,6 @@ export default defineConfig({
|
|||||||
globPatterns: [
|
globPatterns: [
|
||||||
'**/*.{js,css,html,ico,png,svg,webmanifest}',
|
'**/*.{js,css,html,ico,png,svg,webmanifest}',
|
||||||
],
|
],
|
||||||
navigateFallbackDenylist: [
|
|
||||||
/^\/api/,
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
|
|
||||||
manifest: {
|
manifest: {
|
||||||
|
|||||||
Reference in New Issue
Block a user