fix: address PR review comments
- useCameraDevices: remove selectedDeviceId from useEffect deps (use ref instead) - useCameraDevices: fall back to first available device when selected device is unplugged - i18n: add missing keys (audio.defaultMicrophone, webcam.defaultCamera, webcam.searching) to en/es/zh-CN - LaunchWindow: replace hardcoded strings with t() i18n calls - tests: add afterEach(vi.resetAllMocks()), improve permission test assertions, add stale device fallback test
This commit is contained in:
@@ -112,10 +112,10 @@ export function LaunchWindow() {
|
||||
|
||||
const selectedMicLabel =
|
||||
micDevices.find((d) => d.deviceId === (microphoneDeviceId || selectedMicId))?.label ||
|
||||
"Default Microphone";
|
||||
t("audio.defaultMicrophone");
|
||||
const selectedCameraLabel =
|
||||
cameraDevices.find((d) => d.deviceId === (webcamDeviceId || selectedCameraId))?.label ||
|
||||
"Default Camera";
|
||||
t("webcam.defaultCamera");
|
||||
|
||||
const { level } = useAudioLevelMeter({
|
||||
enabled: showMicControls,
|
||||
@@ -340,7 +340,7 @@ export function LaunchWindow() {
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<span className="text-white/40 text-[10px] italic">Searching...</span>
|
||||
<span className="text-white/40 text-[10px] italic">{t("webcam.searching")}</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user