mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-22 00:49:10 +02:00
Add: User listening sessions and user listening stats #167
This commit is contained in:
parent
663d02e9fe
commit
91e44bc2f9
16 changed files with 461 additions and 72 deletions
|
@ -54,6 +54,22 @@ Vue.prototype.$secondsToTimestamp = (seconds) => {
|
|||
return `${_hours}:${_minutes.toString().padStart(2, '0')}:${_seconds.toString().padStart(2, '0')}`
|
||||
}
|
||||
|
||||
Vue.prototype.$elapsedPrettyExtended = (seconds) => {
|
||||
var minutes = Math.floor(seconds / 60)
|
||||
seconds -= minutes * 60
|
||||
var hours = Math.floor(minutes / 60)
|
||||
minutes -= hours * 60
|
||||
var days = Math.floor(hours / 24)
|
||||
hours -= days * 24
|
||||
|
||||
var strs = []
|
||||
if (days) strs.push(`${days}d`)
|
||||
if (hours) strs.push(`${hours}h`)
|
||||
if (minutes) strs.push(`${minutes}m`)
|
||||
if (seconds) strs.push(`${seconds}s`)
|
||||
return strs.join(' ')
|
||||
}
|
||||
|
||||
Vue.prototype.$calculateTextSize = (text, styles = {}) => {
|
||||
const el = document.createElement('p')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue