diff --git a/src/components/icons/ResetIcon.tsx b/src/components/icons/ResetIcon.tsx index 09f2e46..eb7db62 100644 --- a/src/components/icons/ResetIcon.tsx +++ b/src/components/icons/ResetIcon.tsx @@ -1,7 +1,7 @@ const ResetIcon = () => { return ( - + ); }; diff --git a/src/components/settings/MicrophoneSelector.tsx b/src/components/settings/MicrophoneSelector.tsx index dc9bccf..f37ab38 100644 --- a/src/components/settings/MicrophoneSelector.tsx +++ b/src/components/settings/MicrophoneSelector.tsx @@ -23,7 +23,8 @@ export const MicrophoneSelector: React.FC = React.memo( refreshAudioDevices, } = useSettings(); - const selectedMicrophone = getSetting("selected_microphone") || "Default"; + const selectedMicrophone = getSetting("selected_microphone") === "default" ? "Default" : getSetting("selected_microphone") || "Default"; + const handleMicrophoneSelect = async (deviceName: string) => { await updateSetting("selected_microphone", deviceName); @@ -50,8 +51,8 @@ export const MicrophoneSelector: React.FC = React.memo( options={microphoneOptions} selectedValue={selectedMicrophone} onSelect={handleMicrophoneSelect} - placeholder={isLoading ? "Loading..." : "Select microphone..."} - disabled={isUpdating("selected_microphone") || isLoading} + placeholder={isLoading || audioDevices.length === 0 ? "Loading..." : "Select microphone..."} + disabled={isUpdating("selected_microphone") || isLoading || audioDevices.length === 0} onRefresh={refreshAudioDevices} /> = React.m refreshOutputDevices, } = useSettings(); - const selectedOutputDevice = - getSetting("selected_output_device") || "Default"; + const selectedOutputDevice = getSetting("selected_output_device") === "default" ? "Default" : getSetting("selected_output_device") || "Default"; const handleOutputDeviceSelect = async (deviceName: string) => { await updateSetting("selected_output_device", deviceName); @@ -51,8 +50,8 @@ export const OutputDeviceSelector: React.FC = React.m options={outputDeviceOptions} selectedValue={selectedOutputDevice} onSelect={handleOutputDeviceSelect} - placeholder={isLoading ? "Loading..." : "Select output device..."} - disabled={isUpdating("selected_output_device") || isLoading} + placeholder={isLoading || outputDevices.length === 0 ? "Loading..." : "Select output device..."} + disabled={isUpdating("selected_output_device") || isLoading || outputDevices.length === 0} onRefresh={refreshOutputDevices} />