mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-07-27 06:58:37 +02:00
13 lines
385 B
JavaScript
13 lines
385 B
JavaScript
export default {
|
|
methods: {
|
|
getJumpLabel(seconds) {
|
|
const val = Number(seconds)
|
|
if (isNaN(val)) return ''
|
|
const useMinutes = val >= 120 // keep 60s as seconds
|
|
const key = useMinutes ? 'UnitMinutesShort' : 'UnitSecondsShort'
|
|
const unitValue = useMinutes ? val / 60 : val
|
|
return this.$getString(key, [this.$formatNumber(unitValue)])
|
|
}
|
|
}
|
|
}
|