1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 18:56:22 +00:00

- show tags of note in alphabetical order

- enable live count of notes
This commit is contained in:
Baptiste Augrain
2018-08-21 00:19:26 +02:00
parent 039f73711a
commit 73fbf49ba4
10 changed files with 81 additions and 27 deletions

View File

@@ -312,7 +312,7 @@ class MarkdownNoteDetail extends React.Component {
}
render () {
const { data, location } = this.props
const { data, location, config } = this.props
const { note, editorType } = this.state
const storageKey = note.storage
const folderKey = note.folder
@@ -363,6 +363,7 @@ class MarkdownNoteDetail extends React.Component {
<TagSelect
ref='tags'
value={this.state.note.tags}
showTagsAlphabetically={config.ui.showTagsAlphabetically}
onChange={this.handleUpdateTag.bind(this)}
/>
<TodoListPercentage percentageOfTodo={getTodoPercentageOfCompleted(note.content)} />

View File

@@ -744,6 +744,7 @@ class SnippetNoteDetail extends React.Component {
<TagSelect
ref='tags'
value={this.state.note.tags}
showTagsAlphabetically={config.ui.showTagsAlphabetically}
onChange={(e) => this.handleChange(e)}
/>
</div>

View File

@@ -119,10 +119,10 @@ class TagSelect extends React.Component {
}
render () {
const { value, className } = this.props
const { value, className, showTagsAlphabetically } = this.props
const tagList = _.isArray(value)
? value.map((tag) => {
? (showTagsAlphabetically ? _.sortBy(value) : value).map((tag) => {
return (
<span styleName='tag'
key={tag}