feat(ui): FRO-36 PWA
Added another animation to slotmachine
This commit is contained in:
@@ -48,34 +48,41 @@ const spin = (): void => {
|
||||
<q-layout>
|
||||
<q-page-container>
|
||||
<q-page class="flex flex-center">
|
||||
<q-card class="slot-machine-card q-pa-lg text-center shadow-10">
|
||||
<div class="text-h4 q-mb-md text-black text-weight-bolder " style="font-family: serif;">Offline Casino</div>
|
||||
<transition
|
||||
appear
|
||||
tag="div"
|
||||
enter-active-class="animate__animated animate__fadeInDown"
|
||||
leave-active-class="animate__animated animate__fadeOutUp"
|
||||
>
|
||||
<q-card class="slot-machine-card q-pa-lg text-center shadow-10">
|
||||
<div class="text-h4 q-mb-md text-black text-weight-bolder " style="font-family: serif;">Offline Casino</div>
|
||||
|
||||
<div class="row justify-center q-gutter-md q-mb-xl">
|
||||
<div v-for="(reel, index) in reelStates" :key="index" class="reel-container shadow-2">
|
||||
<div class="row justify-center q-gutter-md q-mb-xl">
|
||||
<div v-for="(reel, index) in reelStates" :key="index" class="reel-container shadow-2">
|
||||
|
||||
<div v-if="reel.isSpinning" class="reel-strip">
|
||||
<div v-for="n in 10" :key="n" class="text-h2">{{ symbols[n % symbols.length] }}</div>
|
||||
</div>
|
||||
|
||||
<div v-else class="text-h2 static-symbol">{{ reel.value }}</div>
|
||||
|
||||
<div v-if="reel.isSpinning" class="reel-strip">
|
||||
<div v-for="n in 10" :key="n" class="text-h2">{{ symbols[n % symbols.length] }}</div>
|
||||
</div>
|
||||
|
||||
<div v-else class="text-h2 static-symbol">{{ reel.value }}</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="result-box q-mb-md" style="height: 40px;">
|
||||
<div v-if="isWinner" class="text-h5 text-positive text-weight-bold animate-bounce">YOU WIN! (Nothing)</div>
|
||||
<div v-else-if="hasSpun && !globalSpinning" class="text-h6 text-grey-7">Try again!</div>
|
||||
<div v-else class="text-h6 text-grey-7">Try your luck until you are connected!</div>
|
||||
</div>
|
||||
<div class="result-box q-mb-md" style="height: 40px;">
|
||||
<div v-if="isWinner" class="text-h5 text-positive text-weight-bold animate-bounce">YOU WIN! (Nothing)</div>
|
||||
<div v-else-if="hasSpun && !globalSpinning" class="text-h6 text-grey-7">Try again!</div>
|
||||
<div v-else class="text-h6 text-grey-7">Try your luck until you are connected!</div>
|
||||
</div>
|
||||
|
||||
<q-btn
|
||||
size="lg" color="light-green"
|
||||
:label="globalSpinning ? 'SPINNING...' : 'SPIN'"
|
||||
:loading="globalSpinning"
|
||||
@click="spin" class="full-width" rounded
|
||||
/>
|
||||
</q-card>
|
||||
<q-btn
|
||||
size="lg" color="light-green"
|
||||
:label="globalSpinning ? 'SPINNING...' : 'SPIN'"
|
||||
:loading="globalSpinning"
|
||||
@click="spin" class="full-width" rounded
|
||||
/>
|
||||
</q-card>
|
||||
</transition>
|
||||
</q-page>
|
||||
</q-page-container>
|
||||
</q-layout>
|
||||
|
||||
Reference in New Issue
Block a user