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