👍️[Update] UI: backendのendpointに合わせて修正
This commit is contained in:
@@ -7,15 +7,15 @@ export const useEnableAutoClearMessageBox = () => {
|
||||
|
||||
const getEnableAutoClearMessageBox = () => {
|
||||
updateEnableAutoClearMessageBox(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/config/enable_auto_clear_message_box");
|
||||
asyncStdoutToPython("/get/auto_clear_message_box");
|
||||
};
|
||||
|
||||
const toggleEnableAutoClearMessageBox = () => {
|
||||
updateEnableAutoClearMessageBox(() => new Promise(() => {}));
|
||||
if (currentEnableAutoClearMessageBox.data) {
|
||||
asyncStdoutToPython("/controller/callback_disable_auto_clear_chatbox");
|
||||
asyncStdoutToPython("/set/disable_auto_clear_message_box");
|
||||
} else {
|
||||
asyncStdoutToPython("/controller/callback_enable_auto_clear_chatbox");
|
||||
asyncStdoutToPython("/set/enable_auto_clear_message_box");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -7,15 +7,15 @@ export const useEnableAutoMicSelect = () => {
|
||||
|
||||
const getEnableAutoMicSelect = () => {
|
||||
updateEnableAutoMicSelect(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/config/enable_mic_automatic_selection");
|
||||
asyncStdoutToPython("/get/auto_mic_select");
|
||||
};
|
||||
|
||||
const toggleEnableAutoMicSelect = () => {
|
||||
updateEnableAutoMicSelect(() => new Promise(() => {}));
|
||||
if (currentEnableAutoMicSelect.data) {
|
||||
asyncStdoutToPython("/controller/callback_disable_mic_automatic_selection");
|
||||
asyncStdoutToPython("/set/disable_auto_mic_select");
|
||||
} else {
|
||||
asyncStdoutToPython("/controller/callback_enable_mic_automatic_selection");
|
||||
asyncStdoutToPython("/set/enable_auto_mic_select");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -7,15 +7,15 @@ export const useEnableAutoSpeakerSelect = () => {
|
||||
|
||||
const getEnableAutoSpeakerSelect = () => {
|
||||
updateEnableAutoSpeakerSelect(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/config/enable_speaker_automatic_selection");
|
||||
asyncStdoutToPython("/get/auto_speaker_select");
|
||||
};
|
||||
|
||||
const toggleEnableAutoSpeakerSelect = () => {
|
||||
updateEnableAutoSpeakerSelect(() => new Promise(() => {}));
|
||||
if (currentEnableAutoSpeakerSelect.data) {
|
||||
asyncStdoutToPython("/controller/callback_disable_speaker_automatic_selection");
|
||||
asyncStdoutToPython("/set/disable_auto_speaker_select");
|
||||
} else {
|
||||
asyncStdoutToPython("/controller/callback_enable_speaker_automatic_selection");
|
||||
asyncStdoutToPython("/set/enable_auto_speaker_select");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ export const useMicDeviceList = () => {
|
||||
|
||||
const getMicDeviceList = () => {
|
||||
updateMicDeviceList(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/controller/list_mic_device");
|
||||
asyncStdoutToPython("/get/list_mic_device");
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -7,7 +7,7 @@ export const useMicHostList = () => {
|
||||
|
||||
const getMicHostList = () => {
|
||||
updateMicHostList(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/controller/list_mic_host");
|
||||
asyncStdoutToPython("/get/list_mic_host");
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -7,24 +7,24 @@ export const useMicThreshold = () => {
|
||||
const { updateEnableAutomaticMicThreshold, currentEnableAutomaticMicThreshold } = useStore_EnableAutomaticMicThreshold();
|
||||
|
||||
const getMicThreshold = () => {
|
||||
asyncStdoutToPython("/config/input_mic_energy_threshold");
|
||||
asyncStdoutToPython("/get/mic_energy_threshold");
|
||||
};
|
||||
|
||||
const setMicThreshold = (mic_threshold) => {
|
||||
asyncStdoutToPython("/controller/callback_set_mic_energy_threshold", mic_threshold);
|
||||
asyncStdoutToPython("/set/mic_energy_threshold", mic_threshold);
|
||||
};
|
||||
|
||||
const getEnableAutomaticMicThreshold = () => {
|
||||
updateEnableAutomaticMicThreshold(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/config/input_mic_dynamic_energy_threshold");
|
||||
asyncStdoutToPython("/get/mic_dynamic_energy_threshold");
|
||||
};
|
||||
|
||||
const toggleEnableAutomaticMicThreshold = () => {
|
||||
updateEnableAutomaticMicThreshold(() => new Promise(() => {}));
|
||||
if (currentEnableAutomaticMicThreshold.data) {
|
||||
asyncStdoutToPython("/controller/callback_disable_mic_dynamic_energy_threshold");
|
||||
asyncStdoutToPython("/set/disable_mic_dynamic_energy_threshold");
|
||||
} else {
|
||||
asyncStdoutToPython("/controller/callback_enable_mic_dynamic_energy_threshold");
|
||||
asyncStdoutToPython("/set/enable_mic_dynamic_energy_threshold");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ export const useSelectedMicDevice = () => {
|
||||
|
||||
const getSelectedMicDevice = () => {
|
||||
updateSelectedMicDevice(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/config/choice_mic_device");
|
||||
asyncStdoutToPython("/get/selected_mic_device");
|
||||
};
|
||||
|
||||
const setSelectedMicDevice = (selected_mic_device) => {
|
||||
updateSelectedMicDevice(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/controller/callback_set_mic_device", selected_mic_device);
|
||||
asyncStdoutToPython("/set/selected_mic_device", selected_mic_device);
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -7,12 +7,12 @@ export const useSelectedMicHost = () => {
|
||||
|
||||
const getSelectedMicHost = () => {
|
||||
updateSelectedMicHost(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/config/choice_mic_host");
|
||||
asyncStdoutToPython("/get/selected_mic_host");
|
||||
};
|
||||
|
||||
const setSelectedMicHost = (selected_mic_host) => {
|
||||
updateSelectedMicHost(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/controller/callback_set_mic_host", selected_mic_host);
|
||||
asyncStdoutToPython("/set/selected_mic_host", selected_mic_host);
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -7,12 +7,12 @@ export const useSelectedSpeakerDevice = () => {
|
||||
|
||||
const getSelectedSpeakerDevice = () => {
|
||||
updateSelectedSpeakerDevice(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/config/choice_speaker_device");
|
||||
asyncStdoutToPython("/get/selected_speaker_device");
|
||||
};
|
||||
|
||||
const setSelectedSpeakerDevice = (selected_speaker_device) => {
|
||||
updateSelectedSpeakerDevice(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/controller/callback_set_speaker_device", selected_speaker_device);
|
||||
asyncStdoutToPython("/set/selected_speaker_device", selected_speaker_device);
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -7,12 +7,12 @@ export const useSendMessageButtonType = () => {
|
||||
|
||||
const getSendMessageButtonType = () => {
|
||||
updateSendMessageButtonType(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/config/send_message_button_type");
|
||||
asyncStdoutToPython("/get/send_message_button_type");
|
||||
};
|
||||
|
||||
const setSendMessageButtonType = (selected_type) => {
|
||||
updateSendMessageButtonType(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/controller/callback_set_send_message_button_type", selected_type);
|
||||
asyncStdoutToPython("/set/send_message_button_type", selected_type);
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -7,7 +7,7 @@ export const useSoftwareVersion = () => {
|
||||
|
||||
const getSoftwareVersion = () => {
|
||||
updateSoftwareVersion(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/config/version");
|
||||
asyncStdoutToPython("/get/version");
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -7,7 +7,7 @@ export const useSpeakerDeviceList = () => {
|
||||
|
||||
const getSpeakerDeviceList = () => {
|
||||
updateSpeakerDeviceList(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/controller/list_speaker_device");
|
||||
asyncStdoutToPython("/get/list_speaker_device");
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -7,24 +7,24 @@ export const useSpeakerThreshold = () => {
|
||||
const { updateEnableAutomaticSpeakerThreshold, currentEnableAutomaticSpeakerThreshold } = useStore_EnableAutomaticSpeakerThreshold();
|
||||
|
||||
const getSpeakerThreshold = () => {
|
||||
asyncStdoutToPython("/config/input_speaker_energy_threshold");
|
||||
asyncStdoutToPython("/get/speaker_energy_threshold");
|
||||
};
|
||||
|
||||
const setSpeakerThreshold = (speaker_threshold) => {
|
||||
asyncStdoutToPython("/controller/callback_set_speaker_energy_threshold", speaker_threshold);
|
||||
asyncStdoutToPython("/set/speaker_energy_threshold", speaker_threshold);
|
||||
};
|
||||
|
||||
const getEnableAutomaticSpeakerThreshold = () => {
|
||||
updateEnableAutomaticSpeakerThreshold(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/config/input_speaker_dynamic_energy_threshold");
|
||||
asyncStdoutToPython("/get/speaker_dynamic_energy_threshold");
|
||||
};
|
||||
|
||||
const toggleEnableAutomaticSpeakerThreshold = () => {
|
||||
updateEnableAutomaticSpeakerThreshold(() => new Promise(() => {}));
|
||||
if (currentEnableAutomaticSpeakerThreshold.data) {
|
||||
asyncStdoutToPython("/controller/callback_disable_speaker_dynamic_energy_threshold");
|
||||
asyncStdoutToPython("/set/disable_speaker_dynamic_energy_threshold");
|
||||
} else {
|
||||
asyncStdoutToPython("/controller/callback_enable_speaker_dynamic_energy_threshold");
|
||||
asyncStdoutToPython("/set/enable_speaker_dynamic_energy_threshold");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ export const useUiLanguage = () => {
|
||||
|
||||
const getUiLanguage = () => {
|
||||
updateUiLanguage(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/config/ui_language");
|
||||
asyncStdoutToPython("/get/ui_language");
|
||||
};
|
||||
|
||||
const setUiLanguage = (selected_ui_language) => {
|
||||
updateUiLanguage(() => new Promise(() => {}));
|
||||
asyncStdoutToPython("/controller/callback_set_ui_language", selected_ui_language);
|
||||
asyncStdoutToPython("/set/ui_language", selected_ui_language);
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user