mirror of https://github.com/Requarks/wiki.git
NGPixel
7 years ago
16 changed files with 163 additions and 117 deletions
Split View
Diff Options
-
15client/js/app.js
-
2client/js/components/anchor.vue
-
33client/js/components/modal-create-page.vue
-
0client/js/components/modal-create-user.vue
-
4client/js/components/page-loader.js
-
33client/js/pages/content-view.component.js
-
27client/js/pages/source-view.component.js
-
26client/js/pages/source.component.js
-
6client/js/store/index.js
-
0client/js/store/modules/modal-create-page.js
-
15client/js/store/modules/modal-create-user.js
-
37fuse.js
-
11package.json
-
3server/views/pages/view.pug
-
15server/views/pages/welcome.pug
-
53yarn.lock
@ -1,13 +1,13 @@ |
|||
'use strict' |
|||
|
|||
import $ from 'jquery' |
|||
import _ from 'lodash' |
|||
import delay from 'lodash/delay' |
|||
|
|||
module.exports = { |
|||
|
|||
complete () { |
|||
$('#page-loader').addClass('is-loaded') |
|||
_.delay(() => { |
|||
delay(() => { |
|||
$('#page-loader').addClass('is-hidden') |
|||
}, 1100) |
|||
} |
|||
|
@ -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) } |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save