feat: victory & defeat dialog
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user