mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
[web] Rename indexList to indices
This commit is contained in:
parent
062a98b2a8
commit
c94b905d72
@ -2,11 +2,11 @@
|
||||
<section>
|
||||
<nav class="buttons is-centered mb-4 fd-is-square">
|
||||
<router-link
|
||||
v-for="id in index"
|
||||
:key="id"
|
||||
v-for="index in indices"
|
||||
:key="index"
|
||||
class="button is-small"
|
||||
:to="'#index_' + id"
|
||||
>{{ id }}</router-link
|
||||
:to="'#index_' + index"
|
||||
>{{ index }}</router-link
|
||||
>
|
||||
</nav>
|
||||
</section>
|
||||
@ -15,7 +15,7 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'IndexButtonList',
|
||||
props: ['index']
|
||||
props: { indices: Array }
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -115,7 +115,7 @@ export class GroupedList {
|
||||
this.offset = offset
|
||||
this.limit = limit
|
||||
this.count = items.length
|
||||
this.indexList = []
|
||||
this.indices = []
|
||||
this.group(noop())
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ export class GroupedList {
|
||||
: itemsFiltered
|
||||
|
||||
// Create index list
|
||||
this.indexList = [...new Set(itemsSorted.map(options.groupKeyFn))]
|
||||
this.indices = [...new Set(itemsSorted.map(options.groupKeyFn))]
|
||||
|
||||
// Group item list
|
||||
this.itemsGrouped = itemsSorted.reduce((r, item) => {
|
||||
|
@ -64,7 +64,7 @@ const dataObject = {
|
||||
vm.album = response[0].data
|
||||
vm.tracks = new GroupedList(response[1].data)
|
||||
vm.tracks.group(byMedium('disc_number'))
|
||||
if (vm.tracks.indexList <= 1) {
|
||||
if (vm.tracks.indices <= 1) {
|
||||
vm.tracks.group(noop())
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<tabs-music />
|
||||
<content-with-heading>
|
||||
<template #options>
|
||||
<index-button-list :index="albums.indexList" />
|
||||
<index-button-list :indices="albums.indices" />
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<p class="heading mb-5" v-text="$t('page.albums.filter')" />
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<content-with-heading>
|
||||
<template #options>
|
||||
<index-button-list :index="tracks.indexList" />
|
||||
<index-button-list :indices="tracks.indices" />
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<p class="heading mb-5" v-text="$t('page.artist.filter')" />
|
||||
|
@ -3,7 +3,7 @@
|
||||
<tabs-music />
|
||||
<content-with-heading>
|
||||
<template #options>
|
||||
<index-button-list :index="artists.indexList" />
|
||||
<index-button-list :indices="artists.indices" />
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<p class="heading mb-5" v-text="$t('page.artists.filter')" />
|
||||
|
@ -3,7 +3,7 @@
|
||||
<tabs-audiobooks />
|
||||
<content-with-heading>
|
||||
<template #options>
|
||||
<index-button-list :index="albums.indexList" />
|
||||
<index-button-list :indices="albums.indices" />
|
||||
</template>
|
||||
<template #heading-left>
|
||||
<p class="title is-4" v-text="$t('page.audiobooks.albums.title')" />
|
||||
|
@ -3,7 +3,7 @@
|
||||
<tabs-audiobooks />
|
||||
<content-with-heading>
|
||||
<template #options>
|
||||
<index-button-list :index="artists.indexList" />
|
||||
<index-button-list :indices="artists.indices" />
|
||||
</template>
|
||||
<template #heading-left>
|
||||
<p class="title is-4" v-text="$t('page.audiobooks.artists.title')" />
|
||||
|
@ -3,7 +3,7 @@
|
||||
<tabs-audiobooks />
|
||||
<content-with-heading>
|
||||
<template #options>
|
||||
<index-button-list :index="genres.indexList" />
|
||||
<index-button-list :indices="genres.indices" />
|
||||
</template>
|
||||
<template #heading-left>
|
||||
<p class="title is-4" v-text="$t('page.genres.title')" />
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<content-with-heading>
|
||||
<template #options>
|
||||
<index-button-list :index="tracks.indexList" />
|
||||
<index-button-list :indices="tracks.indices" />
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<p class="heading mb-5" v-text="$t('page.artist.sort.title')" />
|
||||
|
@ -3,7 +3,7 @@
|
||||
<tabs-music />
|
||||
<content-with-heading>
|
||||
<template #options>
|
||||
<index-button-list :index="composers.indexList" />
|
||||
<index-button-list :indices="composers.indices" />
|
||||
</template>
|
||||
<template #heading-left>
|
||||
<p class="title is-4" v-text="$t('page.composers.title')" />
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<content-with-heading>
|
||||
<template #options>
|
||||
<index-button-list :index="albums_list.indexList" />
|
||||
<index-button-list :indices="albums.indices" />
|
||||
</template>
|
||||
<template #heading-left>
|
||||
<p class="title is-4" v-text="genre.name" />
|
||||
@ -33,7 +33,7 @@
|
||||
v-text="$t('page.genre.track-count', { count: genre.track_count })"
|
||||
/>
|
||||
</p>
|
||||
<list-albums :albums="albums_list" />
|
||||
<list-albums :albums="albums" />
|
||||
<modal-dialog-genre
|
||||
:genre="genre"
|
||||
:media_kind="media_kind"
|
||||
@ -63,8 +63,8 @@ const dataObject = {
|
||||
|
||||
set(vm, response) {
|
||||
vm.genre = response[0].data
|
||||
vm.albums_list = new GroupedList(response[1].data.albums)
|
||||
vm.albums_list.group(byName('name_sort', true))
|
||||
vm.albums = new GroupedList(response[1].data.albums)
|
||||
vm.albums.group(byName('name_sort', true))
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ export default {
|
||||
})
|
||||
},
|
||||
beforeRouteUpdate(to, from, next) {
|
||||
if (!this.albums_list.isEmpty()) {
|
||||
if (!this.albums.isEmpty()) {
|
||||
next()
|
||||
return
|
||||
}
|
||||
@ -94,7 +94,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
albums_list: new GroupedList(),
|
||||
albums: new GroupedList(),
|
||||
genre: {},
|
||||
media_kind: this.$route.query.media_kind,
|
||||
show_details_modal: false
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<content-with-heading>
|
||||
<template #options>
|
||||
<index-button-list :index="tracks.indexList" />
|
||||
<index-button-list :indices="tracks.indices" />
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<p class="heading mb-5" v-text="$t('page.genre.sort.title')" />
|
||||
|
@ -3,7 +3,7 @@
|
||||
<tabs-music />
|
||||
<content-with-heading>
|
||||
<template #options>
|
||||
<index-button-list :index="genres.indexList" />
|
||||
<index-button-list :indices="genres.indices" />
|
||||
</template>
|
||||
<template #heading-left>
|
||||
<p class="title is-4" v-text="$t('page.genres.title')" />
|
||||
|
Loading…
Reference in New Issue
Block a user