refactor: editor codeblock -> Vue component

This commit is contained in:
NGPixel
2017-05-28 14:34:50 -04:00
parent ebe288a5b2
commit f577a8134e
14 changed files with 295 additions and 303 deletions

View File

@@ -87,7 +87,10 @@ app.use(mw.security)
// ----------------------------------------
app.use(favicon(path.join(ROOTPATH, 'assets', 'favicon.ico')))
app.use(express.static(path.join(ROOTPATH, 'assets')))
app.use(express.static(path.join(ROOTPATH, 'assets'), {
index: false,
maxAge: '7d'
}))
// ----------------------------------------
// Passport Authentication

View File

@@ -9,7 +9,7 @@ block rootNavRight
a.button.is-outlined(v-on:click='$store.dispatch("modalDiscardPage/open")')
i.icon-cross
span= t('nav.discard')
a.button(v-on:click='$root.$emit("editor-save")')
a.button(v-on:click='$root.$emit("editor/save")')
i.icon-check
span= t('nav.savechanges')
@@ -18,5 +18,6 @@ block content
.editor-area
textarea(ref='editorTextArea')= pageData.markdown
editor-codeblock
modal-discard-page(mode='edit', current-path=pageData.meta.path)
page-loader(text=t('loading.editor'))