mirror of https://github.com/FreeTubeApp/FreeTube
44 lines
933 B
JavaScript
44 lines
933 B
JavaScript
import { MAIN_PROFILE_ID } from '../../../constants'
|
|
|
|
const state = {
|
|
allSubscriptionsList: [],
|
|
profileSubscriptions: {
|
|
activeProfile: MAIN_PROFILE_ID,
|
|
videoList: []
|
|
}
|
|
}
|
|
|
|
const getters = {
|
|
getAllSubscriptionsList: () => {
|
|
return state.allSubscriptionsList
|
|
},
|
|
getProfileSubscriptions: () => {
|
|
return state.profileSubscriptions
|
|
}
|
|
}
|
|
|
|
const actions = {
|
|
updateAllSubscriptionsList ({ commit }, subscriptions) {
|
|
commit('setAllSubscriptionsList', subscriptions)
|
|
},
|
|
updateProfileSubscriptions ({ commit }, subscriptions) {
|
|
commit('setProfileSubscriptions', subscriptions)
|
|
}
|
|
}
|
|
|
|
const mutations = {
|
|
setAllSubscriptionsList (state, allSubscriptionsList) {
|
|
state.allSubscriptionsList = allSubscriptionsList
|
|
},
|
|
setProfileSubscriptions (state, profileSubscriptions) {
|
|
state.profileSubscriptions = profileSubscriptions
|
|
}
|
|
}
|
|
|
|
export default {
|
|
state,
|
|
getters,
|
|
actions,
|
|
mutations
|
|
}
|