2018-02-07 18:06:07 +00:00
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import React from 'react';
|
2018-02-23 16:31:41 +00:00
|
|
|
import { Helmet } from 'react-helmet';
|
2017-08-09 17:34:59 +00:00
|
|
|
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
|
2020-07-06 09:36:45 +00:00
|
|
|
import { withTranslation } from 'react-i18next';
|
2016-08-05 01:43:13 +00:00
|
|
|
// import { bindActionCreators } from 'redux';
|
|
|
|
// import { connect } from 'react-redux';
|
|
|
|
// import * as PreferencesActions from '../actions/preferences';
|
2016-06-23 22:29:55 +00:00
|
|
|
|
2020-07-21 21:18:19 +00:00
|
|
|
import PlusIcon from '../../../../images/plus.svg';
|
|
|
|
import MinusIcon from '../../../../images/minus.svg';
|
|
|
|
import beepUrl from '../../../../sounds/audioAlert.mp3';
|
2016-06-23 22:29:55 +00:00
|
|
|
|
2016-08-04 03:45:49 +00:00
|
|
|
class Preferences extends React.Component {
|
2016-08-09 20:15:28 +00:00
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
this.handleUpdateAutosave = this.handleUpdateAutosave.bind(this);
|
2019-03-26 19:37:44 +00:00
|
|
|
this.handleUpdateLinewrap = this.handleUpdateLinewrap.bind(this);
|
2016-11-08 18:11:07 +00:00
|
|
|
this.handleLintWarning = this.handleLintWarning.bind(this);
|
2019-08-30 16:36:34 +00:00
|
|
|
this.handleLineNumbers = this.handleLineNumbers.bind(this);
|
2019-06-18 20:54:16 +00:00
|
|
|
this.onFontInputChange = this.onFontInputChange.bind(this);
|
|
|
|
this.onFontInputSubmit = this.onFontInputSubmit.bind(this);
|
|
|
|
this.increaseFontSize = this.increaseFontSize.bind(this);
|
|
|
|
this.decreaseFontSize = this.decreaseFontSize.bind(this);
|
|
|
|
this.setFontSize = this.setFontSize.bind(this);
|
|
|
|
|
|
|
|
this.state = {
|
|
|
|
fontSize: props.fontSize
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
onFontInputChange(event) {
|
2019-08-13 16:27:31 +00:00
|
|
|
const INTEGER_REGEX = /^[0-9\b]+$/;
|
|
|
|
if (event.target.value === '' || INTEGER_REGEX.test(event.target.value)) {
|
|
|
|
this.setState({
|
|
|
|
fontSize: event.target.value
|
|
|
|
});
|
|
|
|
}
|
2016-08-09 20:15:28 +00:00
|
|
|
}
|
|
|
|
|
2019-06-18 20:54:16 +00:00
|
|
|
onFontInputSubmit(event) {
|
|
|
|
event.preventDefault();
|
|
|
|
let value = parseInt(this.state.fontSize, 10);
|
2018-05-09 02:10:52 +00:00
|
|
|
if (Number.isNaN(value)) {
|
2016-11-08 18:11:07 +00:00
|
|
|
value = 16;
|
|
|
|
}
|
2018-11-02 19:55:06 +00:00
|
|
|
if (value > 36) {
|
|
|
|
value = 36;
|
|
|
|
}
|
|
|
|
if (value < 8) {
|
|
|
|
value = 8;
|
|
|
|
}
|
2019-06-18 20:54:16 +00:00
|
|
|
this.setFontSize(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
setFontSize(value) {
|
|
|
|
this.setState({ fontSize: value });
|
2016-11-08 18:11:07 +00:00
|
|
|
this.props.setFontSize(value);
|
2016-08-04 03:45:49 +00:00
|
|
|
}
|
2016-07-06 15:27:39 +00:00
|
|
|
|
2019-06-18 20:54:16 +00:00
|
|
|
decreaseFontSize() {
|
|
|
|
const newValue = this.state.fontSize - 2;
|
|
|
|
this.setFontSize(newValue);
|
|
|
|
}
|
|
|
|
|
|
|
|
increaseFontSize() {
|
|
|
|
const newValue = this.state.fontSize + 2;
|
|
|
|
this.setFontSize(newValue);
|
|
|
|
}
|
|
|
|
|
2016-08-09 20:15:28 +00:00
|
|
|
handleUpdateAutosave(event) {
|
|
|
|
const value = event.target.value === 'true';
|
|
|
|
this.props.setAutosave(value);
|
|
|
|
}
|
|
|
|
|
2019-03-26 19:37:44 +00:00
|
|
|
handleUpdateLinewrap(event) {
|
|
|
|
const value = event.target.value === 'true';
|
|
|
|
this.props.setLinewrap(value);
|
|
|
|
}
|
|
|
|
|
2016-08-11 18:09:59 +00:00
|
|
|
handleLintWarning(event) {
|
|
|
|
const value = event.target.value === 'true';
|
|
|
|
this.props.setLintWarning(value);
|
|
|
|
}
|
|
|
|
|
2019-08-30 16:36:34 +00:00
|
|
|
handleLineNumbers(event) {
|
|
|
|
const value = event.target.value === 'true';
|
|
|
|
this.props.setLineNumbers(value);
|
|
|
|
}
|
|
|
|
|
2016-08-04 03:45:49 +00:00
|
|
|
render() {
|
2016-09-01 03:07:43 +00:00
|
|
|
const beep = new Audio(beepUrl);
|
2016-08-29 18:39:23 +00:00
|
|
|
|
2016-08-04 03:45:49 +00:00
|
|
|
return (
|
2019-10-31 21:27:23 +00:00
|
|
|
<section className="preferences">
|
2018-02-23 16:31:41 +00:00
|
|
|
<Helmet>
|
|
|
|
<title>p5.js Web Editor | Preferences</title>
|
|
|
|
</Helmet>
|
2017-08-09 17:34:59 +00:00
|
|
|
<Tabs>
|
|
|
|
<TabList>
|
2019-05-23 11:02:52 +00:00
|
|
|
<div className="tabs__titles">
|
2020-07-31 13:20:42 +00:00
|
|
|
<Tab><h4 className="tabs__title">{this.props.t('Preferences.GeneralSettings')}</h4></Tab>
|
|
|
|
<Tab><h4 className="tabs__title">{this.props.t('Preferences.Accessibility')}</h4></Tab>
|
2017-08-09 17:34:59 +00:00
|
|
|
</div>
|
|
|
|
</TabList>
|
|
|
|
<TabPanel>
|
|
|
|
<div className="preference">
|
2020-07-31 13:20:42 +00:00
|
|
|
<h4 className="preference__title">{this.props.t('Preferences.Theme')}</h4>
|
2017-08-09 17:34:59 +00:00
|
|
|
<div className="preference__options">
|
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
onChange={() => this.props.setTheme('light')}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.LightThemeARIA')}
|
2017-08-09 17:34:59 +00:00
|
|
|
name="light theme"
|
|
|
|
id="light-theme-on"
|
|
|
|
className="preference__radio-button"
|
|
|
|
value="light"
|
|
|
|
checked={this.props.theme === 'light'}
|
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="light-theme-on" className="preference__option">{this.props.t('Preferences.LightTheme')}</label>
|
2017-08-09 17:34:59 +00:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
onChange={() => this.props.setTheme('dark')}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.DarkThemeARIA')}
|
2017-08-09 17:34:59 +00:00
|
|
|
name="dark theme"
|
|
|
|
id="dark-theme-on"
|
|
|
|
className="preference__radio-button"
|
|
|
|
value="dark"
|
|
|
|
checked={this.props.theme === 'dark'}
|
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="dark-theme-on" className="preference__option">{this.props.t('Preferences.DarkTheme')}</label>
|
2017-11-14 20:27:00 +00:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
onChange={() => this.props.setTheme('contrast')}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.HighContrastThemeARIA')}
|
2017-11-14 20:27:00 +00:00
|
|
|
name="high contrast theme"
|
|
|
|
id="high-contrast-theme-on"
|
|
|
|
className="preference__radio-button"
|
|
|
|
value="contrast"
|
|
|
|
checked={this.props.theme === 'contrast'}
|
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="high-contrast-theme-on" className="preference__option">{this.props.t('Preferences.HighContrastTheme')}</label>
|
2017-08-09 17:34:59 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="preference">
|
2020-07-31 13:20:42 +00:00
|
|
|
<h4 className="preference__title">{this.props.t('Preferences.TextSize')}</h4>
|
2017-08-09 17:34:59 +00:00
|
|
|
<button
|
|
|
|
className="preference__minus-button"
|
2019-06-18 20:54:16 +00:00
|
|
|
onClick={this.decreaseFontSize}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.DecreaseFontARIA')}
|
2019-06-18 20:54:16 +00:00
|
|
|
disabled={this.state.fontSize <= 8}
|
2017-08-09 17:34:59 +00:00
|
|
|
>
|
2020-05-05 23:03:58 +00:00
|
|
|
<MinusIcon focusable="false" aria-hidden="true" />
|
2020-07-31 13:20:42 +00:00
|
|
|
<h6 className="preference__label">{this.props.t('Preferences.DecreaseFont')}</h6>
|
2017-08-09 17:34:59 +00:00
|
|
|
</button>
|
2019-06-18 20:54:16 +00:00
|
|
|
<form onSubmit={this.onFontInputSubmit}>
|
|
|
|
<input
|
|
|
|
className="preference__value"
|
|
|
|
aria-live="polite"
|
|
|
|
aria-atomic="true"
|
|
|
|
value={this.state.fontSize}
|
|
|
|
onChange={this.onFontInputChange}
|
2019-08-13 16:27:31 +00:00
|
|
|
type="text"
|
2019-06-18 20:54:16 +00:00
|
|
|
ref={(element) => { this.fontSizeInput = element; }}
|
2019-08-13 16:27:31 +00:00
|
|
|
onClick={() => { this.fontSizeInput.select(); }}
|
2019-06-18 20:54:16 +00:00
|
|
|
/>
|
|
|
|
</form>
|
2017-08-09 17:34:59 +00:00
|
|
|
<button
|
|
|
|
className="preference__plus-button"
|
2019-06-18 20:54:16 +00:00
|
|
|
onClick={this.increaseFontSize}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.IncreaseFontARIA')}
|
2019-06-18 20:54:16 +00:00
|
|
|
disabled={this.state.fontSize >= 36}
|
2017-08-09 17:34:59 +00:00
|
|
|
>
|
2020-05-05 23:03:58 +00:00
|
|
|
<PlusIcon focusable="false" aria-hidden="true" />
|
2020-07-31 13:20:42 +00:00
|
|
|
<h6 className="preference__label">{this.props.t('Preferences.IncreaseFont')}</h6>
|
2017-08-09 17:34:59 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div className="preference">
|
2020-07-31 13:20:42 +00:00
|
|
|
<h4 className="preference__title">{this.props.t('Preferences.Autosave')}</h4>
|
2017-08-09 17:34:59 +00:00
|
|
|
<div className="preference__options">
|
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
onChange={() => this.props.setAutosave(true)}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.AutosaveOnARIA')}
|
2017-08-09 17:34:59 +00:00
|
|
|
name="autosave"
|
|
|
|
id="autosave-on"
|
|
|
|
className="preference__radio-button"
|
|
|
|
value="On"
|
|
|
|
checked={this.props.autosave}
|
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="autosave-on" className="preference__option">{this.props.t('Preferences.On')}</label>
|
2017-08-09 17:34:59 +00:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
onChange={() => this.props.setAutosave(false)}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.AutosaveOffARIA')}
|
2017-08-09 17:34:59 +00:00
|
|
|
name="autosave"
|
|
|
|
id="autosave-off"
|
|
|
|
className="preference__radio-button"
|
|
|
|
value="Off"
|
|
|
|
checked={!this.props.autosave}
|
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="autosave-off" className="preference__option">{this.props.t('Preferences.Off')}</label>
|
2017-08-09 17:34:59 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-03-26 19:37:44 +00:00
|
|
|
<div className="preference">
|
2020-07-31 13:20:42 +00:00
|
|
|
<h4 className="preference__title">{this.props.t('Preferences.WordWrap')}</h4>
|
2019-03-26 19:37:44 +00:00
|
|
|
<div className="preference__options">
|
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
onChange={() => this.props.setLinewrap(true)}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.LineWrapOnARIA')}
|
2019-03-26 19:37:44 +00:00
|
|
|
name="linewrap"
|
|
|
|
id="linewrap-on"
|
|
|
|
className="preference__radio-button"
|
|
|
|
value="On"
|
|
|
|
checked={this.props.linewrap}
|
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="linewrap-on" className="preference__option">{this.props.t('Preferences.On')}</label>
|
2019-03-26 19:37:44 +00:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
onChange={() => this.props.setLinewrap(false)}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.LineWrapOffARIA')}
|
2019-03-26 19:37:44 +00:00
|
|
|
name="linewrap"
|
|
|
|
id="linewrap-off"
|
|
|
|
className="preference__radio-button"
|
|
|
|
value="Off"
|
|
|
|
checked={!this.props.linewrap}
|
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="linewrap-off" className="preference__option">{this.props.t('Preferences.Off')}</label>
|
2019-03-26 19:37:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-08-09 17:34:59 +00:00
|
|
|
</TabPanel>
|
|
|
|
<TabPanel>
|
2019-08-30 16:36:34 +00:00
|
|
|
<div className="preference">
|
2020-07-31 13:20:42 +00:00
|
|
|
<h4 className="preference__title">{this.props.t('Preferences.LineNumbers')}</h4>
|
2019-08-30 16:36:34 +00:00
|
|
|
<div className="preference__options">
|
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
onChange={() => this.props.setLineNumbers(true)}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.LineNumbersOnARIA')}
|
2019-08-30 16:36:34 +00:00
|
|
|
name="line numbers"
|
|
|
|
id="line-numbers-on"
|
|
|
|
className="preference__radio-button"
|
|
|
|
value="On"
|
|
|
|
checked={this.props.lineNumbers}
|
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="line-numbers-on" className="preference__option">{this.props.t('Preferences.On')}</label>
|
2019-08-30 16:36:34 +00:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
onChange={() => this.props.setLineNumbers(false)}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.LineNumbersOffARIA')}
|
2019-08-30 16:36:34 +00:00
|
|
|
name="line numbers"
|
|
|
|
id="line-numbers-off"
|
|
|
|
className="preference__radio-button"
|
|
|
|
value="Off"
|
|
|
|
checked={!this.props.lineNumbers}
|
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="line-numbers-off" className="preference__option">{this.props.t('Preferences.Off')}</label>
|
2019-08-30 16:36:34 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-08-09 17:34:59 +00:00
|
|
|
<div className="preference">
|
2020-07-31 13:20:42 +00:00
|
|
|
<h4 className="preference__title">{this.props.t('Preferences.LintWarningSound')}</h4>
|
2017-08-09 17:34:59 +00:00
|
|
|
<div className="preference__options">
|
|
|
|
<input
|
2017-08-17 12:51:00 +00:00
|
|
|
type="radio"
|
2017-11-14 21:27:42 +00:00
|
|
|
onChange={() => this.props.setLintWarning(true)}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.LintWarningOnARIA')}
|
2017-11-14 21:27:42 +00:00
|
|
|
name="lint warning"
|
|
|
|
id="lint-warning-on"
|
2017-08-17 12:51:00 +00:00
|
|
|
className="preference__radio-button"
|
2017-08-09 17:34:59 +00:00
|
|
|
value="On"
|
2017-11-14 21:27:42 +00:00
|
|
|
checked={this.props.lintWarning}
|
2017-08-09 17:34:59 +00:00
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="lint-warning-on" className="preference__option">{this.props.t('Preferences.On')}</label>
|
2017-08-09 17:34:59 +00:00
|
|
|
<input
|
2017-08-17 12:51:00 +00:00
|
|
|
type="radio"
|
2017-11-14 21:27:42 +00:00
|
|
|
onChange={() => this.props.setLintWarning(false)}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.LintWarningOffARIA')}
|
2017-11-14 21:27:42 +00:00
|
|
|
name="lint warning"
|
|
|
|
id="lint-warning-off"
|
2017-08-17 12:51:00 +00:00
|
|
|
className="preference__radio-button"
|
2017-11-14 21:27:42 +00:00
|
|
|
value="Off"
|
|
|
|
checked={!this.props.lintWarning}
|
2017-08-09 17:34:59 +00:00
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="lint-warning-off" className="preference__option">{this.props.t('Preferences.Off')}</label>
|
2017-08-17 12:51:00 +00:00
|
|
|
<button
|
|
|
|
className="preference__preview-button"
|
|
|
|
onClick={() => beep.play()}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.PreviewSoundARIA')}
|
2017-08-17 12:51:00 +00:00
|
|
|
>
|
2020-07-31 13:20:42 +00:00
|
|
|
{this.props.t('Preferences.PreviewSound')}
|
2017-08-17 12:51:00 +00:00
|
|
|
</button>
|
2017-08-09 17:34:59 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="preference">
|
2020-07-31 13:20:42 +00:00
|
|
|
<h4 className="preference__title">{this.props.t('Preferences.AccessibleTextBasedCanvas')}</h4>
|
|
|
|
<h6 className="preference__subtitle">{this.props.t('Preferences.UsedScreenReader')}</h6>
|
2017-11-14 21:27:42 +00:00
|
|
|
|
2017-08-09 17:34:59 +00:00
|
|
|
<div className="preference__options">
|
|
|
|
<input
|
2017-11-14 21:27:42 +00:00
|
|
|
type="checkbox"
|
|
|
|
onChange={(event) => {
|
|
|
|
this.props.setTextOutput(event.target.checked);
|
|
|
|
}}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.TextOutputARIA')}
|
2017-11-14 21:27:42 +00:00
|
|
|
name="text output"
|
|
|
|
id="text-output-on"
|
2017-08-09 17:34:59 +00:00
|
|
|
value="On"
|
2017-11-14 21:27:42 +00:00
|
|
|
checked={(this.props.textOutput)}
|
2017-08-09 17:34:59 +00:00
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="text-output-on" className="preference__option preference__canvas">{this.props.t('Preferences.PlainText')}</label>
|
2017-08-09 17:34:59 +00:00
|
|
|
<input
|
2017-11-14 21:27:42 +00:00
|
|
|
type="checkbox"
|
|
|
|
onChange={(event) => {
|
|
|
|
this.props.setGridOutput(event.target.checked);
|
|
|
|
}}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.TableOutputARIA')}
|
2017-11-14 21:27:42 +00:00
|
|
|
name="table output"
|
|
|
|
id="table-output-on"
|
|
|
|
value="On"
|
|
|
|
checked={(this.props.gridOutput)}
|
2017-08-09 17:34:59 +00:00
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="table-output-on" className="preference__option preference__canvas">{this.props.t('Preferences.TableText')}</label>
|
2017-11-14 21:27:42 +00:00
|
|
|
<input
|
|
|
|
type="checkbox"
|
|
|
|
onChange={(event) => {
|
|
|
|
this.props.setSoundOutput(event.target.checked);
|
|
|
|
}}
|
2020-07-31 13:20:42 +00:00
|
|
|
aria-label={this.props.t('Preferences.SoundOutputARIA')}
|
2017-11-14 21:27:42 +00:00
|
|
|
name="sound output"
|
|
|
|
id="sound-output-on"
|
|
|
|
value="On"
|
|
|
|
checked={(this.props.soundOutput)}
|
|
|
|
/>
|
2020-07-31 13:20:42 +00:00
|
|
|
<label htmlFor="sound-output-on" className="preference__option preference__canvas">{this.props.t('Preferences.Sound')}</label>
|
2017-08-09 17:34:59 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</TabPanel>
|
|
|
|
</Tabs>
|
2016-08-04 03:45:49 +00:00
|
|
|
</section>
|
|
|
|
);
|
|
|
|
}
|
2016-06-23 22:29:55 +00:00
|
|
|
}
|
|
|
|
|
2016-06-27 19:57:36 +00:00
|
|
|
Preferences.propTypes = {
|
|
|
|
fontSize: PropTypes.number.isRequired,
|
2019-08-30 16:36:34 +00:00
|
|
|
lineNumbers: PropTypes.bool.isRequired,
|
2016-08-09 20:15:28 +00:00
|
|
|
setFontSize: PropTypes.func.isRequired,
|
|
|
|
autosave: PropTypes.bool.isRequired,
|
2019-03-26 19:37:44 +00:00
|
|
|
linewrap: PropTypes.bool.isRequired,
|
2019-08-30 16:36:34 +00:00
|
|
|
setLineNumbers: PropTypes.func.isRequired,
|
2016-08-11 18:09:59 +00:00
|
|
|
setAutosave: PropTypes.func.isRequired,
|
2019-03-26 19:37:44 +00:00
|
|
|
setLinewrap: PropTypes.func.isRequired,
|
2017-05-31 19:23:30 +00:00
|
|
|
textOutput: PropTypes.bool.isRequired,
|
|
|
|
gridOutput: PropTypes.bool.isRequired,
|
2017-11-14 21:27:42 +00:00
|
|
|
soundOutput: PropTypes.bool.isRequired,
|
2016-08-12 19:50:33 +00:00
|
|
|
setTextOutput: PropTypes.func.isRequired,
|
2017-05-31 19:23:30 +00:00
|
|
|
setGridOutput: PropTypes.func.isRequired,
|
2017-11-14 21:27:42 +00:00
|
|
|
setSoundOutput: PropTypes.func.isRequired,
|
2016-08-11 18:09:59 +00:00
|
|
|
lintWarning: PropTypes.bool.isRequired,
|
2016-09-13 18:15:46 +00:00
|
|
|
setLintWarning: PropTypes.func.isRequired,
|
|
|
|
theme: PropTypes.string.isRequired,
|
2018-05-09 02:10:52 +00:00
|
|
|
setTheme: PropTypes.func.isRequired,
|
2020-07-06 09:36:45 +00:00
|
|
|
t: PropTypes.func.isRequired,
|
2017-09-22 13:36:25 +00:00
|
|
|
};
|
|
|
|
|
2020-07-31 13:20:42 +00:00
|
|
|
export default withTranslation()(Preferences);
|