mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-03 23:30:09 -05:00
[web] Replace formatting method with the one provided by Vue-i18n
This commit is contained in:
parent
68a5254efb
commit
b068b5f745
@ -41,9 +41,6 @@ export const filters = {
|
|||||||
const format = value >= 3600000 ? 'h:mm:ss' : 'm:ss'
|
const format = value >= 3600000 ? 'h:mm:ss' : 'm:ss'
|
||||||
return Duration.fromMillis(value).toFormat(format)
|
return Duration.fromMillis(value).toFormat(format)
|
||||||
},
|
},
|
||||||
number(value) {
|
|
||||||
return value.toLocaleString(locale.value)
|
|
||||||
},
|
|
||||||
timeFromNow(value) {
|
timeFromNow(value) {
|
||||||
return DateTime.fromISO(value).toRelative({
|
return DateTime.fromISO(value).toRelative({
|
||||||
unit: ['years', 'months', 'days', 'hours', 'minutes', 'seconds']
|
unit: ['years', 'months', 'days', 'hours', 'minutes', 'seconds']
|
||||||
|
@ -127,15 +127,15 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'property.artists',
|
label: 'property.artists',
|
||||||
value: this.$filters.number(this.libraryStore.artists)
|
value: this.$n(this.libraryStore.artists)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'property.albums',
|
label: 'property.albums',
|
||||||
value: this.$filters.number(this.libraryStore.albums)
|
value: this.$n(this.libraryStore.albums)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'property.tracks',
|
label: 'property.tracks',
|
||||||
value: this.$filters.number(this.libraryStore.songs)
|
value: this.$n(this.libraryStore.songs)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'property.playtime',
|
label: 'property.playtime',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user