fix: dark mode handling

This commit is contained in:
Nicolas Giard
2018-12-01 23:03:14 -05:00
parent a7fc560573
commit 74aa09f39c
17 changed files with 156 additions and 78 deletions

View File

@@ -238,13 +238,13 @@ module.exports = class Page extends Model {
creatorId: page.creatorId,
creatorName: page.creatorName,
description: page.description,
isPrivate: page.isPrivate === 1,
isPublished: page.isPublished === 1,
isPrivate: page.isPrivate === 1 || page.isPrivate === true,
isPublished: page.isPublished === 1 || page.isPublished === true,
publishEndDate: page.publishEndDate,
publishStartDate: page.publishStartDate,
render: page.render,
title: page.title,
toc: page.toc,
toc: _.isString(page.toc) ? page.toc : JSON.stringify(page.toc),
updatedAt: page.updatedAt
}))
}

View File

@@ -2,16 +2,15 @@ extends master.pug
block body
#root
v-app
editor(
:page-id=page.id
locale=page.localeCode
path=page.path
title=page.title
description=page.description
tags=page.tags
:is-published=page.isPublished
init-mode=page.mode
init-editor=page.editorKey
init-content=page.content
)
editor(
:page-id=page.id
locale=page.localeCode
path=page.path
title=page.title
description=page.description
tags=page.tags
:is-published=page.isPublished
init-mode=page.mode
init-editor=page.editorKey
init-content=page.content
)

View File

@@ -14,7 +14,7 @@ block body
updated-at=page.updatedAt
author-name=page.authorName
:author-id=page.authorId
:is-published=page.isPublished
:is-published=page.isPublished.toString()
:toc=page.toc
)
template(slot='sidebar')