Add: add hotkeys to modals, player, and ereader #121, Fix: audio player track not resizing on window resize #123, Add: sortable columns on manage tracks page #128

This commit is contained in:
advplyr 2021-10-23 16:49:34 -05:00
parent 97a065030e
commit 98c1ee01fd
12 changed files with 176 additions and 61 deletions

View file

@ -83,6 +83,11 @@ export default {
this.show = false
}
},
hotkey(action) {
if (action === 'Escape') {
this.show = false
}
},
setShow() {
document.body.appendChild(this.el)
setTimeout(() => {
@ -90,6 +95,7 @@ export default {
}, 10)
document.documentElement.classList.add('modal-open')
this.$eventBus.$on('modal-hotkey', this.hotkey)
this.$store.commit('setOpenModal', this.name)
},
setHide() {
@ -97,6 +103,7 @@ export default {
this.el.remove()
document.documentElement.classList.remove('modal-open')
this.$eventBus.$off('modal-hotkey', this.hotkey)
this.$store.commit('setOpenModal', null)
}
},