Update user audiobook progress model, add mark as read/not read, download individual tracks

This commit is contained in:
Mark Cooper 2021-09-06 14:13:01 -05:00
parent 1f2afe4d92
commit 41c391e87b
21 changed files with 496 additions and 100 deletions

View file

@ -22,8 +22,19 @@ export default {
isShowing: false
}
},
watch: {
text() {
this.updateText()
}
},
methods: {
updateText() {
if (this.tooltip) {
this.tooltip.innerHTML = this.text
}
},
createTooltip() {
if (!this.$refs.box) return
var boxChow = this.$refs.box.getBoundingClientRect()
var top = 0
var left = 0
@ -33,6 +44,9 @@ export default {
} else if (this.direction === 'bottom') {
top = boxChow.top + boxChow.height + 4
left = boxChow.left
} else if (this.direction === 'top') {
top = boxChow.top - 24
left = boxChow.left
}
var tooltip = document.createElement('div')
tooltip.className = 'absolute px-2 bg-black bg-opacity-90 py-1 text-white pointer-events-none text-xs rounded shadow-lg'