[bugfix] Config Page: Device Tab. Add disabled behavior when the device is 'NoDevice'.
This commit is contained in:
@@ -38,23 +38,21 @@ const Mic_Container = () => {
|
|||||||
const { currentEnableAutoMicSelect, toggleEnableAutoMicSelect } = useEnableAutoMicSelect();
|
const { currentEnableAutoMicSelect, toggleEnableAutoMicSelect } = useEnableAutoMicSelect();
|
||||||
const { currentSelectedMicHost, setSelectedMicHost } = useSelectedMicHost();
|
const { currentSelectedMicHost, setSelectedMicHost } = useSelectedMicHost();
|
||||||
const { currentMicHostList } = useMicHostList();
|
const { currentMicHostList } = useMicHostList();
|
||||||
|
const { currentSelectedMicDevice, setSelectedMicDevice } = useSelectedMicDevice();
|
||||||
|
const { currentMicDeviceList } = useMicDeviceList();
|
||||||
const { onMouseLeaveFunction } = useOnMouseLeaveDropdownMenu();
|
const { onMouseLeaveFunction } = useOnMouseLeaveDropdownMenu();
|
||||||
const { currentEnableAutomaticMicThreshold, toggleEnableAutomaticMicThreshold } = useMicThreshold();
|
const { currentEnableAutomaticMicThreshold, toggleEnableAutomaticMicThreshold } = useMicThreshold();
|
||||||
|
|
||||||
|
|
||||||
const selectFunction_host = (selected_data) => {
|
const selectFunction_host = (selected_data) => {
|
||||||
setSelectedMicHost(selected_data.selected_id);
|
setSelectedMicHost(selected_data.selected_id);
|
||||||
};
|
};
|
||||||
|
|
||||||
const is_disabled_selector = currentEnableAutoMicSelect.data === true || currentEnableAutoMicSelect.data === "pending";
|
|
||||||
|
|
||||||
const { currentSelectedMicDevice, setSelectedMicDevice } = useSelectedMicDevice();
|
|
||||||
const { currentMicDeviceList } = useMicDeviceList();
|
|
||||||
|
|
||||||
const selectFunction_device = (selected_data) => {
|
const selectFunction_device = (selected_data) => {
|
||||||
setSelectedMicDevice(selected_data.selected_id);
|
setSelectedMicDevice(selected_data.selected_id);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const is_disabled_selector = currentEnableAutoMicSelect.data === true || currentEnableAutoMicSelect.data === "pending" || currentSelectedMicHost.data === "NoHost" || currentSelectedMicDevice.data === "NoDevice";
|
||||||
|
|
||||||
const getLabels = () => {
|
const getLabels = () => {
|
||||||
if (currentEnableAutomaticMicThreshold.data === true) {
|
if (currentEnableAutomaticMicThreshold.data === true) {
|
||||||
return {
|
return {
|
||||||
@@ -143,7 +141,7 @@ const Speaker_Container = () => {
|
|||||||
setSelectedSpeakerDevice(selected_data.selected_id);
|
setSelectedSpeakerDevice(selected_data.selected_id);
|
||||||
};
|
};
|
||||||
|
|
||||||
const is_disabled_selector = currentEnableAutoSpeakerSelect.data === true || currentEnableAutoSpeakerSelect.data === "pending";
|
const is_disabled_selector = currentEnableAutoSpeakerSelect.data === true || currentEnableAutoSpeakerSelect.data === "pending" || currentSelectedSpeakerDevice.data === "NoDevice";
|
||||||
|
|
||||||
const getLabels = () => {
|
const getLabels = () => {
|
||||||
if (currentEnableAutomaticSpeakerThreshold.data === true) {
|
if (currentEnableAutomaticSpeakerThreshold.data === true) {
|
||||||
|
|||||||
Reference in New Issue
Block a user