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

Add option to show only related tags

This commit is contained in:
bimlas
2018-04-11 08:14:28 +02:00
parent c02b91dfd4
commit 84925b24b5
2 changed files with 16 additions and 0 deletions

View File

@@ -152,6 +152,11 @@ class SideNav extends React.Component {
if (config.sortTagsBy === 'COUNTER') { if (config.sortTagsBy === 'COUNTER') {
tagList = _.sortBy(tagList, item => (0 - item.size)) tagList = _.sortBy(tagList, item => (0 - item.size))
} }
if (config.ui.showOnlyRelatedTags && (relatedTags.size > 0)) {
tagList = tagList.filter(
tag => tag.related
)
}
return ( return (
tagList.map(tag => { tagList.map(tag => {
return ( return (

View File

@@ -66,6 +66,7 @@ class UiTab extends React.Component {
language: this.refs.uiLanguage.value, language: this.refs.uiLanguage.value,
showCopyNotification: this.refs.showCopyNotification.checked, showCopyNotification: this.refs.showCopyNotification.checked,
confirmDeletion: this.refs.confirmDeletion.checked, confirmDeletion: this.refs.confirmDeletion.checked,
showOnlyRelatedTags: this.refs.showOnlyRelatedTags.checked,
disableDirectWrite: this.refs.uiD2w != null disableDirectWrite: this.refs.uiD2w != null
? this.refs.uiD2w.checked ? this.refs.uiD2w.checked
: false : false
@@ -210,6 +211,16 @@ class UiTab extends React.Component {
{i18n.__('Show a confirmation dialog when deleting notes')} {i18n.__('Show a confirmation dialog when deleting notes')}
</label> </label>
</div> </div>
<div styleName='group-checkBoxSection'>
<label>
<input onChange={(e) => this.handleUIChange(e)}
checked={this.state.config.ui.showOnlyRelatedTags}
ref='showOnlyRelatedTags'
type='checkbox'
/>&nbsp;
{i18n.__('Show only related tags')}
</label>
</div>
{ {
global.process.platform === 'win32' global.process.platform === 'win32'
? <div styleName='group-checkBoxSection'> ? <div styleName='group-checkBoxSection'>