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:
@@ -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>
|
||||||
}
|
}
|
||||||
|
|
||||||
<i styleName='item-star'
|
{isDefault &&
|
||||||
className={note.isStarred
|
<i styleName='item-star'
|
||||||
? 'fa fa-star'
|
className={note.isStarred
|
||||||
: 'fa fa-star-o'
|
? 'fa fa-star'
|
||||||
}
|
: 'fa fa-star-o'
|
||||||
/>
|
}
|
||||||
|
/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user