mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-25 07:31:49 +00:00
CommonMark
This commit is contained in:
@@ -56,7 +56,8 @@ export default class ArticleEditor extends React.Component {
|
||||
}
|
||||
|
||||
render () {
|
||||
if (this.props.mode === 'markdown' && this.state.status === PREVIEW_MODE) {
|
||||
let showPreview = this.props.mode === 'markdown' && this.state.status === PREVIEW_MODE
|
||||
if (showPreview) {
|
||||
return (
|
||||
<div className='ArticleEditor'>
|
||||
<MarkdownPreview
|
||||
|
||||
@@ -138,7 +138,9 @@ export default class ArticleNavigator extends React.Component {
|
||||
<div key={modifiedArticle.key} onClick={e => this.handleUnsavedItemClick(combinedArticle)(e)} className={className}>
|
||||
<div className='ArticleNavigator-unsaved-list-item-label'>
|
||||
<ModeIcon mode={combinedArticle.mode}/>
|
||||
{combinedArticle.title}
|
||||
{combinedArticle.title.trim().length > 0
|
||||
? combinedArticle.title
|
||||
: <span className='ArticleNavigator-unsaved-list-item-label-untitled'>(Untitled)</span>}
|
||||
</div>
|
||||
<button onClick={e => this.handleUncacheButtonClick(combinedArticle)(e)} className='ArticleNavigator-unsaved-list-item-discard-button'><i className='fa fa-times'/></button>
|
||||
</div>
|
||||
|
||||
@@ -144,9 +144,8 @@ function remap (state) {
|
||||
|
||||
articles.sort((a, b) => {
|
||||
let match = new Date(b.updatedAt) - new Date(a.updatedAt)
|
||||
if (match === 0) match = new Date(b.createdAt) - new Date(a.createdAt)
|
||||
if (match === 0) match = b.title.compare(a.title)
|
||||
if (match === 0) match = b.key.compare(a.key)
|
||||
if (match === 0) match = b.title.localeCompare(a.title)
|
||||
if (match === 0) match = b.key.localeCompare(a.key)
|
||||
return match
|
||||
})
|
||||
let allArticles = articles.slice()
|
||||
|
||||
Reference in New Issue
Block a user