1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

modify: not showing the star on the note-list component when using the simple mode

This commit is contained in:
sota1235
2016-12-29 16:15:56 +09:00
parent 113abbb94d
commit e7e6194cac

View File

@@ -327,6 +327,7 @@ class NoteList extends React.Component {
}) })
: [] : []
let isActive = location.query.key === note.storage + '-' + note.key let isActive = location.query.key === note.storage + '-' + note.key
const isDefault = config.listStyle === 'DEFAULT'
return ( return (
<div styleName={isActive <div styleName={isActive
? 'item--active' ? 'item--active'
@@ -336,7 +337,7 @@ class NoteList extends React.Component {
onClick={(e) => this.handleNoteClick(e, note.storage + '-' + note.key)} onClick={(e) => this.handleNoteClick(e, note.storage + '-' + note.key)}
onContextMenu={(e) => this.handleNoteContextMenu(e, note.storage + '-' + note.key)} onContextMenu={(e) => this.handleNoteContextMenu(e, note.storage + '-' + note.key)}
> >
{config.listStyle === 'DEFAULT' && {isDefault &&
<div styleName='item-bottom-time'> <div styleName='item-bottom-time'>
{moment(config.sortBy === 'CREATED_AT' ? note.createdAt : note.updatedAt).fromNow()} {moment(config.sortBy === 'CREATED_AT' ? note.createdAt : note.updatedAt).fromNow()}
</div> </div>
@@ -349,7 +350,7 @@ class NoteList extends React.Component {
} }
</div> </div>
{config.listStyle === 'DEFAULT' && {isDefault &&
<div styleName='item-bottom'> <div styleName='item-bottom'>
<div styleName='item-bottom-tagList'> <div styleName='item-bottom-tagList'>
{tagElements.length > 0 {tagElements.length > 0
@@ -360,12 +361,14 @@ class NoteList extends React.Component {
</div> </div>
} }
{isDefault &&
<i styleName='item-star' <i styleName='item-star'
className={note.isStarred className={note.isStarred
? 'fa fa-star' ? 'fa fa-star'
: 'fa fa-star-o' : 'fa fa-star-o'
} }
/> />
}
</div> </div>
) )
}) })