1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +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
const isDefault = config.listStyle === 'DEFAULT'
return (
<div styleName={isActive
? 'item--active'
@@ -336,7 +337,7 @@ class NoteList extends React.Component {
onClick={(e) => this.handleNoteClick(e, note.storage + '-' + note.key)}
onContextMenu={(e) => this.handleNoteContextMenu(e, note.storage + '-' + note.key)}
>
{config.listStyle === 'DEFAULT' &&
{isDefault &&
<div styleName='item-bottom-time'>
{moment(config.sortBy === 'CREATED_AT' ? note.createdAt : note.updatedAt).fromNow()}
</div>
@@ -349,7 +350,7 @@ class NoteList extends React.Component {
}
</div>
{config.listStyle === 'DEFAULT' &&
{isDefault &&
<div styleName='item-bottom'>
<div styleName='item-bottom-tagList'>
{tagElements.length > 0
@@ -360,12 +361,14 @@ class NoteList extends React.Component {
</div>
}
<i styleName='item-star'
className={note.isStarred
? 'fa fa-star'
: 'fa fa-star-o'
}
/>
{isDefault &&
<i styleName='item-star'
className={note.isStarred
? 'fa fa-star'
: 'fa fa-star-o'
}
/>
}
</div>
)
})