[web] Fix for items not displaying because of their name

Albums, artists, composers, genres, and any other items listed on page where they appear sorted by names are now all displayed properly.
This commit is contained in:
Alain Nussbaumer
2023-06-04 13:54:01 +02:00
parent d6dd790569
commit a1046f3913
10 changed files with 49 additions and 83 deletions

View File

@@ -2,7 +2,7 @@
<section>
<nav class="buttons is-centered fd-is-square" style="margin-bottom: 16px">
<a
v-for="char in filtered_index"
v-for="char in index"
:key="char"
class="button is-small"
@click="nav(char)"
@@ -16,22 +16,9 @@
export default {
name: 'IndexButtonList',
props: ['index'],
computed: {
filtered_index() {
if (!this.index) {
return []
}
const specialChars = '!"#$%&\'()*+,-./:;<=>?@[\\]^`{|}~'
return this.index.filter((c) => !specialChars.includes(c))
}
},
methods: {
nav: function (id) {
this.$router.push({ hash: '#index_' + id })
},
scroll_to_top: function () {
window.scrollTo({ top: 0, behavior: 'smooth' })
}
}
}