Add demetricator preference

This commit is contained in:
Alex Gleason 2020-04-21 15:14:06 -05:00
parent c90f087d2a
commit 7e0b4f5f47
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
3 changed files with 10 additions and 1 deletions

View file

@ -45,6 +45,7 @@ const mapStateToProps = (state) => {
theme: state.getIn(['settings', 'theme']), theme: state.getIn(['settings', 'theme']),
systemFont: state.getIn(['settings', 'systemFont']), systemFont: state.getIn(['settings', 'systemFont']),
dyslexicFont: state.getIn(['settings', 'dyslexicFont']), dyslexicFont: state.getIn(['settings', 'dyslexicFont']),
demetricator: state.getIn(['settings', 'demetricator']),
}; };
}; };
@ -57,10 +58,11 @@ class GabSocialMount extends React.PureComponent {
theme: PropTypes.string, theme: PropTypes.string,
systemFont: PropTypes.bool, systemFont: PropTypes.bool,
dyslexicFont: PropTypes.bool, dyslexicFont: PropTypes.bool,
demetricator: PropTypes.bool,
}; };
render() { render() {
const { me, theme, systemFont, dyslexicFont } = this.props; const { me, theme, systemFont, dyslexicFont, demetricator } = this.props;
if (me === null) return null; if (me === null) return null;
// Disabling introduction for launch // Disabling introduction for launch
@ -74,6 +76,7 @@ class GabSocialMount extends React.PureComponent {
[`theme-${theme}`]: theme, [`theme-${theme}`]: theme,
'system-font': systemFont, 'system-font': systemFont,
'dyslexic': dyslexicFont, 'dyslexic': dyslexicFont,
'demetricator': demetricator,
}); });
return ( return (

View file

@ -142,6 +142,11 @@ class Preferences extends ImmutablePureComponent {
path={['dyslexicFont']} path={['dyslexicFont']}
/> />
</div> </div>
<SettingsCheckbox
label='Use Demetricator'
hint='Decrease social media anxiety by hiding all numbers from the site.'
path={['demetricator']}
/>
</FieldsGroup> </FieldsGroup>
</SimpleForm> </SimpleForm>
</Column> </Column>

View file

@ -24,6 +24,7 @@ const initialState = ImmutableMap({
systemFont: false, systemFont: false,
dyslexicFont: false, dyslexicFont: false,
demetricator: false,
home: ImmutableMap({ home: ImmutableMap({
shows: ImmutableMap({ shows: ImmutableMap({