feat: victory & defeat dialog

This commit is contained in:
2024-05-17 19:47:26 +02:00
parent 1ca05734e3
commit cf02d3a0ea
2 changed files with 110 additions and 0 deletions
+14
View File
@@ -38,12 +38,20 @@ watch(
}
})
const showResults = ref(false)
const isWinner = ref(false)
function showLoserScreen() {
// playSound('/sounds/ding.mp3')
showResults.value = true
isWinner.value = false
}
function showWinnerScreen() {
// playSound('/sounds/ding.mp3')
showResults.value = true
isWinner.value = true
}
</script>
@@ -61,6 +69,12 @@ function showWinnerScreen() {
<PlayerSlot v-for="p in current_players" :player="p"></PlayerSlot>
</div>
</div>
<ResultDialog
:isVisible="showResults"
:won="isWinner"
:players="goStore.current_game?.players"
@close="showResults = false">
</ResultDialog>
<SelfView></SelfView>
</template>