frontends tab initial implementation, now you can (re)install frontends! yay!
This commit is contained in:
parent
3ac67ab727
commit
7bb28bb23c
9 changed files with 229 additions and 10 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { set, get, cloneDeep, differenceWith, isEqual, flatten } from 'lodash'
|
||||
|
||||
export const defaultState = {
|
||||
frontends: [],
|
||||
loaded: false,
|
||||
needsReboot: null,
|
||||
config: null,
|
||||
|
|
@ -23,6 +24,16 @@ const adminSettingsStorage = {
|
|||
state.loaded = false
|
||||
state.dbConfigEnabled = false
|
||||
},
|
||||
setAvailableFrontends (state, { frontends }) {
|
||||
state.frontends = frontends.map(f => {
|
||||
if (f.name === 'pleroma-fe') {
|
||||
f.refs = ['master', 'develop']
|
||||
} else {
|
||||
f.refs = [f.ref]
|
||||
}
|
||||
return f
|
||||
})
|
||||
},
|
||||
updateAdminSettings (state, { config, modifiedPaths }) {
|
||||
state.loaded = true
|
||||
state.dbConfigEnabled = true
|
||||
|
|
@ -48,6 +59,10 @@ const adminSettingsStorage = {
|
|||
}
|
||||
},
|
||||
actions: {
|
||||
loadFrontendsStuff ({ state, rootState, dispatch, commit }) {
|
||||
rootState.api.backendInteractor.fetchAvailableFrontends()
|
||||
.then(frontends => commit('setAvailableFrontends', { frontends }))
|
||||
},
|
||||
loadAdminStuff ({ state, rootState, dispatch, commit }) {
|
||||
rootState.api.backendInteractor.fetchInstanceDBConfig()
|
||||
.then(backendDbConfig => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue