Add option for coloured edges on progress page

This commit is contained in:
2021-10-03 17:43:22 +01:00
parent aec4c8efcf
commit 4c2f1613ff
9 changed files with 83 additions and 23 deletions

View File

@@ -61,6 +61,7 @@ export default withRouter(class Progress extends React.Component {
showSettings: false,
soundInput: this.props.sound,
themeInput: this.props.theme,
coloredEdgesInput: this.props.coloredEdges,
setIds: [],
attemptNumber: 1,
attemptHistory: {},
@@ -232,9 +233,16 @@ export default withRouter(class Progress extends React.Component {
});
}
handleColoredEdgesInputChange = (event) => {
this.setState({
coloredEdgesInput: event.target.checked,
});
}
saveSettings = (globalChange) => {
this.props.handleSoundChange(this.state.soundInput, globalChange);
this.props.handleThemeChange(this.state.themeInput, globalChange);
this.props.handleColoredEdgesChange(this.state.coloredEdgesInput, globalChange);
this.hideSettings();
}
@@ -702,9 +710,11 @@ export default withRouter(class Progress extends React.Component {
saveSettings={this.saveSettings}
handleSoundInputChange={this.handleSoundInputChange}
handleThemeInputChange={this.handleThemeInputChange}
handleColoredEdgesInputChange={this.handleColoredEdgesInputChange}
themes={this.props.themes}
soundInput={this.state.soundInput}
themeInput={this.state.themeInput}
coloredEdgesInput={this.state.coloredEdgesInput}
/>