Update:Show seconds in elapsedPretty

This commit is contained in:
advplyr 2022-05-11 17:20:32 -05:00
parent d285845e04
commit caea6c6371
2 changed files with 6 additions and 0 deletions

View File

@ -41,6 +41,9 @@ Vue.prototype.$bytesPretty = (bytes, decimals = 2) => {
}
Vue.prototype.$elapsedPretty = (seconds) => {
if (seconds < 60) {
return `${Math.floor(seconds)} sec`
}
var minutes = Math.floor(seconds / 60)
if (minutes < 70) {
return `${minutes} min`

View File

@ -64,6 +64,9 @@ module.exports.getId = (prepend = '') => {
}
function elapsedPretty(seconds) {
if (seconds < 60) {
return `${Math.floor(seconds)} sec`
}
var minutes = Math.floor(seconds / 60)
if (minutes < 70) {
return `${minutes} min`