[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',
'sort-keys': 'off',
'vue/html-self-closing': 'off',
'vue/max-attributes-per-line': 'off',
'vue/prop-name-casing': 'off'
'vue/max-attributes-per-line': 'off'
}
}
]

View File

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

View File

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

View File

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

View File

@ -16,7 +16,7 @@ export default {
components: { ModalDialogPlayable },
props: {
item: { required: true, type: Object },
media_kind: { default: '', type: String },
mediaKind: { default: '', type: String },
show: Boolean
},
emits: ['close', 'remove-podcast', 'play-count-changed'],
@ -34,7 +34,7 @@ export default {
return []
},
media_kind_resolved() {
return this.media_kind || this.item.media_kind
return this.mediaKind || this.item.media_kind
},
playable() {
return {
@ -58,7 +58,7 @@ export default {
},
{
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',

View File

@ -14,14 +14,14 @@ export default {
components: { ModalDialogPlayable },
props: {
item: { required: true, type: Object },
media_kind: { required: true, type: String },
mediaKind: { required: true, type: String },
show: Boolean
},
emits: ['close'],
computed: {
playable() {
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,
properties: [
{ key: 'property.albums', value: this.item.album_count },

View File

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

View File

@ -148,7 +148,7 @@ export default {
this.$router.push({
name: 'genre-albums',
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 #content>
<list-tracks-spotify :items="tracks" :context_uri="album.uri" />
<list-tracks-spotify :items="tracks" :context-uri="album.uri" />
</template>
</content-with-hero>
<modal-dialog-album-spotify

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -17,7 +17,7 @@
/>
</template>
<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">
<template #loading>
<div class="columns is-centered">

View File

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