mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
[web] Simplify variable naming
This commit is contained in:
parent
c255b3a108
commit
4ae2903b4d
@ -1,13 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="fd-page-with-tabs">
|
<div class="fd-page-with-tabs">
|
||||||
<tabs-music />
|
<tabs-music />
|
||||||
<!-- Recently added -->
|
|
||||||
<content-with-heading>
|
<content-with-heading>
|
||||||
<template #heading-left>
|
<template #heading-left>
|
||||||
<p class="title is-4" v-text="$t('page.music.recently-added.title')" />
|
<p class="title is-4" v-text="$t('page.music.recently-added.title')" />
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<list-albums :items="recently_added" />
|
<list-albums :items="albums" />
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<nav class="level">
|
<nav class="level">
|
||||||
@ -22,13 +21,12 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</template>
|
</template>
|
||||||
</content-with-heading>
|
</content-with-heading>
|
||||||
<!-- Recently played -->
|
|
||||||
<content-with-heading>
|
<content-with-heading>
|
||||||
<template #heading-left>
|
<template #heading-left>
|
||||||
<p class="title is-4" v-text="$t('page.music.recently-played.title')" />
|
<p class="title is-4" v-text="$t('page.music.recently-played.title')" />
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<list-tracks :items="recently_played" />
|
<list-tracks :items="tracks" />
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<nav class="level">
|
<nav class="level">
|
||||||
@ -73,8 +71,8 @@ const dataObject = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set(vm, response) {
|
set(vm, response) {
|
||||||
vm.recently_added = new GroupedList(response[0].data.albums)
|
vm.albums = new GroupedList(response[0].data.albums)
|
||||||
vm.recently_played = new GroupedList(response[1].data.tracks)
|
vm.tracks = new GroupedList(response[1].data.tracks)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,8 +88,8 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
recently_added: [],
|
albums: [],
|
||||||
recently_played: { items: [] },
|
tracks: { items: [] },
|
||||||
selected_track: {}
|
selected_track: {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<p class="title is-4" v-text="$t('page.music.recently-added.title')" />
|
<p class="title is-4" v-text="$t('page.music.recently-added.title')" />
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<list-albums :items="recently_added" />
|
<list-albums :items="albums" />
|
||||||
</template>
|
</template>
|
||||||
</content-with-heading>
|
</content-with-heading>
|
||||||
</div>
|
</div>
|
||||||
@ -32,7 +32,7 @@ const dataObject = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set(vm, response) {
|
set(vm, response) {
|
||||||
vm.recently_added = new GroupedList(response.data.albums, {
|
vm.albums = new GroupedList(response.data.albums, {
|
||||||
criteria: [{ field: 'time_added', order: -1, type: Date }],
|
criteria: [{ field: 'time_added', order: -1, type: Date }],
|
||||||
index: { field: 'time_added', type: Date }
|
index: { field: 'time_added', type: Date }
|
||||||
})
|
})
|
||||||
@ -51,7 +51,7 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
recently_added: new GroupedList()
|
albums: new GroupedList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<p class="title is-4" v-text="$t('page.music.recently-played.title')" />
|
<p class="title is-4" v-text="$t('page.music.recently-played.title')" />
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<list-tracks :items="recently_played" />
|
<list-tracks :items="tracks" />
|
||||||
</template>
|
</template>
|
||||||
</content-with-heading>
|
</content-with-heading>
|
||||||
</div>
|
</div>
|
||||||
@ -30,7 +30,7 @@ const dataObject = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set(vm, response) {
|
set(vm, response) {
|
||||||
vm.recently_played = new GroupedList(response.data.tracks)
|
vm.tracks = new GroupedList(response.data.tracks)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
recently_played: {}
|
tracks: {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="fd-page-with-tabs">
|
<div class="fd-page-with-tabs">
|
||||||
<tabs-music />
|
<tabs-music />
|
||||||
<!-- New Releases -->
|
|
||||||
<content-with-heading>
|
<content-with-heading>
|
||||||
<template #heading-left>
|
<template #heading-left>
|
||||||
<p class="title is-4" v-text="$t('page.spotify.music.new-releases')" />
|
<p class="title is-4" v-text="$t('page.spotify.music.new-releases')" />
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<list-albums-spotify :items="new_releases" />
|
<list-albums-spotify :items="albums" />
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<nav class="level">
|
<nav class="level">
|
||||||
@ -22,7 +21,6 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</template>
|
</template>
|
||||||
</content-with-heading>
|
</content-with-heading>
|
||||||
<!-- Featured Playlists -->
|
|
||||||
<content-with-heading>
|
<content-with-heading>
|
||||||
<template #heading-left>
|
<template #heading-left>
|
||||||
<p
|
<p
|
||||||
@ -31,7 +29,7 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<list-playlists-spotify :items="featured_playlists" />
|
<list-playlists-spotify :items="playlists" />
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<nav class="level">
|
<nav class="level">
|
||||||
@ -76,8 +74,8 @@ const dataObject = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set(vm, response) {
|
set(vm, response) {
|
||||||
vm.new_releases = response[0].albums.items
|
vm.albums = response[0].albums.items
|
||||||
vm.featured_playlists = response[1].playlists.items
|
vm.playlists = response[1].playlists.items
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,8 +96,8 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
featured_playlists: [],
|
playlists: [],
|
||||||
new_releases: []
|
albums: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<list-playlists-spotify :items="featured_playlists" />
|
<list-playlists-spotify :items="playlists" />
|
||||||
</template>
|
</template>
|
||||||
</content-with-heading>
|
</content-with-heading>
|
||||||
</div>
|
</div>
|
||||||
@ -35,7 +35,7 @@ const dataObject = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set(vm, response) {
|
set(vm, response) {
|
||||||
vm.featured_playlists = response.playlists.items
|
vm.playlists = response.playlists.items
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
featured_playlists: []
|
playlists: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<p class="title is-4" v-text="$t('page.spotify.music.new-releases')" />
|
<p class="title is-4" v-text="$t('page.spotify.music.new-releases')" />
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<list-albums-spotify :items="new_releases" />
|
<list-albums-spotify :items="albums" />
|
||||||
</template>
|
</template>
|
||||||
</content-with-heading>
|
</content-with-heading>
|
||||||
</div>
|
</div>
|
||||||
@ -32,7 +32,7 @@ const dataObject = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
set(vm, response) {
|
set(vm, response) {
|
||||||
vm.new_releases = response.albums.items
|
vm.albums = response.albums.items
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
new_releases: []
|
albums: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user