feat: hide sidebar option

This commit is contained in:
NGPixel 2020-04-12 21:19:22 -04:00 committed by Nicolas Giard
parent a33691d642
commit 514d31a46d
5 changed files with 24 additions and 3 deletions

View File

@ -199,7 +199,13 @@ export default {
query: renderersQuery,
fetchPolicy: 'network-only',
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
const graph = new DepGraph({ circular: true })
const rawCores = _.filter(renderers, ['dependsOn', null]).map(core => {

View File

@ -64,6 +64,10 @@ export default {
mode: {
type: String,
default: 'browse'
},
navMode: {
type: String,
default: 'MIXED'
}
},
data() {

View File

@ -2,6 +2,7 @@
v-app(v-scroll='upBtnScroll', :dark='darkMode', :class='$vuetify.rtl ? `is-rtl` : `is-ltr`')
nav-header
v-navigation-drawer(
v-if='navMode !== `NONE`'
:class='darkMode ? `grey darken-4-d4` : `primary`'
dark
app
@ -12,9 +13,9 @@
:right='$vuetify.rtl'
)
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(
fab
color='primary'
@ -345,6 +346,10 @@ export default {
sidebar: {
type: Array,
default: () => []
},
navMode: {
type: String,
default: 'MIXED'
}
},
data() {

View File

@ -11,26 +11,31 @@ props:
default: true
title: Allow HTML
hint: Enable HTML tags in content
order: 1
linkify:
type: Boolean
default: true
title: Automatically convert links
hint: Links will automatically be converted to clickable links.
order: 2
linebreaks:
type: Boolean
default: true
title: Automatically convert line breaks
hint: Add linebreaks within paragraphs.
order: 3
typographer:
type: Boolean
default: false
title: Typographer
hint: Enable some language-neutral replacement + quotes beautification
order: 4
quotes:
type: String
default: English
title: Quotes style
hint: When typographer is enabled. Double + single quotes replacement pairs. e.g. «»„“ for Russian, „“‚‘ for German, etc.
order: 5
enum:
- Chinese
- English

View File

@ -22,6 +22,7 @@ block body
:toc=page.toc
:page-id=page.id
:sidebar=sidebar
nav-mode=config.nav.mode
)
template(slot='contents')
div(v-pre)!= page.render