refactor: removed 1.x client files

This commit is contained in:
NGPixel
2018-02-03 16:48:25 -05:00
parent 30ce9c8670
commit 23a6be1219
56 changed files with 307 additions and 2856 deletions

View File

@@ -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
}
})

View File

@@ -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 })
}
}
}

View File

@@ -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) }
}
}

View File

@@ -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) }
}
}

View File

@@ -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) }
}
}

View File

@@ -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')
}
}
}

View File

@@ -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) }
}
}

View File

@@ -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) }
}
}

View File

@@ -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) }
}
}

View File

@@ -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) }
}
}

View File

@@ -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) }
}
}

View File

@@ -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) }
}
}

View File

@@ -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) }
}
}

View File

@@ -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) }
}
}

View File

@@ -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) }
}
}