refactor: removed 1.x client files
This commit is contained in:
@@ -1,21 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
import anchor from './modules/anchor'
|
||||
import editor from './modules/editor'
|
||||
import editorCodeblock from './modules/editor-codeblock'
|
||||
import editorFile from './modules/editor-file'
|
||||
import editorVideo from './modules/editor-video'
|
||||
import modalCreatePage from './modules/modal-create-page'
|
||||
import modalCreateUser from './modules/modal-create-user'
|
||||
import modalDeleteUser from './modules/modal-delete-user'
|
||||
import modalDeletePage from './modules/modal-delete-page'
|
||||
import modalDiscardPage from './modules/modal-discard-page'
|
||||
import modalMovePage from './modules/modal-move-page'
|
||||
import modalProfile2fa from './modules/modal-profile-2fa'
|
||||
import modalUpgradeSystem from './modules/modal-upgrade-system'
|
||||
import navigator from './modules/navigator'
|
||||
import pageLoader from './modules/page-loader'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
@@ -33,20 +19,6 @@ export default new Vuex.Store({
|
||||
},
|
||||
getters: {},
|
||||
modules: {
|
||||
anchor,
|
||||
editor,
|
||||
editorCodeblock,
|
||||
editorFile,
|
||||
editorVideo,
|
||||
modalCreatePage,
|
||||
modalCreateUser,
|
||||
modalDeletePage,
|
||||
modalDeleteUser,
|
||||
modalDiscardPage,
|
||||
modalMovePage,
|
||||
modalProfile2fa,
|
||||
modalUpgradeSystem,
|
||||
navigator,
|
||||
pageLoader
|
||||
navigator
|
||||
}
|
||||
})
|
||||
|
@@ -1,22 +0,0 @@
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false,
|
||||
hash: ''
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
anchorChange: (state, opts) => {
|
||||
state.shown = (opts.shown === true)
|
||||
state.hash = opts.hash || ''
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
open({ commit }, hash) {
|
||||
commit('anchorChange', { shown: true, hash })
|
||||
},
|
||||
close({ commit }) {
|
||||
commit('anchorChange', { shown: false })
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
/* global wikijs */
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false,
|
||||
content: ''
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState },
|
||||
contentChange: (state, newContent) => { state.content = newContent }
|
||||
},
|
||||
actions: {
|
||||
open({ commit }, opts) {
|
||||
commit('shownChange', true)
|
||||
commit('contentChange', opts.initialContent || '')
|
||||
wikijs.$emit('editorCodeblock/init')
|
||||
},
|
||||
close({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
/* global wikijs */
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false,
|
||||
mode: 'image'
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState },
|
||||
modeChange: (state, modeState) => { state.mode = modeState }
|
||||
},
|
||||
actions: {
|
||||
open({ commit }, opts) {
|
||||
commit('shownChange', true)
|
||||
commit('modeChange', opts.mode)
|
||||
wikijs.$emit('editorFile/init')
|
||||
},
|
||||
close({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
@@ -1,19 +0,0 @@
|
||||
/* global wikijs */
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState }
|
||||
},
|
||||
actions: {
|
||||
open({ commit }) {
|
||||
commit('shownChange', true)
|
||||
wikijs.$emit('editorVideo/init')
|
||||
},
|
||||
close({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
/* global wikijs */
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
busy: false,
|
||||
insertContent: ''
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
busyChange: (state, busyState) => { state.shown = busyState },
|
||||
insertContentChange: (state, newContent) => { state.insertContent = newContent }
|
||||
},
|
||||
actions: {
|
||||
busyStart({ commit }) { commit('busyChange', true) },
|
||||
busyStop({ commit }) { commit('busyChange', false) },
|
||||
insert({ commit }, content) {
|
||||
commit('insertContentChange', content)
|
||||
wikijs.$emit('editor/insert')
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState }
|
||||
},
|
||||
actions: {
|
||||
open({ commit }) { commit('shownChange', true) },
|
||||
close({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
@@ -1,19 +0,0 @@
|
||||
/* global wikijs */
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState }
|
||||
},
|
||||
actions: {
|
||||
open({ commit }) {
|
||||
commit('shownChange', true)
|
||||
wikijs.$emit('modalCreateUser/init')
|
||||
},
|
||||
close({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState }
|
||||
},
|
||||
actions: {
|
||||
open({ commit }) { commit('shownChange', true) },
|
||||
close({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState }
|
||||
},
|
||||
actions: {
|
||||
open({ commit }) { commit('shownChange', true) },
|
||||
close({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState }
|
||||
},
|
||||
actions: {
|
||||
open({ commit }) { commit('shownChange', true) },
|
||||
close({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState }
|
||||
},
|
||||
actions: {
|
||||
open({ commit }) { commit('shownChange', true) },
|
||||
close({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
@@ -1,19 +0,0 @@
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false,
|
||||
step: 'confirm'
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState },
|
||||
stepChange: (state, stepState) => { state.step = stepState }
|
||||
},
|
||||
actions: {
|
||||
open({ commit }, opts) {
|
||||
commit('shownChange', true)
|
||||
commit('stepChange', 'confirm')
|
||||
},
|
||||
close({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: false,
|
||||
mode: 'upgrade',
|
||||
step: 'confirm'
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState },
|
||||
modeChange: (state, modeState) => { state.mode = modeState },
|
||||
stepChange: (state, stepState) => { state.step = stepState }
|
||||
},
|
||||
actions: {
|
||||
open({ commit }, opts) {
|
||||
commit('shownChange', true)
|
||||
commit('modeChange', opts.mode)
|
||||
commit('stepChange', 'confirm')
|
||||
},
|
||||
close({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
@@ -1,15 +0,0 @@
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
shown: true,
|
||||
msg: 'Loading...'
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState },
|
||||
msgChange: (state, newText) => { state.msg = newText }
|
||||
},
|
||||
actions: {
|
||||
complete({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user