feat: save page + create event for storage targets

This commit is contained in:
NGPixel
2018-07-22 16:25:39 -04:00
parent cb84df7a53
commit 076e923d48
22 changed files with 158 additions and 89 deletions

View File

@@ -12,10 +12,15 @@
v-divider.mt-3
v-subheader {{ $t('admin:contribute.fundOurWork') }}
.body-1.pl-3 {{ $t('admin:contribute.openCollective') }}
v-card-actions.mt-3.ml-2
v-card-actions.ml-2
v-btn(depressed, color='primary', href='https://opencollective.com/wikijs')
v-icon(left) local_atm
span {{ $t('admin:contribute.makeADonation') }}
.body-1.mt-3.pl-3 {{ $t('admin:contribute.tshirts') }}
v-card-actions.ml-2
v-btn(depressed, color='primary', href='https://wikijs.threadless.com')
v-icon(left) shopping_cart
span {{ $t('admin:contribute.shop') }}
v-divider.mt-3
v-subheader {{ $t('admin:contribute.contribute') }}
.body-1.pl-3

View File

@@ -94,9 +94,11 @@ export default {
const resp = await this.$apollo.mutate({
mutation: createPageMutation,
variables: {
content: this.$store.get('editor/content'),
description: this.$store.get('editor/description'),
editor: 'markdown',
locale: this.$store.get('editor/locale'),
isPrivate: false,
isPublished: this.$store.get('editor/isPublished'),
path: this.$store.get('editor/path'),
publishEndDate: this.$store.get('editor/publishEndDate'),

View File

@@ -220,6 +220,7 @@ export default {
},
onCmInput: _.debounce(function (newContent) {
linesMap = []
this.$store.set('editor/content', newContent)
this.previewHTML = md.render(newContent)
this.$nextTick(() => {
Prism.highlightAllUnder(this.$refs.editorPreview)