mirror of https://github.com/requarks/wiki
parent
6b47064ccc
commit
dc0e2fac41
@ -0,0 +1,27 @@
|
||||
'use strict'
|
||||
|
||||
/* global FuseBox */
|
||||
|
||||
import pageLoader from '../components/page-loader'
|
||||
|
||||
export default {
|
||||
name: 'source-view',
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {
|
||||
FuseBox.import('/js/ace/source-view.js', (ace) => {
|
||||
let scEditor = ace.edit('source-display')
|
||||
scEditor.setTheme('ace/theme/dawn')
|
||||
scEditor.getSession().setMode('ace/mode/markdown')
|
||||
scEditor.setOption('fontSize', '14px')
|
||||
scEditor.setOption('hScrollBarAlwaysVisible', false)
|
||||
scEditor.setOption('wrap', true)
|
||||
scEditor.setReadOnly(true)
|
||||
scEditor.renderer.updateFull()
|
||||
scEditor.renderer.on('afterRender', () => {
|
||||
pageLoader.complete()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
import * as ace from 'brace'
|
||||
import 'brace/theme/tomorrow_night'
|
||||
import 'brace/mode/markdown'
|
||||
import pageLoader from '../components/page-loader'
|
||||
|
||||
export default {
|
||||
name: 'source-view',
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {
|
||||
let scEditor = ace.edit('source-display')
|
||||
scEditor.setTheme('ace/theme/tomorrow_night')
|
||||
scEditor.getSession().setMode('ace/mode/markdown')
|
||||
scEditor.setOption('fontSize', '14px')
|
||||
scEditor.setOption('hScrollBarAlwaysVisible', false)
|
||||
scEditor.setOption('wrap', true)
|
||||
scEditor.setReadOnly(true)
|
||||
scEditor.renderer.updateFull()
|
||||
scEditor.renderer.on('afterRender', () => {
|
||||
pageLoader.complete()
|
||||
})
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
'use strict'
|
||||
|
||||
export default {
|
||||
state: {
|
||||
shown: false
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
shownChange: (state, shownState) => { state.shown = shownState }
|
||||
},
|
||||
actions: {
|
||||
adminUsersCreateOpen({ commit }) { commit('shownChange', true) },
|
||||
adminUsersCreateClose({ commit }) { commit('shownChange', false) }
|
||||
}
|
||||
}
|
Loading…
Reference in new issue