chore: removed unused store files; fix: removed global window.vol object in favor to a store property; chore: changed store module aboutInfo to appInfo

This commit is contained in:
Roberto Tonino
2020-11-10 21:07:25 +01:00
parent 333af201e0
commit 86e3cda64c
13 changed files with 145 additions and 148 deletions

View File

@@ -8,11 +8,17 @@
import EventBus from '@/utils/EventBus'
import { adjustVolume } from '@/utils/adjust-volume'
import { mapGetters } from 'vuex'
export default {
data: () => ({
previewStopped: false
}),
computed: {
...mapGetters({
previewVolume: 'getPreviewVolume'
})
},
mounted() {
this.$refs.preview.volume = 1
@@ -31,7 +37,7 @@ export default {
this.previewStopped = false
await adjustVolume(this.$refs.preview, window.vol.preview_max_volume / 100, { duration: 500 })
await adjustVolume(this.$refs.preview, this.previewVolume / 100, { duration: 500 })
},
async onTimeUpdate() {
// Prevents first time entering in this function
@@ -77,7 +83,7 @@ export default {
icon.innerText = 'pause'
await adjustVolume(this.$refs.preview, window.vol.preview_max_volume / 100, { duration: 500 })
await adjustVolume(this.$refs.preview, this.previewVolume / 100, { duration: 500 })
} else {
this.previewStopped = true