Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Commit 9f21192

Browse files
committed
Add option to show only related tags
1 parent 1a376fe commit 9f21192

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

browser/main/SideNav/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@ class SideNav extends React.Component {
152152
if (config.sortTagsBy === 'COUNTER') {
153153
tagList = _.sortBy(tagList, item => (0 - item.size))
154154
}
155+
if (config.ui.showOnlyRelatedTags && (relatedTags.size > 0)) {
156+
tagList = tagList.filter(
157+
tag => tag.related
158+
)
159+
}
155160
return (
156161
tagList.map(tag => {
157162
return (

browser/main/modals/PreferencesModal/UiTab.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class UiTab extends React.Component {
6565
language: this.refs.uiLanguage.value,
6666
showCopyNotification: this.refs.showCopyNotification.checked,
6767
confirmDeletion: this.refs.confirmDeletion.checked,
68+
showOnlyRelatedTags: this.refs.showOnlyRelatedTags.checked,
6869
disableDirectWrite: this.refs.uiD2w != null
6970
? this.refs.uiD2w.checked
7071
: false
@@ -221,6 +222,16 @@ class UiTab extends React.Component {
221222
{i18n.__('Show a confirmation dialog when deleting notes')}
222223
</label>
223224
</div>
225+
<div styleName='group-checkBoxSection'>
226+
<label>
227+
<input onChange={(e) => this.handleUIChange(e)}
228+
checked={this.state.config.ui.showOnlyRelatedTags}
229+
ref='showOnlyRelatedTags'
230+
type='checkbox'
231+
/>&nbsp;
232+
{i18n.__('Show only related tags')}
233+
</label>
234+
</div>
224235
{
225236
global.process.platform === 'win32'
226237
? <div styleName='group-checkBoxSection'>

0 commit comments

Comments
 (0)