Skip to content

Commit

Permalink
#42: Show tab count option
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlerendu committed Dec 2, 2019
1 parent 4ed0ae3 commit 2aa9ea0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/options/options.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,22 @@ export class Options extends React.Component {
</a>
</p>
</div>
<OptionGroup title={ 'Show Tabs From' }
<OptionGroup title={ 'Show tabs from' }
options={ options.showTabsFrom }
value={ this.state.options.showTabsFrom }
valueUpdated={ value => this.handleOptionUpdated('showTabsFrom', value) } />
<OptionGroup title={ 'Display Density' }
<OptionGroup title={ 'Display density' }
options={ options.displayDensity }
value={ this.state.options.displayDensity }
valueUpdated={ value => this.handleOptionUpdated('displayDensity', value) } />
<OptionGroup title={ 'Width' }
options={ options.width }
value={ this.state.options.width }
valueUpdated={ value => this.handleOptionUpdated('width', value) } />
<OptionGroup title={ 'Show tab count on browser action' }
options={ options.browserActionTabCount }
value={ this.state.options.browserActionTabCount }
valueUpdated={ value => this.handleOptionUpdated('browserActionTabCount', value) } />
<div className={ 'mb-4' }>
<h2 className={ 'text-lg my-2' }>About</h2>
<p>
Expand Down
7 changes: 7 additions & 0 deletions src/providers/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export const defaults = {
showTabsFrom: 'all',
displayDensity: 'comfortable',
width: 'medium',
browserActionTabCount: 'dontShow',
};

export const showTabsFrom = {
Expand All @@ -21,4 +22,10 @@ export const width = {
medium: 'Medium',
large: 'Large',
gigantic: 'Gigantic',
};

export const browserActionTabCount = {
dontShow: 'Dont show',
all: 'All windows',
current: 'The current window',
};

0 comments on commit 2aa9ea0

Please sign in to comment.