Merge RSS feed modals into a universal one

This commit is contained in:
advplyr 2022-12-31 15:26:37 -06:00
parent ca6765c8e7
commit a364fe5031
6 changed files with 46 additions and 193 deletions

View file

@ -21,7 +21,7 @@
<!-- RSS feed -->
<ui-tooltip v-if="rssFeed" :text="$strings.LabelOpenRSSFeed" direction="top">
<ui-icon-btn icon="rss_feed" class="mx-0.5" :bg-color="rssFeed ? 'success' : 'primary'" outlined @click="clickRSSFeed" />
<ui-icon-btn icon="rss_feed" class="mx-0.5" :bg-color="rssFeed ? 'success' : 'primary'" outlined @click="showRSSFeedModal" />
</ui-tooltip>
<button type="button" class="h-9 w-9 flex items-center justify-center shadow-sm pl-3 pr-3 text-left focus:outline-none cursor-pointer text-gray-100 hover:text-gray-200 rounded-full hover:bg-white/5 mx-px" @click.stop.prevent="editClick">
@ -42,8 +42,6 @@
<div v-show="processing" class="absolute top-0 left-0 w-full h-full z-10 bg-black bg-opacity-40 flex items-center justify-center">
<ui-loading-indicator />
</div>
<modals-rssfeed-collection-modal v-model="showRssFeedModal" :collection="collection" :feed="rssFeed" />
</div>
</template>
@ -74,8 +72,7 @@ export default {
},
data() {
return {
processing: false,
showRssFeedModal: false
processing: false
}
},
computed: {
@ -140,8 +137,13 @@ export default {
}
},
methods: {
clickRSSFeed() {
this.showRssFeedModal = true
showRSSFeedModal() {
this.$store.commit('globals/setRSSFeedOpenCloseModal', {
id: this.collectionId,
name: this.collectionName,
type: 'collection',
feed: this.rssFeed
})
},
contextMenuAction(action) {
if (action === 'delete') {
@ -149,7 +151,7 @@ export default {
} else if (action === 'create-playlist') {
this.createPlaylistFromCollection()
} else if (action === 'open-rss-feed') {
this.showRssFeedModal = true
this.showRSSFeedModal()
}
},
createPlaylistFromCollection() {