Skip to content

armgit / Handy

Public Imported from GitHub
0

A free, open source, and extensible speech-to-text application that works completely offline.

fix(settings): remove hardcoded Default option and add placeholder text

Vlad Gerasimov46d28a06166e
diff --git a/src/components/settings/MicrophoneSelector.tsx b/src/components/settings/MicrophoneSelector.tsx
index 2b80342b..dc9bccf8 100644
--- a/src/components/settings/MicrophoneSelector.tsx
+++ b/src/components/settings/MicrophoneSelector.tsx
@@ -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}
/>
diff --git a/src/components/settings/OutputDeviceSelector.tsx b/src/components/settings/OutputDeviceSelector.tsx
index a13fc646..156805e1 100644
--- a/src/components/settings/OutputDeviceSelector.tsx
+++ b/src/components/settings/OutputDeviceSelector.tsx
@@ -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}
/>