fix(settings): remove hardcoded Default option and add placeholder text
This commit is contained in:
parent
1f96da9381
commit
46d28a0616
2 changed files with 10 additions and 16 deletions
|
|
@ -33,13 +33,10 @@ export const MicrophoneSelector: React.FC<MicrophoneSelectorProps> = React.memo(
|
|||
await resetSetting("selected_microphone");
|
||||
};
|
||||
|
||||
const microphoneOptions = [
|
||||
{ value: "Default", label: "Default" },
|
||||
...audioDevices.map(device => ({
|
||||
value: device.name,
|
||||
label: device.name
|
||||
}))
|
||||
];
|
||||
const microphoneOptions = audioDevices.map(device => ({
|
||||
value: device.name,
|
||||
label: device.name
|
||||
}));
|
||||
|
||||
return (
|
||||
<SettingContainer
|
||||
|
|
@ -53,7 +50,7 @@ export const MicrophoneSelector: React.FC<MicrophoneSelectorProps> = React.memo(
|
|||
options={microphoneOptions}
|
||||
selectedValue={selectedMicrophone}
|
||||
onSelect={handleMicrophoneSelect}
|
||||
placeholder={isLoading ? "Loading..." : ""}
|
||||
placeholder={isLoading ? "Loading..." : "Select microphone..."}
|
||||
disabled={isUpdating("selected_microphone") || isLoading}
|
||||
onRefresh={refreshAudioDevices}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -34,13 +34,10 @@ export const OutputDeviceSelector: React.FC<OutputDeviceSelectorProps> = React.m
|
|||
await resetSetting("selected_output_device");
|
||||
};
|
||||
|
||||
const outputDeviceOptions = [
|
||||
{ value: "Default", label: "Default" },
|
||||
...outputDevices.map(device => ({
|
||||
value: device.name,
|
||||
label: device.name
|
||||
}))
|
||||
];
|
||||
const outputDeviceOptions = outputDevices.map(device => ({
|
||||
value: device.name,
|
||||
label: device.name
|
||||
}));
|
||||
|
||||
return (
|
||||
<SettingContainer
|
||||
|
|
@ -54,7 +51,7 @@ export const OutputDeviceSelector: React.FC<OutputDeviceSelectorProps> = React.m
|
|||
options={outputDeviceOptions}
|
||||
selectedValue={selectedOutputDevice}
|
||||
onSelect={handleOutputDeviceSelect}
|
||||
placeholder={isLoading ? "Loading..." : ""}
|
||||
placeholder={isLoading ? "Loading..." : "Select output device..."}
|
||||
disabled={isUpdating("selected_output_device") || isLoading}
|
||||
onRefresh={refreshOutputDevices}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue