feat: play pop when changing the setting
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
This commit is contained in:
parent
f93b84eec7
commit
0b6ec922a4
|
@ -109,6 +109,7 @@ import UserSettingsService from '@/services/userSettings'
|
|||
import {PrefixMode} from '@/modules/parseTaskText'
|
||||
import ListSearch from '@/components/tasks/partials/listSearch'
|
||||
import {createRandomID} from '@/helpers/randomId'
|
||||
import {playPop} from '@/helpers/playPop'
|
||||
|
||||
function getPlaySoundWhenDoneSetting() {
|
||||
return localStorage.getItem(playSoundWhenDoneKey) === 'true' || localStorage.getItem(playSoundWhenDoneKey) === null
|
||||
|
@ -143,6 +144,13 @@ export default {
|
|||
mounted() {
|
||||
this.setTitle(`${this.$t('user.settings.general.title')} - ${this.$t('user.settings.title')}`)
|
||||
},
|
||||
watch: {
|
||||
playSoundWhenDone(play) {
|
||||
if (play) {
|
||||
playPop()
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async updateSettings() {
|
||||
localStorage.setItem(playSoundWhenDoneKey, this.playSoundWhenDone)
|
||||
|
|
Reference in New Issue