1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Add storage labels to 'All Notes'

Added storage labelings to 'All Notes' in Default and Compressed views
This commit is contained in:
pfftdammitchris
2018-02-19 10:17:36 -08:00
parent 46a733ba5b
commit 129ef6766b
5 changed files with 96 additions and 32 deletions

View File

@@ -66,6 +66,7 @@ class NoteList extends React.Component {
this.deleteNote = this.deleteNote.bind(this)
this.focusNote = this.focusNote.bind(this)
this.pinToTop = this.pinToTop.bind(this)
this.getNoteStorage = this.getNoteStorage.bind(this)
// TODO: not Selected noteKeys but SelectedNote(for reusing)
this.state = {
@@ -691,6 +692,10 @@ class NoteList extends React.Component {
})
}
getNoteStorage (note) { // note.storage = storage key
return this.props.data.storageMap.toJS()[note.storage]
}
render () {
const { location, config } = this.props
let { notes } = this.props
@@ -745,6 +750,7 @@ class NoteList extends React.Component {
return (
<NoteItem
isActive={isActive}
isAllNotesView={location.pathname === '/home'}
note={note}
dateDisplay={dateDisplay}
key={uniqueKey}
@@ -752,6 +758,7 @@ class NoteList extends React.Component {
handleNoteClick={this.handleNoteClick.bind(this)}
handleDragStart={this.handleDragStart.bind(this)}
pathname={location.pathname}
storage={this.getNoteStorage(note)}
/>
)
}
@@ -759,12 +766,14 @@ class NoteList extends React.Component {
return (
<NoteItemSimple
isActive={isActive}
isAllNotesView={location.pathname === '/home'}
note={note}
key={uniqueKey}
handleNoteContextMenu={this.handleNoteContextMenu.bind(this)}
handleNoteClick={this.handleNoteClick.bind(this)}
handleDragStart={this.handleDragStart.bind(this)}
pathname={location.pathname}
storage={this.getNoteStorage(note)}
/>
)
})