mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
move config value into ui
This commit is contained in:
@@ -47,7 +47,7 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
isLockButtonShown: props.config.editor.type !== 'SPLIT',
|
isLockButtonShown: props.config.editor.type !== 'SPLIT',
|
||||||
isLocked: false,
|
isLocked: false,
|
||||||
editorType: props.config.editor.type,
|
editorType: props.config.editor.type,
|
||||||
isStacking: props.config.editor.isStacking,
|
isStacking: props.config.ui.isStacking,
|
||||||
switchPreview: props.config.editor.switchPreview
|
switchPreview: props.config.editor.switchPreview
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -360,7 +360,7 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
this.setState({ isStacking: type }, () => {
|
this.setState({ isStacking: type }, () => {
|
||||||
this.focus()
|
this.focus()
|
||||||
const newConfig = Object.assign({}, this.props.config)
|
const newConfig = Object.assign({}, this.props.config)
|
||||||
newConfig.editor.isStacking = type
|
newConfig.ui.isStacking = type
|
||||||
ConfigManager.set(newConfig)
|
ConfigManager.set(newConfig)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ export const DEFAULT_CONFIG = {
|
|||||||
showCopyNotification: true,
|
showCopyNotification: true,
|
||||||
disableDirectWrite: false,
|
disableDirectWrite: false,
|
||||||
defaultNote: 'ALWAYS_ASK', // 'ALWAYS_ASK', 'SNIPPET_NOTE', 'MARKDOWN_NOTE'
|
defaultNote: 'ALWAYS_ASK', // 'ALWAYS_ASK', 'SNIPPET_NOTE', 'MARKDOWN_NOTE'
|
||||||
showMenuBar: false
|
showMenuBar: false,
|
||||||
|
isStacking: false
|
||||||
},
|
},
|
||||||
editor: {
|
editor: {
|
||||||
theme: 'base16-light',
|
theme: 'base16-light',
|
||||||
@@ -62,7 +63,6 @@ export const DEFAULT_CONFIG = {
|
|||||||
delfaultStatus: 'PREVIEW', // 'PREVIEW', 'CODE'
|
delfaultStatus: 'PREVIEW', // 'PREVIEW', 'CODE'
|
||||||
scrollPastEnd: false,
|
scrollPastEnd: false,
|
||||||
type: 'SPLIT', // 'SPLIT', 'EDITOR_PREVIEW'
|
type: 'SPLIT', // 'SPLIT', 'EDITOR_PREVIEW'
|
||||||
isStacking: false,
|
|
||||||
fetchUrlTitle: true,
|
fetchUrlTitle: true,
|
||||||
enableTableEditor: false,
|
enableTableEditor: false,
|
||||||
enableFrontMatterTitle: true,
|
enableFrontMatterTitle: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user