mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 18:56:22 +00:00
新規投稿 Cmd + n / Preview Cmd + P 追加
This commit is contained in:
@@ -411,7 +411,9 @@ export default class ArticleDetail extends React.Component {
|
||||
}
|
||||
|
||||
handleTogglePreviewButtonClick (e) {
|
||||
this.setState({previewMode: !this.state.previewMode})
|
||||
if (this.state.article.mode === 'markdown') {
|
||||
this.setState({previewMode: !this.state.previewMode})
|
||||
}
|
||||
}
|
||||
|
||||
handleTitleKeyDown (e) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { PropTypes } from 'react'
|
||||
import { findWhere } from 'lodash'
|
||||
import { setSearchFilter, switchFolder, switchMode, switchArticle, updateArticle, EDIT_MODE } from 'boost/actions'
|
||||
import { setSearchFilter, switchFolder, switchMode, switchArticle, updateArticle, clearNewArticle, EDIT_MODE } from 'boost/actions'
|
||||
import { openModal } from 'boost/modal'
|
||||
import FolderMark from 'boost/components/FolderMark'
|
||||
import Preferences from 'boost/components/modal/Preferences'
|
||||
@@ -85,6 +85,7 @@ export default class ArticleNavigator extends React.Component {
|
||||
status: 'NEW'
|
||||
}
|
||||
|
||||
dispatch(clearNewArticle())
|
||||
dispatch(updateArticle(newArticle))
|
||||
dispatch(switchArticle(newArticle.key, true))
|
||||
dispatch(switchMode(EDIT_MODE))
|
||||
|
||||
Reference in New Issue
Block a user