[web] Fix property name casing

This commit is contained in:
Alain Nussbaumer 2025-03-22 16:38:10 +01:00
parent 0d00df7b7d
commit d8c3631cd7
16 changed files with 34 additions and 35 deletions

View File

@ -29,8 +29,7 @@ export default [
'one-var': 'off', 'one-var': 'off',
'sort-keys': 'off', 'sort-keys': 'off',
'vue/html-self-closing': 'off', 'vue/html-self-closing': 'off',
'vue/max-attributes-per-line': 'off', 'vue/max-attributes-per-line': 'off'
'vue/prop-name-casing': 'off'
} }
} }
] ]

View File

@ -15,7 +15,7 @@
/> />
<modal-dialog-album <modal-dialog-album
:item="selectedItem" :item="selectedItem"
:media_kind="media_kind" :media-kind="mediaKind"
:show="showDetailsModal" :show="showDetailsModal"
@close="showDetailsModal = false" @close="showDetailsModal = false"
@remove-podcast="openRemovePodcastDialog()" @remove-podcast="openRemovePodcastDialog()"
@ -53,7 +53,7 @@ export default {
components: { ListItem, ModalDialog, ModalDialogAlbum }, components: { ListItem, ModalDialog, ModalDialogAlbum },
props: { props: {
items: { required: true, type: Object }, items: { required: true, type: Object },
media_kind: { default: '', type: String } mediaKind: { default: '', type: String }
}, },
emits: ['play-count-changed', 'podcast-deleted'], emits: ['play-count-changed', 'podcast-deleted'],
setup() { setup() {
@ -75,7 +75,7 @@ export default {
] ]
}, },
media_kind_resolved() { media_kind_resolved() {
return this.media_kind || this.selectedItem.media_kind return this.mediaKind || this.selectedItem.media_kind
} }
}, },
methods: { methods: {

View File

@ -10,7 +10,7 @@
/> />
<modal-dialog-genre <modal-dialog-genre
:item="selectedItem" :item="selectedItem"
:media_kind="media_kind" :media-kind="mediaKind"
:show="showDetailsModal" :show="showDetailsModal"
@close="showDetailsModal = false" @close="showDetailsModal = false"
/> />
@ -25,7 +25,7 @@ export default {
components: { ListItem, ModalDialogGenre }, components: { ListItem, ModalDialogGenre },
props: { props: {
items: { required: true, type: Object }, items: { required: true, type: Object },
media_kind: { required: true, type: String } mediaKind: { required: true, type: String }
}, },
data() { data() {
return { selectedItem: {}, showDetailsModal: false } return { selectedItem: {}, showDetailsModal: false }
@ -35,7 +35,7 @@ export default {
this.$router.push({ this.$router.push({
name: 'genre-albums', name: 'genre-albums',
params: { name: item.name }, params: { name: item.name },
query: { media_kind: this.media_kind } query: { mediaKind: this.mediaKind }
}) })
}, },
openDetails(item) { openDetails(item) {

View File

@ -57,7 +57,7 @@ export default {
name: 'ListTracksSpotify', name: 'ListTracksSpotify',
components: { ModalDialogTrackSpotify }, components: { ModalDialogTrackSpotify },
props: { props: {
context_uri: { default: '', type: String }, contextUri: { default: '', type: String },
items: { required: true, type: Object } items: { required: true, type: Object }
}, },
data() { data() {
@ -71,7 +71,7 @@ export default {
play(item) { play(item) {
if (item.is_playable) { if (item.is_playable) {
webapi.player_play_uri( webapi.player_play_uri(
this.context_uri || item.uri, this.contextUri || item.uri,
false, false,
item.position || 0 item.position || 0
) )

View File

@ -16,7 +16,7 @@ export default {
components: { ModalDialogPlayable }, components: { ModalDialogPlayable },
props: { props: {
item: { required: true, type: Object }, item: { required: true, type: Object },
media_kind: { default: '', type: String }, mediaKind: { default: '', type: String },
show: Boolean show: Boolean
}, },
emits: ['close', 'remove-podcast', 'play-count-changed'], emits: ['close', 'remove-podcast', 'play-count-changed'],
@ -34,7 +34,7 @@ export default {
return [] return []
}, },
media_kind_resolved() { media_kind_resolved() {
return this.media_kind || this.item.media_kind return this.mediaKind || this.item.media_kind
}, },
playable() { playable() {
return { return {
@ -58,7 +58,7 @@ export default {
}, },
{ {
key: 'property.type', key: 'property.type',
value: `${this.$t(`media.kind.${this.item.media_kind}`)} - ${this.$t(`data.kind.${this.item.data_kind}`)}` value: `${this.$t(`media.kind.${this.item.mediaKind}`)} - ${this.$t(`data.kind.${this.item.data_kind}`)}`
}, },
{ {
key: 'property.added-on', key: 'property.added-on',

View File

@ -14,14 +14,14 @@ export default {
components: { ModalDialogPlayable }, components: { ModalDialogPlayable },
props: { props: {
item: { required: true, type: Object }, item: { required: true, type: Object },
media_kind: { required: true, type: String }, mediaKind: { required: true, type: String },
show: Boolean show: Boolean
}, },
emits: ['close'], emits: ['close'],
computed: { computed: {
playable() { playable() {
return { return {
expression: `genre is "${this.item.name}" and media_kind is ${this.media_kind}`, expression: `genre is "${this.item.name}" and media_kind is ${this.mediaKind}`,
name: this.item.name, name: this.item.name,
properties: [ properties: [
{ key: 'property.albums', value: this.item.album_count }, { key: 'property.albums', value: this.item.album_count },

View File

@ -153,7 +153,7 @@ export default {
this.$router.push({ this.$router.push({
name: 'genre-albums', name: 'genre-albums',
params: { name: this.item.genre }, params: { name: this.item.genre },
query: { media_kind: this.item.media_kind } query: { mediaKind: this.item.media_kind }
}) })
}, },
play() { play() {

View File

@ -148,7 +148,7 @@ export default {
this.$router.push({ this.$router.push({
name: 'genre-albums', name: 'genre-albums',
params: { name: this.item.genre }, params: { name: this.item.genre },
query: { media_kind: this.item.media_kind } query: { mediaKind: this.item.media_kind }
}) })
} }
} }

View File

@ -12,7 +12,7 @@
/> />
</template> </template>
<template #content> <template #content>
<list-tracks-spotify :items="tracks" :context_uri="album.uri" /> <list-tracks-spotify :items="tracks" :context-uri="album.uri" />
</template> </template>
</content-with-hero> </content-with-hero>
<modal-dialog-album-spotify <modal-dialog-album-spotify

View File

@ -18,7 +18,7 @@
<modal-dialog-album <modal-dialog-album
:item="album" :item="album"
:show="showDetailsModal" :show="showDetailsModal"
:media_kind="'audiobook'" media-kind="audiobook"
@close="showDetailsModal = false" @close="showDetailsModal = false"
/> />
</template> </template>

View File

@ -8,7 +8,7 @@
<heading-title :content="heading" /> <heading-title :content="heading" />
</template> </template>
<template #content> <template #content>
<list-genres :items="genres" :media_kind="'audiobook'" /> <list-genres :items="genres" media-kind="audiobook" />
</template> </template>
</content-with-heading> </content-with-heading>
</template> </template>

View File

@ -20,7 +20,7 @@
</content-with-heading> </content-with-heading>
<modal-dialog-genre <modal-dialog-genre
:item="genre" :item="genre"
:media_kind="media_kind" :media-kind="mediaKind"
:show="showDetailsModal" :show="showDetailsModal"
@close="showDetailsModal = false" @close="showDetailsModal = false"
/> />
@ -39,8 +39,8 @@ import webapi from '@/webapi'
const dataObject = { const dataObject = {
load(to) { load(to) {
return Promise.all([ return Promise.all([
webapi.library_genre(to.params.name, to.query.media_kind), webapi.library_genre(to.params.name, to.query.mediaKind),
webapi.library_genre_albums(to.params.name, to.query.media_kind) webapi.library_genre_albums(to.params.name, to.query.mediaKind)
]) ])
}, },
set(vm, response) { set(vm, response) {
@ -70,7 +70,7 @@ export default {
return { return {
albums: new GroupedList(), albums: new GroupedList(),
genre: {}, genre: {},
media_kind: this.$route.query.media_kind, mediaKind: this.$route.query.mediaKind,
showDetailsModal: false showDetailsModal: false
} }
}, },
@ -101,12 +101,12 @@ export default {
this.$router.push({ this.$router.push({
name: 'genre-tracks', name: 'genre-tracks',
params: { name: this.genre.name }, params: { name: this.genre.name },
query: { media_kind: this.media_kind } query: { mediaKind: this.mediaKind }
}) })
}, },
play() { play() {
webapi.player_play_expression( webapi.player_play_expression(
`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`, `genre is "${this.genre.name}" and media_kind is ${this.mediaKind}`,
true true
) )
} }

View File

@ -28,7 +28,7 @@
</content-with-heading> </content-with-heading>
<modal-dialog-genre <modal-dialog-genre
:item="genre" :item="genre"
:media_kind="media_kind" :media-kind="mediaKind"
:show="showDetailsModal" :show="showDetailsModal"
@close="showDetailsModal = false" @close="showDetailsModal = false"
/> />
@ -50,8 +50,8 @@ import webapi from '@/webapi'
const dataObject = { const dataObject = {
load(to) { load(to) {
return Promise.all([ return Promise.all([
webapi.library_genre(to.params.name, to.query.media_kind), webapi.library_genre(to.params.name, to.query.mediaKind),
webapi.library_genre_tracks(to.params.name, to.query.media_kind) webapi.library_genre_tracks(to.params.name, to.query.mediaKind)
]) ])
}, },
set(vm, response) { set(vm, response) {
@ -83,14 +83,14 @@ export default {
data() { data() {
return { return {
genre: {}, genre: {},
media_kind: this.$route.query.media_kind, mediaKind: this.$route.query.mediaKind,
showDetailsModal: false, showDetailsModal: false,
trackList: new GroupedList() trackList: new GroupedList()
} }
}, },
computed: { computed: {
expression() { expression() {
return `genre is "${this.genre.name}" and media_kind is ${this.media_kind}` return `genre is "${this.genre.name}" and media_kind is ${this.mediaKind}`
}, },
groupings() { groupings() {
return [ return [
@ -138,7 +138,7 @@ export default {
this.$router.push({ this.$router.push({
name: 'genre-albums', name: 'genre-albums',
params: { name: this.genre.name }, params: { name: this.genre.name },
query: { media_kind: this.media_kind } query: { mediaKind: this.media_kind }
}) })
}, },
play() { play() {

View File

@ -8,7 +8,7 @@
<heading-title :content="heading" /> <heading-title :content="heading" />
</template> </template>
<template #content> <template #content>
<list-genres :items="genres" :media_kind="'music'" /> <list-genres :items="genres" media-kind="music" />
</template> </template>
</content-with-heading> </content-with-heading>
</template> </template>

View File

@ -17,7 +17,7 @@
/> />
</template> </template>
<template #content> <template #content>
<list-tracks-spotify :items="tracks" :context_uri="playlist.uri" /> <list-tracks-spotify :items="tracks" :context-uri="playlist.uri" />
<vue-eternal-loading v-if="offset < total" :load="load"> <vue-eternal-loading v-if="offset < total" :load="load">
<template #loading> <template #loading>
<div class="columns is-centered"> <div class="columns is-centered">

View File

@ -20,7 +20,7 @@
<modal-dialog-album <modal-dialog-album
:item="album" :item="album"
:show="showDetailsModal" :show="showDetailsModal"
:media_kind="'podcast'" media-kind="podcast"
@close="showDetailsModal = false" @close="showDetailsModal = false"
@play-count-changed="reloadTracks" @play-count-changed="reloadTracks"
@remove-podcast="openRemovePodcastDialog" @remove-podcast="openRemovePodcastDialog"