From 0e623b73fd5d2c4489e1b083f230b08b1f8f5921 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Mon, 16 Sep 2024 04:06:34 +0900 Subject: [PATCH] [bugfix/Update] Config Page: Device Tab. Mic/Speaker auto select section. Fetch initial data. --- src-ui/app/App.jsx | 6 ++++++ src-ui/logics/useReceiveRoutes.js | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src-ui/app/App.jsx b/src-ui/app/App.jsx index 16247f71..155ee797 100644 --- a/src-ui/app/App.jsx +++ b/src-ui/app/App.jsx @@ -20,6 +20,8 @@ export const App = () => { import { useSoftwareVersion } from "@logics_configs/useSoftwareVersion"; +import { useEnableAutoMicSelect } from "@logics_configs/useEnableAutoMicSelect"; +import { useEnableAutoSpeakerSelect } from "@logics_configs/useEnableAutoSpeakerSelect"; import { useSelectedMicHost } from "@logics_configs/useSelectedMicHost"; import { useSelectedMicDevice } from "@logics_configs/useSelectedMicDevice"; import { useSelectedSpeakerDevice } from "@logics_configs/useSelectedSpeakerDevice"; @@ -37,6 +39,8 @@ const StartPythonFacadeComponent = () => { const main_page = getCurrent(); const { getSoftwareVersion } = useSoftwareVersion(); + const { getEnableAutoMicSelect } = useEnableAutoMicSelect(); + const { getEnableAutoSpeakerSelect } = useEnableAutoSpeakerSelect(); const { getSelectedMicHost } = useSelectedMicHost(); const { getSelectedMicDevice } = useSelectedMicDevice(); const { getSelectedSpeakerDevice } = useSelectedSpeakerDevice(); @@ -59,6 +63,8 @@ const StartPythonFacadeComponent = () => { getSelectableLanguageList(); + getEnableAutoMicSelect(); + getEnableAutoSpeakerSelect(); getSelectedMicHost(); getSelectedMicDevice(); getSelectedSpeakerDevice(); diff --git a/src-ui/logics/useReceiveRoutes.js b/src-ui/logics/useReceiveRoutes.js index 875b77a4..90ef429b 100644 --- a/src-ui/logics/useReceiveRoutes.js +++ b/src-ui/logics/useReceiveRoutes.js @@ -76,8 +76,10 @@ export const useReceiveRoutes = () => { "/config/version": updateSoftwareVersion, + "/config/enable_mic_automatic_selection": updateEnableAutoMicSelect, "/controller/callback_enable_mic_automatic_selection": updateEnableAutoMicSelect, "/controller/callback_disable_mic_automatic_selection": updateEnableAutoMicSelect, + "/config/enable_speaker_automatic_selection": updateEnableAutoSpeakerSelect, "/controller/callback_enable_speaker_automatic_selection": updateEnableAutoSpeakerSelect, "/controller/callback_disable_speaker_automatic_selection": updateEnableAutoSpeakerSelect,