Add:RSS feed icon over library item covers when feed is open #893

This commit is contained in:
advplyr 2022-08-05 19:23:18 -05:00
parent 2cb4f972d7
commit 24a142e718
9 changed files with 59 additions and 21 deletions

28
client/store/feeds.js Normal file
View file

@ -0,0 +1,28 @@
export const state = () => ({
feeds: []
})
export const getters = {
getFeedForItem: state => id => {
return state.feeds.find(feed => feed.id === id)
}
}
export const actions = {
}
export const mutations = {
addFeed(state, feed) {
var index = state.feeds.findIndex(f => f.id === feed.id)
if (index >= 0) state.feeds.splice(index, 1, feed)
else state.feeds.push(feed)
},
removeFeed(state, feed) {
state.feeds = state.feeds.filter(f => f.id !== feed.id)
},
setFeeds(state, feeds) {
state.feeds = feeds || []
}
}