|
@@ -144,6 +144,22 @@ export default {
|
|
|
type: Number,
|
|
|
default: 0
|
|
|
},
|
|
|
+ minTocLevel: {
|
|
|
+ type: Number,
|
|
|
+ default: 0
|
|
|
+ },
|
|
|
+ tocLevel: {
|
|
|
+ type: Number,
|
|
|
+ default: 1
|
|
|
+ },
|
|
|
+ tocCollapseLevel: {
|
|
|
+ type: Number,
|
|
|
+ default: 0
|
|
|
+ },
|
|
|
+ doUseTocDefault: {
|
|
|
+ type: Boolean,
|
|
|
+ default: true
|
|
|
+ },
|
|
|
checkoutDate: {
|
|
|
type: String,
|
|
|
default: new Date().toISOString()
|
|
@@ -190,6 +206,10 @@ export default {
|
|
|
this.path !== this.$store.get('page/path'),
|
|
|
this.savedState.title !== this.$store.get('page/title'),
|
|
|
this.savedState.description !== this.$store.get('page/description'),
|
|
|
+ this.savedState.minTocLevel !== this.$store.get('page/minTocLevel'),
|
|
|
+ this.savedState.tocLevel !== this.$store.get('page/tocLevel'),
|
|
|
+ this.savedState.tocCollapseLevel !== this.$store.get('page/tocCollapseLevel'),
|
|
|
+ this.savedState.doUseTocDefault !== this.$store.get('page/doUseTocDefault'),
|
|
|
this.savedState.tags !== this.$store.get('page/tags'),
|
|
|
this.savedState.isPublished !== this.$store.get('page/isPublished'),
|
|
|
this.savedState.publishStartDate !== this.$store.get('page/publishStartDate'),
|
|
@@ -223,7 +243,10 @@ export default {
|
|
|
this.$store.set('page/title', this.title)
|
|
|
this.$store.set('page/scriptCss', this.scriptCss)
|
|
|
this.$store.set('page/scriptJs', this.scriptJs)
|
|
|
-
|
|
|
+ this.$store.set('page/minTocLevel', this.minTocLevel)
|
|
|
+ this.$store.set('page/tocLevel', this.tocLevel)
|
|
|
+ this.$store.set('page/tocCollapseLevel', this.tocCollapseLevel)
|
|
|
+ this.$store.set('page/doUseTocDefault', this.doUseTocDefault)
|
|
|
this.$store.set('page/mode', 'edit')
|
|
|
|
|
|
this.setCurrentSavedState()
|
|
@@ -303,6 +326,10 @@ export default {
|
|
|
$publishStartDate: Date
|
|
|
$scriptCss: String
|
|
|
$scriptJs: String
|
|
|
+ $minTocLevel: Int!
|
|
|
+ $tocLevel: Int!
|
|
|
+ $tocCollapseLevel: Int!
|
|
|
+ $doUseTocDefault: Boolean!
|
|
|
$tags: [String]!
|
|
|
$title: String!
|
|
|
) {
|
|
@@ -319,6 +346,10 @@ export default {
|
|
|
publishStartDate: $publishStartDate
|
|
|
scriptCss: $scriptCss
|
|
|
scriptJs: $scriptJs
|
|
|
+ minTocLevel: $minTocLevel
|
|
|
+ tocLevel: $tocLevel
|
|
|
+ tocCollapseLevel: $tocCollapseLevel
|
|
|
+ doUseTocDefault: $doUseTocDefault
|
|
|
tags: $tags
|
|
|
title: $title
|
|
|
) {
|
|
@@ -348,6 +379,10 @@ export default {
|
|
|
publishStartDate: this.$store.get('page/publishStartDate') || '',
|
|
|
scriptCss: this.$store.get('page/scriptCss'),
|
|
|
scriptJs: this.$store.get('page/scriptJs'),
|
|
|
+ minTocLevel: this.$store.get('page/minTocLevel'),
|
|
|
+ tocLevel: this.$store.get('page/tocLevel'),
|
|
|
+ tocCollapseLevel: this.$store.get('page/tocCollapseLevel'),
|
|
|
+ doUseTocDefault: this.$store.get('page/doUseTocDefault'),
|
|
|
tags: this.$store.get('page/tags'),
|
|
|
title: this.$store.get('page/title')
|
|
|
}
|
|
@@ -391,7 +426,6 @@ export default {
|
|
|
this.$root.$emit('saveConflict')
|
|
|
throw new Error(this.$t('editor:conflict.warning'))
|
|
|
}
|
|
|
-
|
|
|
let resp = await this.$apollo.mutate({
|
|
|
mutation: gql`
|
|
|
mutation (
|
|
@@ -407,6 +441,10 @@ export default {
|
|
|
$publishStartDate: Date
|
|
|
$scriptCss: String
|
|
|
$scriptJs: String
|
|
|
+ $minTocLevel: Int
|
|
|
+ $tocLevel: Int
|
|
|
+ $tocCollapseLevel: Int
|
|
|
+ $doUseTocDefault: Boolean
|
|
|
$tags: [String]
|
|
|
$title: String
|
|
|
) {
|
|
@@ -424,6 +462,10 @@ export default {
|
|
|
publishStartDate: $publishStartDate
|
|
|
scriptCss: $scriptCss
|
|
|
scriptJs: $scriptJs
|
|
|
+ minTocLevel: $minTocLevel
|
|
|
+ tocLevel: $tocLevel
|
|
|
+ tocCollapseLevel: $tocCollapseLevel
|
|
|
+ doUseTocDefault: $doUseTocDefault
|
|
|
tags: $tags
|
|
|
title: $title
|
|
|
) {
|
|
@@ -453,6 +495,10 @@ export default {
|
|
|
publishStartDate: this.$store.get('page/publishStartDate') || '',
|
|
|
scriptCss: this.$store.get('page/scriptCss'),
|
|
|
scriptJs: this.$store.get('page/scriptJs'),
|
|
|
+ minTocLevel: this.$store.get('page/minTocLevel'),
|
|
|
+ tocLevel: this.$store.get('page/tocLevel'),
|
|
|
+ tocCollapseLevel: this.$store.get('page/tocCollapseLevel'),
|
|
|
+ doUseTocDefault: this.$store.get('page/doUseTocDefault'),
|
|
|
tags: this.$store.get('page/tags'),
|
|
|
title: this.$store.get('page/title')
|
|
|
}
|
|
@@ -535,7 +581,11 @@ export default {
|
|
|
tags: this.$store.get('page/tags'),
|
|
|
title: this.$store.get('page/title'),
|
|
|
css: this.$store.get('page/scriptCss'),
|
|
|
- js: this.$store.get('page/scriptJs')
|
|
|
+ js: this.$store.get('page/scriptJs'),
|
|
|
+ minTocLevel: this.$store.get('page/minTocLevel'),
|
|
|
+ tocLevel: this.$store.get('page/tocLevel'),
|
|
|
+ tocCollapseLevel: this.$store.get('page/tocCollapseLevel'),
|
|
|
+ doUseTocDefault: this.$store.get('page/doUseTocDefault')
|
|
|
}
|
|
|
},
|
|
|
injectCustomCss: _.debounce(css => {
|