feat: hide sidebar option
This commit is contained in:
parent
a33691d642
commit
514d31a46d
@ -199,7 +199,13 @@ export default {
|
|||||||
query: renderersQuery,
|
query: renderersQuery,
|
||||||
fetchPolicy: 'network-only',
|
fetchPolicy: 'network-only',
|
||||||
update: (data) => {
|
update: (data) => {
|
||||||
let renderers = _.cloneDeep(data.rendering.renderers).map(str => ({...str, config: str.config.map(cfg => ({...cfg, value: JSON.parse(cfg.value)}))}))
|
let renderers = _.cloneDeep(data.rendering.renderers).map(str => ({
|
||||||
|
...str,
|
||||||
|
config: _.sortBy(str.config.map(cfg => ({
|
||||||
|
...cfg,
|
||||||
|
value: JSON.parse(cfg.value)
|
||||||
|
})), [t => t.value.order])
|
||||||
|
}))
|
||||||
// Build tree
|
// Build tree
|
||||||
const graph = new DepGraph({ circular: true })
|
const graph = new DepGraph({ circular: true })
|
||||||
const rawCores = _.filter(renderers, ['dependsOn', null]).map(core => {
|
const rawCores = _.filter(renderers, ['dependsOn', null]).map(core => {
|
||||||
|
@ -64,6 +64,10 @@ export default {
|
|||||||
mode: {
|
mode: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'browse'
|
default: 'browse'
|
||||||
|
},
|
||||||
|
navMode: {
|
||||||
|
type: String,
|
||||||
|
default: 'MIXED'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
v-app(v-scroll='upBtnScroll', :dark='darkMode', :class='$vuetify.rtl ? `is-rtl` : `is-ltr`')
|
v-app(v-scroll='upBtnScroll', :dark='darkMode', :class='$vuetify.rtl ? `is-rtl` : `is-ltr`')
|
||||||
nav-header
|
nav-header
|
||||||
v-navigation-drawer(
|
v-navigation-drawer(
|
||||||
|
v-if='navMode !== `NONE`'
|
||||||
:class='darkMode ? `grey darken-4-d4` : `primary`'
|
:class='darkMode ? `grey darken-4-d4` : `primary`'
|
||||||
dark
|
dark
|
||||||
app
|
app
|
||||||
@ -12,9 +13,9 @@
|
|||||||
:right='$vuetify.rtl'
|
:right='$vuetify.rtl'
|
||||||
)
|
)
|
||||||
vue-scroll(:ops='scrollStyle')
|
vue-scroll(:ops='scrollStyle')
|
||||||
nav-sidebar(:color='darkMode ? `grey darken-4-d4` : `primary`', :items='sidebar')
|
nav-sidebar(:color='darkMode ? `grey darken-4-d4` : `primary`', :items='sidebar', :nav-mode='navMode')
|
||||||
|
|
||||||
v-fab-transition
|
v-fab-transition(v-if='navMode !== `NONE`')
|
||||||
v-btn(
|
v-btn(
|
||||||
fab
|
fab
|
||||||
color='primary'
|
color='primary'
|
||||||
@ -345,6 +346,10 @@ export default {
|
|||||||
sidebar: {
|
sidebar: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
|
},
|
||||||
|
navMode: {
|
||||||
|
type: String,
|
||||||
|
default: 'MIXED'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -11,26 +11,31 @@ props:
|
|||||||
default: true
|
default: true
|
||||||
title: Allow HTML
|
title: Allow HTML
|
||||||
hint: Enable HTML tags in content
|
hint: Enable HTML tags in content
|
||||||
|
order: 1
|
||||||
linkify:
|
linkify:
|
||||||
type: Boolean
|
type: Boolean
|
||||||
default: true
|
default: true
|
||||||
title: Automatically convert links
|
title: Automatically convert links
|
||||||
hint: Links will automatically be converted to clickable links.
|
hint: Links will automatically be converted to clickable links.
|
||||||
|
order: 2
|
||||||
linebreaks:
|
linebreaks:
|
||||||
type: Boolean
|
type: Boolean
|
||||||
default: true
|
default: true
|
||||||
title: Automatically convert line breaks
|
title: Automatically convert line breaks
|
||||||
hint: Add linebreaks within paragraphs.
|
hint: Add linebreaks within paragraphs.
|
||||||
|
order: 3
|
||||||
typographer:
|
typographer:
|
||||||
type: Boolean
|
type: Boolean
|
||||||
default: false
|
default: false
|
||||||
title: Typographer
|
title: Typographer
|
||||||
hint: Enable some language-neutral replacement + quotes beautification
|
hint: Enable some language-neutral replacement + quotes beautification
|
||||||
|
order: 4
|
||||||
quotes:
|
quotes:
|
||||||
type: String
|
type: String
|
||||||
default: English
|
default: English
|
||||||
title: Quotes style
|
title: Quotes style
|
||||||
hint: When typographer is enabled. Double + single quotes replacement pairs. e.g. «»„“ for Russian, „“‚‘ for German, etc.
|
hint: When typographer is enabled. Double + single quotes replacement pairs. e.g. «»„“ for Russian, „“‚‘ for German, etc.
|
||||||
|
order: 5
|
||||||
enum:
|
enum:
|
||||||
- Chinese
|
- Chinese
|
||||||
- English
|
- English
|
||||||
|
@ -22,6 +22,7 @@ block body
|
|||||||
:toc=page.toc
|
:toc=page.toc
|
||||||
:page-id=page.id
|
:page-id=page.id
|
||||||
:sidebar=sidebar
|
:sidebar=sidebar
|
||||||
|
nav-mode=config.nav.mode
|
||||||
)
|
)
|
||||||
template(slot='contents')
|
template(slot='contents')
|
||||||
div(v-pre)!= page.render
|
div(v-pre)!= page.render
|
||||||
|
Loading…
Reference in New Issue
Block a user