9bf3f54183
* feat(html5): initial implementation of Gladia transcriptions to BBB 3.0 * fix(transcription): Add missing locales and fix invalid cc menu key * fix(bbb-transcription-controller): Bump transcription controller to fix some bugs * fix: adjust yq syntax for setting fs esl password in transctiption-controller * fix(transcription): Use newer useSettings format from transcription options * fix(captions): Correctly use captions settings --------- Co-authored-by: João Victor <joaovictornunes973@gmail.com> Co-authored-by: Anton Georgiev <anto.georgiev@gmail.com> Co-authored-by: Ramón Souza <contato@ramonsouza.com>
28 lines
633 B
JavaScript
28 lines
633 B
JavaScript
import React from 'react';
|
|
|
|
export default class BaseMenu extends React.Component {
|
|
constructor(props) {
|
|
super(props);
|
|
|
|
this.handleUpdateSettings = props.handleUpdateSettings;
|
|
}
|
|
|
|
handleToggle(key) {
|
|
const obj = this.state;
|
|
obj.settings[key] = !this.state.settings[key];
|
|
|
|
this.setState(obj, () => {
|
|
this.handleUpdateSettings(this.state.settingsName, this.state.settings);
|
|
});
|
|
}
|
|
|
|
handleInput(key, e) {
|
|
const obj = this.state;
|
|
obj.settings[key] = e.target.value;
|
|
|
|
this.setState(obj, () => {
|
|
this.handleUpdateSettings(this.state.settingsName, this.state.settings);
|
|
});
|
|
}
|
|
}
|