kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Add dyslexicFont preference
rodzic
394aaaf23f
commit
c90f087d2a
|
@ -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 (
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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({
|
||||||
|
|
Ładowanie…
Reference in New Issue