|
|
@ -144,21 +144,9 @@ export default {
|
|
|
|
type: Number,
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
default: 0
|
|
|
|
},
|
|
|
|
},
|
|
|
|
minTocLevel: {
|
|
|
|
tocOptions: {
|
|
|
|
type: Number,
|
|
|
|
type: String,
|
|
|
|
default: 0
|
|
|
|
default: ''
|
|
|
|
},
|
|
|
|
|
|
|
|
tocLevel: {
|
|
|
|
|
|
|
|
type: Number,
|
|
|
|
|
|
|
|
default: 1
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
tocCollapseLevel: {
|
|
|
|
|
|
|
|
type: Number,
|
|
|
|
|
|
|
|
default: 0
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
doUseTocDefault: {
|
|
|
|
|
|
|
|
type: Boolean,
|
|
|
|
|
|
|
|
default: true
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
checkoutDate: {
|
|
|
|
checkoutDate: {
|
|
|
|
type: String,
|
|
|
|
type: String,
|
|
|
@ -187,7 +175,9 @@ export default {
|
|
|
|
tags: '',
|
|
|
|
tags: '',
|
|
|
|
title: '',
|
|
|
|
title: '',
|
|
|
|
css: '',
|
|
|
|
css: '',
|
|
|
|
js: ''
|
|
|
|
js: '',
|
|
|
|
|
|
|
|
tocDepth: 0,
|
|
|
|
|
|
|
|
useDefaultTocDepth: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -206,10 +196,8 @@ export default {
|
|
|
|
this.path !== this.$store.get('page/path'),
|
|
|
|
this.path !== this.$store.get('page/path'),
|
|
|
|
this.savedState.title !== this.$store.get('page/title'),
|
|
|
|
this.savedState.title !== this.$store.get('page/title'),
|
|
|
|
this.savedState.description !== this.$store.get('page/description'),
|
|
|
|
this.savedState.description !== this.$store.get('page/description'),
|
|
|
|
this.savedState.minTocLevel !== this.$store.get('page/minTocLevel'),
|
|
|
|
this.savedState.tocDepth !== this.$store.get('page/tocDepth@min') + (this.$store.get('page/tocDepth@max') * 10),
|
|
|
|
this.savedState.tocLevel !== this.$store.get('page/tocLevel'),
|
|
|
|
this.savedState.useDefaultTocDepth !== this.$store.get('page/useDefaultTocDepth'),
|
|
|
|
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.tags !== this.$store.get('page/tags'),
|
|
|
|
this.savedState.isPublished !== this.$store.get('page/isPublished'),
|
|
|
|
this.savedState.isPublished !== this.$store.get('page/isPublished'),
|
|
|
|
this.savedState.publishStartDate !== this.$store.get('page/publishStartDate'),
|
|
|
|
this.savedState.publishStartDate !== this.$store.get('page/publishStartDate'),
|
|
|
@ -243,12 +231,15 @@ export default {
|
|
|
|
this.$store.set('page/title', this.title)
|
|
|
|
this.$store.set('page/title', this.title)
|
|
|
|
this.$store.set('page/scriptCss', this.scriptCss)
|
|
|
|
this.$store.set('page/scriptCss', this.scriptCss)
|
|
|
|
this.$store.set('page/scriptJs', this.scriptJs)
|
|
|
|
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.$store.set('page/mode', 'edit')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const tocOptions = JSON.parse(Buffer.from(this.tocOptions, 'base64').toString())
|
|
|
|
|
|
|
|
this.$store.set('page/tocDepth', {
|
|
|
|
|
|
|
|
min: tocOptions.min,
|
|
|
|
|
|
|
|
max: tocOptions.max
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.$store.set('page/useDefaultTocDepth', tocOptions.useDefault)
|
|
|
|
|
|
|
|
|
|
|
|
this.setCurrentSavedState()
|
|
|
|
this.setCurrentSavedState()
|
|
|
|
|
|
|
|
|
|
|
|
this.checkoutDateActive = this.checkoutDate
|
|
|
|
this.checkoutDateActive = this.checkoutDate
|
|
|
@ -326,10 +317,8 @@ export default {
|
|
|
|
$publishStartDate: Date
|
|
|
|
$publishStartDate: Date
|
|
|
|
$scriptCss: String
|
|
|
|
$scriptCss: String
|
|
|
|
$scriptJs: String
|
|
|
|
$scriptJs: String
|
|
|
|
$minTocLevel: Int!
|
|
|
|
$tocDepth: RangeInput
|
|
|
|
$tocLevel: Int!
|
|
|
|
$useDefaultTocDepth: Boolean
|
|
|
|
$tocCollapseLevel: Int!
|
|
|
|
|
|
|
|
$doUseTocDefault: Boolean!
|
|
|
|
|
|
|
|
$tags: [String]!
|
|
|
|
$tags: [String]!
|
|
|
|
$title: String!
|
|
|
|
$title: String!
|
|
|
|
) {
|
|
|
|
) {
|
|
|
@ -346,10 +335,8 @@ export default {
|
|
|
|
publishStartDate: $publishStartDate
|
|
|
|
publishStartDate: $publishStartDate
|
|
|
|
scriptCss: $scriptCss
|
|
|
|
scriptCss: $scriptCss
|
|
|
|
scriptJs: $scriptJs
|
|
|
|
scriptJs: $scriptJs
|
|
|
|
minTocLevel: $minTocLevel
|
|
|
|
tocDepth: $tocDepth
|
|
|
|
tocLevel: $tocLevel
|
|
|
|
useDefaultTocDepth: $useDefaultTocDepth
|
|
|
|
tocCollapseLevel: $tocCollapseLevel
|
|
|
|
|
|
|
|
doUseTocDefault: $doUseTocDefault
|
|
|
|
|
|
|
|
tags: $tags
|
|
|
|
tags: $tags
|
|
|
|
title: $title
|
|
|
|
title: $title
|
|
|
|
) {
|
|
|
|
) {
|
|
|
@ -379,10 +366,8 @@ export default {
|
|
|
|
publishStartDate: this.$store.get('page/publishStartDate') || '',
|
|
|
|
publishStartDate: this.$store.get('page/publishStartDate') || '',
|
|
|
|
scriptCss: this.$store.get('page/scriptCss'),
|
|
|
|
scriptCss: this.$store.get('page/scriptCss'),
|
|
|
|
scriptJs: this.$store.get('page/scriptJs'),
|
|
|
|
scriptJs: this.$store.get('page/scriptJs'),
|
|
|
|
minTocLevel: this.$store.get('page/minTocLevel'),
|
|
|
|
tocDepth: this.$store.get('page/tocDepth'),
|
|
|
|
tocLevel: this.$store.get('page/tocLevel'),
|
|
|
|
useDefaultTocDepth: this.$store.get('page/useDefaultTocDepth'),
|
|
|
|
tocCollapseLevel: this.$store.get('page/tocCollapseLevel'),
|
|
|
|
|
|
|
|
doUseTocDefault: this.$store.get('page/doUseTocDefault'),
|
|
|
|
|
|
|
|
tags: this.$store.get('page/tags'),
|
|
|
|
tags: this.$store.get('page/tags'),
|
|
|
|
title: this.$store.get('page/title')
|
|
|
|
title: this.$store.get('page/title')
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -441,10 +426,8 @@ export default {
|
|
|
|
$publishStartDate: Date
|
|
|
|
$publishStartDate: Date
|
|
|
|
$scriptCss: String
|
|
|
|
$scriptCss: String
|
|
|
|
$scriptJs: String
|
|
|
|
$scriptJs: String
|
|
|
|
$minTocLevel: Int
|
|
|
|
$tocDepth: RangeInput
|
|
|
|
$tocLevel: Int
|
|
|
|
$useDefaultTocDepth: Boolean
|
|
|
|
$tocCollapseLevel: Int
|
|
|
|
|
|
|
|
$doUseTocDefault: Boolean
|
|
|
|
|
|
|
|
$tags: [String]
|
|
|
|
$tags: [String]
|
|
|
|
$title: String
|
|
|
|
$title: String
|
|
|
|
) {
|
|
|
|
) {
|
|
|
@ -462,10 +445,8 @@ export default {
|
|
|
|
publishStartDate: $publishStartDate
|
|
|
|
publishStartDate: $publishStartDate
|
|
|
|
scriptCss: $scriptCss
|
|
|
|
scriptCss: $scriptCss
|
|
|
|
scriptJs: $scriptJs
|
|
|
|
scriptJs: $scriptJs
|
|
|
|
minTocLevel: $minTocLevel
|
|
|
|
tocDepth: $tocDepth
|
|
|
|
tocLevel: $tocLevel
|
|
|
|
useDefaultTocDepth: $useDefaultTocDepth
|
|
|
|
tocCollapseLevel: $tocCollapseLevel
|
|
|
|
|
|
|
|
doUseTocDefault: $doUseTocDefault
|
|
|
|
|
|
|
|
tags: $tags
|
|
|
|
tags: $tags
|
|
|
|
title: $title
|
|
|
|
title: $title
|
|
|
|
) {
|
|
|
|
) {
|
|
|
@ -495,10 +476,8 @@ export default {
|
|
|
|
publishStartDate: this.$store.get('page/publishStartDate') || '',
|
|
|
|
publishStartDate: this.$store.get('page/publishStartDate') || '',
|
|
|
|
scriptCss: this.$store.get('page/scriptCss'),
|
|
|
|
scriptCss: this.$store.get('page/scriptCss'),
|
|
|
|
scriptJs: this.$store.get('page/scriptJs'),
|
|
|
|
scriptJs: this.$store.get('page/scriptJs'),
|
|
|
|
minTocLevel: this.$store.get('page/minTocLevel'),
|
|
|
|
tocDepth: this.$store.get('page/tocDepth'),
|
|
|
|
tocLevel: this.$store.get('page/tocLevel'),
|
|
|
|
useDefaultTocDepth: this.$store.get('page/useDefaultTocDepth'),
|
|
|
|
tocCollapseLevel: this.$store.get('page/tocCollapseLevel'),
|
|
|
|
|
|
|
|
doUseTocDefault: this.$store.get('page/doUseTocDefault'),
|
|
|
|
|
|
|
|
tags: this.$store.get('page/tags'),
|
|
|
|
tags: this.$store.get('page/tags'),
|
|
|
|
title: this.$store.get('page/title')
|
|
|
|
title: this.$store.get('page/title')
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -582,10 +561,8 @@ export default {
|
|
|
|
title: this.$store.get('page/title'),
|
|
|
|
title: this.$store.get('page/title'),
|
|
|
|
css: this.$store.get('page/scriptCss'),
|
|
|
|
css: this.$store.get('page/scriptCss'),
|
|
|
|
js: this.$store.get('page/scriptJs'),
|
|
|
|
js: this.$store.get('page/scriptJs'),
|
|
|
|
minTocLevel: this.$store.get('page/minTocLevel'),
|
|
|
|
tocDepth: this.$store.get('page/tocDepth@min') + (this.$store.get('page/tocDepth@max') * 10),
|
|
|
|
tocLevel: this.$store.get('page/tocLevel'),
|
|
|
|
useDefaultTocDepth: this.$store.get('page/useDefaultTocDepth')
|
|
|
|
tocCollapseLevel: this.$store.get('page/tocCollapseLevel'),
|
|
|
|
|
|
|
|
doUseTocDefault: this.$store.get('page/doUseTocDefault')
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
injectCustomCss: _.debounce(css => {
|
|
|
|
injectCustomCss: _.debounce(css => {
|
|
|
|