Feat : create functionb hooks for winner and loser screens
release-tag / release-image (push) Successful in 28s

Related to #49
This commit is contained in:
2024-05-17 15:03:55 +02:00
parent b008541d89
commit ae638ba920
2 changed files with 25 additions and 0 deletions
+24
View File
@@ -12,6 +12,30 @@ watch(
playSound('/sounds/ding.mp3')
}
})
watch(
() => goStore.current_game?.losers,
() => {
if (goStore.self?.uuid && goStore.current_game?.losers && goStore.current_game.losers.includes(goStore.self.uuid)) {
showLoserScreen()
}
})
watch(
() => goStore.current_game?.ended,
() => {
if (goStore.current_game?.ended && goStore.self?.uuid && goStore.current_game?.losers && !goStore.current_game.losers.includes(goStore.self.uuid)) {
showWinnerScreen()
}
})
function showLoserScreen() {
// playSound('/sounds/ding.mp3')
}
function showWinnerScreen() {
// playSound('/sounds/ding.mp3')
}
</script>
<template>