Skip to content

Commit

Permalink
* fix minor migration mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
ConorMurphy21 committed Feb 5, 2024
1 parent c32f0d9 commit 3af29c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client/src/components/endGame/EndGame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const { n } = useI18n();
<span
v-t="{
path: 'scoreFormat',
args: { rank: rank[index], player: score.player.name, points: n(score.points) }
args: { rank: rank[index], player: score.player.name, score: n(score.points) }
}" />
</div>
</div>
Expand Down
13 changes: 6 additions & 7 deletions client/src/components/gameShared/Timer.vue
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
<script setup lang="ts">
import { onUnmounted, watch } from 'vue';
import { useGameStore } from '@/stores/game.js';
import { AudioWrap } from '@/mixins/audiowrap.js';
import timerMp3 from '@/assets/audio/timer_full.mp3';
import timerCompleteMp3 from '@/assets/audio/timerComplete.mp3';
import { useI18n } from 'vue-i18n';
import { useSettingsStore } from '@/stores/settings';
defineProps<{
const props = defineProps<{
time: number;
}>();
const timer = new AudioWrap(timerMp3);
const timerComplete = new AudioWrap(timerCompleteMp3);
const gameStore = useGameStore();
const settingsStore = useGameStore();
const settingsStore = useSettingsStore();
watch(
() => settingsStore.timer,
() => settingsStore.volume,
(val: number) => {
timer.volume = val;
}
);
watch(
() => gameStore.timer,
() => props.time,
(val: number) => {
if (val === 10) {
timer.play();
Expand All @@ -45,7 +44,7 @@ const { n } = useI18n();
<template>
<div>
<h1
v-if="time"
v-if="time > 0"
class="display-5"
:class="{
'bounce bold-black': time > 10,
Expand Down

0 comments on commit 3af29c7

Please sign in to comment.