wikijs-fork/client/components/editor.vue

53 lines
1.2 KiB
Vue
Raw Normal View History

2018-02-11 05:20:17 +00:00
<template lang="pug">
.editor
editor-code
component(:is='currentModal')
v-dialog(v-model='dialogProgress', persistent, max-width='300')
v-card
v-progress-linear.my-0(indeterminate, color='primary', height='5')
v-card-text.text-xs-center
.headline Saving
.caption Please wait...
2018-02-11 05:20:17 +00:00
</template>
<script>
import _ from 'lodash'
2018-02-11 05:20:17 +00:00
export default {
components: {
editorCode: () => import(/* webpackChunkName: "editor-code" */ './editor-code.vue'),
2018-02-28 05:54:09 +00:00
editorModalAccess: () => import(/* webpackChunkName: "editor" */ './editor-modal-access.vue'),
editorModalProperties: () => import(/* webpackChunkName: "editor" */ './editor-modal-properties.vue')
},
data() {
return {
currentModal: '',
dialogProgress: false
}
},
methods: {
openModal(name) {
this.currentModal = `editorModal${_.startCase(name)}`
},
closeModal() {
_.delay(() => {
this.currentModal = ``
}, 500)
},
showProgressDialog(textKey) {
this.dialogProgress = true
},
hideProgressDialog() {
this.dialogProgress = false
},
save() {
this.showProgressDialog('saving')
}
2018-02-11 05:20:17 +00:00
}
}
</script>
<style lang='scss'>
</style>