fix(countdown, cron-alarm, time-alarm): resolve Beep.mp3 against the app base

The root-absolute /Beep.mp3 (also fixed in pomodoro-timer, in the previous commit) broke when IT-Tools is served from a subfolder.

Refs sharevb/it-tools#571

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sebastian DanielssonandClaude Opus 5.5 authored and sharevb committed 2026-10-25 18:51:17 +01:00
1 parent b536f040be
commit 94c0bbfcbc
3 files changed
+6 -3

No files matched your search

+2 -1
View File
@@ -3,6 +3,7 @@ import { useI18n } from 'vue-i18n';
import { Countdown } from 'vue3-flip-countdown';
import { add, format } from 'date-fns';
import { useQueryParam } from '@/composable/queryParams';
import { appBaseUrl as base } from '@/utils/base-url';
const { t } = useI18n();
@@ -181,7 +182,7 @@ const isEnded = computed(() => status.value === 'ended');
</div>
</c-card>
<audio ref="audio" loop src="/Beep.mp3" />
<audio ref="audio" loop :src="`${base}Beep.mp3`" />
</div>
</template>
+2 -1
View File
@@ -4,6 +4,7 @@ import { Countdown } from 'vue3-flip-countdown';
import { CronExpressionParser } from 'cron-parser';
import { format } from 'date-fns';
import { useQueryParam } from '@/composable/queryParams';
import { appBaseUrl as base } from '@/utils/base-url';
const { t } = useI18n();
@@ -166,7 +167,7 @@ const isEnded = computed(() => status.value === 'ended');
</div>
</c-card>
<audio ref="audio" loop src="/Beep.mp3" />
<audio ref="audio" loop :src="`${base}Beep.mp3`" />
</div>
</template>
+2 -1
View File
@@ -3,6 +3,7 @@ import { useI18n } from 'vue-i18n';
import { Countdown } from 'vue3-flip-countdown';
import { format, set } from 'date-fns';
import { useQueryParam } from '@/composable/queryParams';
import { appBaseUrl as base } from '@/utils/base-url';
const { t } = useI18n();
@@ -146,7 +147,7 @@ const isEnded = computed(() => status.value === 'ended');
</div>
</c-card>
<audio ref="audio" loop src="/Beep.mp3" />
<audio ref="audio" loop :src="`${base}Beep.mp3`" />
</div>
</template>