feat: add animation on end of round
This commit is contained in:
parent
1e261eb3ec
commit
f52c0b707c
@ -7,7 +7,7 @@
|
||||
:disabled="disabledMap[source.id]" :index="index" :show="showMap[source.id] && showSources" />
|
||||
</div>
|
||||
<div class="playground__spacer" />
|
||||
<div class="playground__quote" :class="{ 'playground__quote__show': showQuote}">
|
||||
<div class="playground__quote" :class="{ 'playground__quote__show': showQuote && showSources }">
|
||||
<QuoteCard :quote="quote" />
|
||||
</div>
|
||||
<div class="playground__skip" :class="{ 'playground__skip__show': showSkipButton }">
|
||||
@ -28,7 +28,6 @@ import { useRoundStore } from '@/stores/RoundStore'
|
||||
import useEngine from '@/composables/useEngine'
|
||||
import { useGameinfoStore } from "@/stores/GameinfoStore"
|
||||
import { useUserinfoStore } from "@/stores/UserinfoStore"
|
||||
import SkipButton from './SkipButton.vue'
|
||||
|
||||
const { round } = useRoundStore()
|
||||
const quote = { quote: round.quote } as Quote
|
||||
@ -48,7 +47,8 @@ const selectSource = async (source: Source): Promise<void> => {
|
||||
const game = useGameinfoStore()
|
||||
const playerListShowCheckbox = computed(() => game.state === 'play' && game.phase === 'select-quote')
|
||||
const showSources = computed(() => ['select-quote', 'reveal-show-count', 'reveal-source'].indexOf(game.phase) >= 0)
|
||||
const showQuote = showSources
|
||||
const showQuote = ref(false)
|
||||
window.setTimeout(() => { showQuote.value = true }, 100)
|
||||
const showSkipButton = computed(() => game.phase === 'select-quote')
|
||||
const badgeMap = computed(() => {
|
||||
const badgeMap = {} as { [key: string]: number}
|
||||
@ -75,7 +75,7 @@ const showMap = ref({} as { [key: string]: boolean})
|
||||
sources.forEach((source, index) => {
|
||||
window.setTimeout(() => {
|
||||
showMap.value[source.id] = true
|
||||
}, 1000 + index * 250)
|
||||
}, 3000 + index * 250)
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -107,13 +107,13 @@ sources.forEach((source, index) => {
|
||||
|
||||
&__quote {
|
||||
display: flex;
|
||||
visibility: hidden;
|
||||
justify-content: center;
|
||||
flex-grow: 4;
|
||||
opacity: 0;
|
||||
transition: opacity 1s linear;
|
||||
|
||||
&__show {
|
||||
visibility: visible;
|
||||
animation: quote-show 1s linear;
|
||||
opacity: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user