mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 07:05:57 -05:00
[web] Simplify variable naming
This commit is contained in:
parent
2d7776619f
commit
9319118190
@ -31,8 +31,8 @@ export const filters = {
|
||||
.setLocale(locale.value)
|
||||
.toLocaleString(DateTime.DATETIME_MED)
|
||||
},
|
||||
durationInDays(value_ms) {
|
||||
const minutes = Math.floor(value_ms / 60000)
|
||||
durationInDays(value) {
|
||||
const minutes = Math.floor(value / 60000)
|
||||
if (minutes > 1440) {
|
||||
return Duration.fromObject({ minutes })
|
||||
.shiftTo('days', 'hours', 'minutes')
|
||||
@ -44,9 +44,9 @@ export const filters = {
|
||||
}
|
||||
return Duration.fromObject({ minutes }).shiftTo('minutes').toHuman()
|
||||
},
|
||||
durationInHours(value_ms) {
|
||||
const format = value_ms >= 3600000 ? 'h:mm:ss' : 'm:ss'
|
||||
return Duration.fromMillis(value_ms).toFormat(format)
|
||||
durationInHours(value) {
|
||||
const format = value >= 3600000 ? 'h:mm:ss' : 'm:ss'
|
||||
return Duration.fromMillis(value).toFormat(format)
|
||||
},
|
||||
number(value) {
|
||||
return value.toLocaleString(locale.value)
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div class="columns is-centered">
|
||||
<div class="column is-four-fifths">
|
||||
<section v-if="$slots.options">
|
||||
<div ref="options_ref" style="height: 1px" />
|
||||
<div ref="options" style="height: 1px" />
|
||||
<slot name="options" />
|
||||
<nav class="buttons is-centered mt-4 mb-2">
|
||||
<router-link class="button is-small is-white" :to="position">
|
||||
@ -65,12 +65,12 @@ export default {
|
||||
rootMargin: '-82px 0px 0px 0px',
|
||||
threshold: 1.0
|
||||
})
|
||||
this.observer.observe(this.$refs.options_ref)
|
||||
this.observer.observe(this.$refs.options)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onElementObserved(entries) {
|
||||
entries.forEach(({ target, isIntersecting }) => {
|
||||
entries.forEach(({ isIntersecting }) => {
|
||||
this.options_visible = isIntersecting
|
||||
})
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user