From b24e025b43a356f8c7b61b5851f447c1160f6556 Mon Sep 17 00:00:00 2001 From: Alain Nussbaumer Date: Wed, 28 Feb 2024 13:10:08 +0100 Subject: [PATCH] [web] Add default value for properties --- web-src/src/components/ControlDropdown.vue | 5 ++++- web-src/src/components/ControlSlider.vue | 7 ++++++- web-src/src/components/CoverArtwork.vue | 10 +++++----- web-src/src/components/IndexButtonList.vue | 2 +- web-src/src/components/ListAlbums.vue | 6 +++++- web-src/src/components/ListArtists.vue | 5 ++++- web-src/src/components/ListComposers.vue | 6 +++++- web-src/src/components/ListDirectories.vue | 2 +- web-src/src/components/ListGenres.vue | 6 +++++- web-src/src/components/ListItemAlbumSpotify.vue | 2 +- web-src/src/components/ListItemArtistSpotify.vue | 2 +- web-src/src/components/ListItemPlaylistSpotify.vue | 2 +- web-src/src/components/ListItemQueueItem.vue | 10 +++++----- web-src/src/components/ListItemTrackSpotify.vue | 6 +++++- web-src/src/components/ListPlaylists.vue | 2 +- web-src/src/components/ListTracks.vue | 8 ++++---- web-src/src/components/ModalDialog.vue | 13 +++++-------- web-src/src/components/ModalDialogAlbum.vue | 8 ++++---- web-src/src/components/ModalDialogAlbumSpotify.vue | 2 +- web-src/src/components/ModalDialogArtist.vue | 2 +- web-src/src/components/ModalDialogArtistSpotify.vue | 2 +- web-src/src/components/ModalDialogComposer.vue | 2 +- web-src/src/components/ModalDialogDirectory.vue | 2 +- web-src/src/components/ModalDialogGenre.vue | 6 +++++- web-src/src/components/ModalDialogPlaylist.vue | 6 +++++- .../src/components/ModalDialogPlaylistSpotify.vue | 2 +- web-src/src/components/ModalDialogQueueItem.vue | 2 +- web-src/src/components/ModalDialogTrack.vue | 2 +- web-src/src/components/ModalDialogTrackSpotify.vue | 6 +++++- web-src/src/components/NavbarItemLink.vue | 2 +- web-src/src/components/NavbarItemOutput.vue | 6 +++--- web-src/src/components/PlayerButtonSeekBack.vue | 7 ++----- web-src/src/components/PlayerButtonSeekForward.vue | 7 ++----- web-src/src/components/SettingsCheckbox.vue | 9 ++++++--- web-src/src/components/SettingsIntfield.vue | 8 ++++---- web-src/src/components/SettingsTextfield.vue | 8 ++++---- web-src/src/components/TabsSearch.vue | 2 +- 37 files changed, 109 insertions(+), 76 deletions(-) diff --git a/web-src/src/components/ControlDropdown.vue b/web-src/src/components/ControlDropdown.vue index ed95c248..54f9502a 100644 --- a/web-src/src/components/ControlDropdown.vue +++ b/web-src/src/components/ControlDropdown.vue @@ -33,7 +33,10 @@ diff --git a/web-src/src/components/ListAlbums.vue b/web-src/src/components/ListAlbums.vue index d9639abd..0fac30f9 100644 --- a/web-src/src/components/ListAlbums.vue +++ b/web-src/src/components/ListAlbums.vue @@ -77,7 +77,11 @@ import webapi from '@/webapi' export default { name: 'ListAlbums', components: { CoverArtwork, ModalDialog, ModalDialogAlbum }, - props: { albums: Object, media_kind: String, hide_group_title: Boolean }, + props: { + albums: { required: true, type: Object }, + hide_group_title: Boolean, + media_kind: { default: '', type: String } + }, emits: ['play-count-changed', 'podcast-deleted'], data() { diff --git a/web-src/src/components/ListArtists.vue b/web-src/src/components/ListArtists.vue index d6eac955..bc63168a 100644 --- a/web-src/src/components/ListArtists.vue +++ b/web-src/src/components/ListArtists.vue @@ -39,7 +39,10 @@ import ModalDialogArtist from '@/components/ModalDialogArtist.vue' export default { name: 'ListArtists', components: { ModalDialogArtist }, - props: { artists: Object, hide_group_title: Boolean }, + props: { + artists: { required: true, type: Object }, + hide_group_title: Boolean + }, data() { return { diff --git a/web-src/src/components/ListComposers.vue b/web-src/src/components/ListComposers.vue index 0edb7b0e..23c63670 100644 --- a/web-src/src/components/ListComposers.vue +++ b/web-src/src/components/ListComposers.vue @@ -40,7 +40,11 @@ import ModalDialogComposer from '@/components/ModalDialogComposer.vue' export default { name: 'ListComposers', components: { ModalDialogComposer }, - props: { composers: Object, media_kind: String, hide_group_title: Boolean }, + props: { + composers: { required: true, type: Object }, + hide_group_title: Boolean, + media_kind: { required: true, type: String } + }, data() { return { diff --git a/web-src/src/components/ListDirectories.vue b/web-src/src/components/ListDirectories.vue index 9f78ccea..c1d2a30d 100644 --- a/web-src/src/components/ListDirectories.vue +++ b/web-src/src/components/ListDirectories.vue @@ -48,7 +48,7 @@ import ModalDialogDirectory from '@/components/ModalDialogDirectory.vue' export default { name: 'ListDirectories', components: { ModalDialogDirectory }, - props: { directories: Array }, + props: { directories: { required: true, type: Array } }, data() { return { diff --git a/web-src/src/components/ListGenres.vue b/web-src/src/components/ListGenres.vue index ec7d66ff..3ce3eec3 100644 --- a/web-src/src/components/ListGenres.vue +++ b/web-src/src/components/ListGenres.vue @@ -40,7 +40,11 @@ import ModalDialogGenre from '@/components/ModalDialogGenre.vue' export default { name: 'ListGenres', components: { ModalDialogGenre }, - props: { genres: Object, hide_group_title: Boolean, media_kind: String }, + props: { + genres: { required: true, type: Object }, + hide_group_title: Boolean, + media_kind: { required: true, type: String } + }, data() { return { diff --git a/web-src/src/components/ListItemAlbumSpotify.vue b/web-src/src/components/ListItemAlbumSpotify.vue index 71970a15..93d7f13b 100644 --- a/web-src/src/components/ListItemAlbumSpotify.vue +++ b/web-src/src/components/ListItemAlbumSpotify.vue @@ -25,7 +25,7 @@ diff --git a/web-src/src/components/ListItemArtistSpotify.vue b/web-src/src/components/ListItemArtistSpotify.vue index bacc289c..97031921 100644 --- a/web-src/src/components/ListItemArtistSpotify.vue +++ b/web-src/src/components/ListItemArtistSpotify.vue @@ -12,7 +12,7 @@