chore: options in local storage

This commit is contained in:
2024-08-03 17:11:11 +02:00
parent 6915f30711
commit bf5f2ef49c
4 changed files with 54 additions and 9 deletions
+4 -1
View File
@@ -220,7 +220,10 @@ export default defineComponent({
},
animatingStatus(val: typeof this.animatingStatus) {
if (val == 'running') (this.$refs['audio'] as HTMLAudioElement).play();
if (val == 'running' && this.mainStore.filters.soundsEnabled)
(this.$refs['audio'] as HTMLAudioElement).play().catch((err) => {
console.error('Dźwięk nie mógł zostać odtworzony:', err);
});
else {
(this.$refs['audio'] as HTMLAudioElement).currentTime = 0;
(this.$refs['audio'] as HTMLAudioElement).pause();