Add dyslexicFont preference

stable/1.0.x
Alex Gleason 2020-04-21 15:10:45 -05:00
rodzic 394aaaf23f
commit c90f087d2a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
3 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -44,6 +44,7 @@ const mapStateToProps = (state) => {
me, me,
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']),
}; };
}; };
@ -55,10 +56,11 @@ class GabSocialMount extends React.PureComponent {
me: PropTypes.string, me: PropTypes.string,
theme: PropTypes.string, theme: PropTypes.string,
systemFont: PropTypes.bool, systemFont: PropTypes.bool,
dyslexicFont: PropTypes.bool,
}; };
render() { render() {
const { me, theme, systemFont } = this.props; const { me, theme, systemFont, dyslexicFont } = this.props;
if (me === null) return null; if (me === null) return null;
// Disabling introduction for launch // Disabling introduction for launch
@ -71,6 +73,7 @@ class GabSocialMount extends React.PureComponent {
const bodyClass = classNames('app-body', { const bodyClass = classNames('app-body', {
[`theme-${theme}`]: theme, [`theme-${theme}`]: theme,
'system-font': systemFont, 'system-font': systemFont,
'dyslexic': dyslexicFont,
}); });
return ( return (

Wyświetl plik

@ -136,6 +136,12 @@ class Preferences extends ImmutablePureComponent {
label="Use system's default font" label="Use system's default font"
path={['systemFont']} path={['systemFont']}
/> />
<div className='dyslexic'>
<SettingsCheckbox
label='Dyslexic mode'
path={['dyslexicFont']}
/>
</div>
</FieldsGroup> </FieldsGroup>
</SimpleForm> </SimpleForm>
</Column> </Column>

Wyświetl plik

@ -23,6 +23,7 @@ const initialState = ImmutableMap({
theme: 'lime', theme: 'lime',
systemFont: false, systemFont: false,
dyslexicFont: false,
home: ImmutableMap({ home: ImmutableMap({
shows: ImmutableMap({ shows: ImmutableMap({