mirror of
https://github.com/lewismoten/data-over-audio.git
synced 2026-04-21 05:36:25 +08:00
move panel logic to individual files
This commit is contained in:
24
Panels/CommunicationsPanel.js
Normal file
24
Panels/CommunicationsPanel.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import BasePanel from './BasePanel';
|
||||
|
||||
class CommunicationsPanel extends BasePanel {
|
||||
constructor() {
|
||||
super('Communications');
|
||||
this.addSection('Send');
|
||||
this.addRadios('send-via', [
|
||||
{text: 'Analyzer', id: 'send-via-analyzer', eventName: 'sendAnalyzerChange'},
|
||||
{text: 'Speakers', id: 'send-via-speaker', eventName: 'sendSpeakersChange'}
|
||||
]);
|
||||
this.addSection('Receive');
|
||||
this.addCheckboxes('receive-via', [
|
||||
{text: 'Listening', id: 'is-listening-checkbox', eventName: 'listeningChange'}
|
||||
]);
|
||||
}
|
||||
isListeningChecked = () => {
|
||||
return this.getCheckedById('is-listening-checkbox');
|
||||
}
|
||||
setListening = checked => this.setCheckedById('is-listening-checkbox', checked);
|
||||
setSendSpeakers = checked => this.setCheckedById('send-via-speaker', checked);
|
||||
setSendAnalyzer = checked => this.setCheckedById('send-via-analyzer', checked);
|
||||
}
|
||||
|
||||
export default CommunicationsPanel;
|
||||
Reference in New Issue
Block a user