mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-15 03:45:03 +02:00
Update:Show seconds in elapsedPretty
This commit is contained in:
parent
d285845e04
commit
caea6c6371
2 changed files with 6 additions and 0 deletions
|
@ -41,6 +41,9 @@ Vue.prototype.$bytesPretty = (bytes, decimals = 2) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
Vue.prototype.$elapsedPretty = (seconds) => {
|
Vue.prototype.$elapsedPretty = (seconds) => {
|
||||||
|
if (seconds < 60) {
|
||||||
|
return `${Math.floor(seconds)} sec`
|
||||||
|
}
|
||||||
var minutes = Math.floor(seconds / 60)
|
var minutes = Math.floor(seconds / 60)
|
||||||
if (minutes < 70) {
|
if (minutes < 70) {
|
||||||
return `${minutes} min`
|
return `${minutes} min`
|
||||||
|
|
|
@ -64,6 +64,9 @@ module.exports.getId = (prepend = '') => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function elapsedPretty(seconds) {
|
function elapsedPretty(seconds) {
|
||||||
|
if (seconds < 60) {
|
||||||
|
return `${Math.floor(seconds)} sec`
|
||||||
|
}
|
||||||
var minutes = Math.floor(seconds / 60)
|
var minutes = Math.floor(seconds / 60)
|
||||||
if (minutes < 70) {
|
if (minutes < 70) {
|
||||||
return `${minutes} min`
|
return `${minutes} min`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue