mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-05 02:34:56 +02:00
Update:Creating user playlists modal
This commit is contained in:
parent
f9b87b94bf
commit
1131bfa751
7 changed files with 312 additions and 3 deletions
|
@ -4,12 +4,14 @@ export const state = () => ({
|
|||
showBatchCollectionModal: false,
|
||||
showCollectionsModal: false,
|
||||
showEditCollectionModal: false,
|
||||
showPlaylistsModal: false,
|
||||
showEditPodcastEpisode: false,
|
||||
showViewPodcastEpisodeModal: false,
|
||||
showConfirmPrompt: false,
|
||||
confirmPromptOptions: null,
|
||||
showEditAuthorModal: false,
|
||||
selectedEpisode: null,
|
||||
selectedPlaylistItems: null,
|
||||
selectedCollection: null,
|
||||
selectedAuthor: null,
|
||||
isCasting: false, // Actively casting
|
||||
|
@ -79,6 +81,9 @@ export const mutations = {
|
|||
setShowEditCollectionModal(state, val) {
|
||||
state.showEditCollectionModal = val
|
||||
},
|
||||
setShowPlaylistsModal(state, val) {
|
||||
state.showPlaylistsModal = val
|
||||
},
|
||||
setShowEditPodcastEpisodeModal(state, val) {
|
||||
state.showEditPodcastEpisode = val
|
||||
},
|
||||
|
@ -99,6 +104,9 @@ export const mutations = {
|
|||
setSelectedEpisode(state, episode) {
|
||||
state.selectedEpisode = episode
|
||||
},
|
||||
setSelectedPlaylistItems(state, items) {
|
||||
state.selectedPlaylistItems = items
|
||||
},
|
||||
showEditAuthorModal(state, author) {
|
||||
state.selectedAuthor = author
|
||||
state.showEditAuthorModal = true
|
||||
|
|
|
@ -9,7 +9,8 @@ export const state = () => ({
|
|||
collapseSeries: false,
|
||||
collapseBookSeries: false
|
||||
},
|
||||
settingsListeners: []
|
||||
settingsListeners: [],
|
||||
playlists: []
|
||||
})
|
||||
|
||||
export const getters = {
|
||||
|
@ -163,5 +164,19 @@ export const mutations = {
|
|||
},
|
||||
removeSettingsListener(state, listenerId) {
|
||||
state.settingsListeners = state.settingsListeners.filter(l => l.id !== listenerId)
|
||||
},
|
||||
setPlaylists(state, playlists) {
|
||||
state.playlists = playlists
|
||||
},
|
||||
addUpdatePlaylist(state, playlist) {
|
||||
const indexOf = state.playlists.findIndex(p => p.id == playlist.id)
|
||||
if (indexOf >= 0) {
|
||||
state.playlists.splice(indexOf, 1, playlist)
|
||||
} else {
|
||||
state.playlists.push(playlist)
|
||||
}
|
||||
},
|
||||
removePlaylist(state, playlist) {
|
||||
state.playlists = state.playlists.filter(p => p.id !== playlist.id)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue