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