Add dropown

This commit is contained in:
mfcar 2023-02-22 19:18:42 +00:00
parent 9a51c3be0f
commit f4ec6948d2
No known key found for this signature in database
2 changed files with 15 additions and 4 deletions

View File

@ -31,6 +31,11 @@
<div class="p-2 w-full"> <div class="p-2 w-full">
<ui-textarea-with-label v-model="podcast.description" :label="$strings.LabelDescription" :rows="3" /> <ui-textarea-with-label v-model="podcast.description" :label="$strings.LabelDescription" :rows="3" />
</div> </div>
<div class="flex flex-wrap">
<div class="w-full md:w-1/2 p-2">
<ui-dropdown :label="$strings.LabelPodcastType" v-model="podcast.type" :items="podcastTypes" small />
</div>
</div>
<div class="flex flex-wrap"> <div class="flex flex-wrap">
<div class="w-full md:w-1/2 p-2"> <div class="w-full md:w-1/2 p-2">
<ui-dropdown v-model="selectedFolderId" :items="folderItems" :disabled="processing" :label="$strings.LabelFolder" @input="folderUpdated" /> <ui-dropdown v-model="selectedFolderId" :items="folderItems" :disabled="processing" :label="$strings.LabelFolder" @input="folderUpdated" />
@ -82,7 +87,8 @@ export default {
itunesPageUrl: '', itunesPageUrl: '',
itunesId: '', itunesId: '',
itunesArtistId: '', itunesArtistId: '',
autoDownloadEpisodes: false autoDownloadEpisodes: false,
type: ''
} }
} }
}, },
@ -140,6 +146,9 @@ export default {
selectedFolderPath() { selectedFolderPath() {
if (!this.selectedFolder) return '' if (!this.selectedFolder) return ''
return this.selectedFolder.fullPath return this.selectedFolder.fullPath
},
podcastTypes() {
return this.$store.state.globals.podcastTypes || []
} }
}, },
methods: { methods: {
@ -170,7 +179,8 @@ export default {
itunesPageUrl: this.podcast.itunesPageUrl, itunesPageUrl: this.podcast.itunesPageUrl,
itunesId: this.podcast.itunesId, itunesId: this.podcast.itunesId,
itunesArtistId: this.podcast.itunesArtistId, itunesArtistId: this.podcast.itunesArtistId,
language: this.podcast.language language: this.podcast.language,
type: this.podcast.type
}, },
autoDownloadEpisodes: this.podcast.autoDownloadEpisodes autoDownloadEpisodes: this.podcast.autoDownloadEpisodes
} }
@ -207,6 +217,7 @@ export default {
this.podcast.itunesArtistId = this._podcastData.artistId || '' this.podcast.itunesArtistId = this._podcastData.artistId || ''
this.podcast.language = this._podcastData.language || '' this.podcast.language = this._podcastData.language || ''
this.podcast.autoDownloadEpisodes = false this.podcast.autoDownloadEpisodes = false
this.podcast.type = this._podcastData.type || this.feedMetadata.type || 'episodic'
if (this.folderItems[0]) { if (this.folderItems[0]) {
this.selectedFolderId = this.folderItems[0].value this.selectedFolderId = this.folderItems[0].value

View File

@ -102,7 +102,7 @@ export default {
}, },
podcastTypes() { podcastTypes() {
return this.$store.state.globals.podcastTypes || [] return this.$store.state.globals.podcastTypes || []
}, }
}, },
methods: { methods: {
getDetails() { getDetails() {