diff --git a/src-ui/app/App.jsx b/src-ui/app/App.jsx
index 03ae751f..8cd46ab6 100644
--- a/src-ui/app/App.jsx
+++ b/src-ui/app/App.jsx
@@ -1,7 +1,7 @@
import { getCurrent } from "@tauri-apps/api/window";
import { useEffect, useRef } from "react";
import { useStartPython } from "@logics/useStartPython";
-import { useConfig } from "@logics/useConfig";
+// import { useConfig } from "@logics/useConfig";
import { MainPage } from "./main_page/MainPage";
import { ConfigPage } from "./config_page/ConfigPage";
import styles from "./App.module.scss";
@@ -17,22 +17,28 @@ export const App = () => {
};
+import { useSoftwareVersion } from "@logics_configs/useSoftwareVersion";
+import { useSelectedMicHost } from "@logics_configs/useSelectedMicHost";
+import { useSelectedMicDevice } from "@logics_configs/useSelectedMicDevice";
+import { useSelectedSpeakerDevice } from "@logics_configs/useSelectedSpeakerDevice";
+import { useMicThreshold } from "@logics_configs/useMicThreshold";
+import { useSpeakerThreshold } from "@logics_configs/useSpeakerThreshold";
+import { useEnableAutoClearMessageBox } from "@logics_configs/useEnableAutoClearMessageBox";
+import { useSendMessageButtonType } from "@logics_configs/useSendMessageButtonType";
+
const StartPythonFacadeComponent = () => {
const { asyncStartPython } = useStartPython();
const hasRunRef = useRef(false);
const main_page = getCurrent();
- const {
- getSoftwareVersion,
- // getMicHostList,
- getSelectedMicHost,
- // getMicDeviceList,
- getSelectedMicDevice,
- getSelectedSpeakerDevice,
-
- getEnableAutoClearMessageBox,
- getSendMessageButtonType,
- } = useConfig();
+ const { getSoftwareVersion } = useSoftwareVersion();
+ const { getSelectedMicHost } = useSelectedMicHost();
+ const { getSelectedMicDevice } = useSelectedMicDevice();
+ const { getSelectedSpeakerDevice } = useSelectedSpeakerDevice();
+ const { getMicThreshold } = useMicThreshold();
+ const { getSpeakerThreshold } = useSpeakerThreshold();
+ const { getEnableAutoClearMessageBox } = useEnableAutoClearMessageBox();
+ const { getSendMessageButtonType } = useSendMessageButtonType();
useEffect(() => {
@@ -40,12 +46,13 @@ const StartPythonFacadeComponent = () => {
if (!hasRunRef.current) {
asyncStartPython().then((result) => {
getSoftwareVersion();
- // getMicHostList();
getSelectedMicHost();
- // getMicDeviceList();
getSelectedMicDevice();
getSelectedSpeakerDevice();
+ getMicThreshold();
+ getSpeakerThreshold();
+
getEnableAutoClearMessageBox();
getSendMessageButtonType();
}).catch((err) => {
diff --git a/src-ui/app/config_page/ConfigPage.jsx b/src-ui/app/config_page/ConfigPage.jsx
index 2756e520..8c679d0f 100644
--- a/src-ui/app/config_page/ConfigPage.jsx
+++ b/src-ui/app/config_page/ConfigPage.jsx
@@ -4,7 +4,7 @@ import { Topbar } from "./topbar/Topbar.jsx";
import { SidebarSection } from "./sidebar_section/SidebarSection.jsx";
import { SettingSection } from "./setting_section/SettingSection.jsx";
-import { useSoftwareVersion } from "@store";
+import { useSoftwareVersion } from "@logics_configs/useSoftwareVersion";
import { useTranslation } from "react-i18next";
export const ConfigPage = () => {
diff --git a/src-ui/app/config_page/setting_section/setting_box/SettingBox.jsx b/src-ui/app/config_page/setting_section/setting_box/SettingBox.jsx
index 90669da1..4e9dbb04 100644
--- a/src-ui/app/config_page/setting_section/setting_box/SettingBox.jsx
+++ b/src-ui/app/config_page/setting_section/setting_box/SettingBox.jsx
@@ -1,17 +1,17 @@
-import { useSelectedConfigTabId } from "@store";
+import { useStore_SelectedConfigTabId } from "@store";
import { Device } from "./device/Device";
import { Appearance } from "./appearance/Appearance";
-import { Others } from "./others/Others";
-import { AboutVrct } from "./about_vrct/AboutVrct";
+// import { Others } from "./others/Others";
+// import { AboutVrct } from "./about_vrct/AboutVrct";
export const SettingBox = () => {
- const { currentSelectedConfigTabId } = useSelectedConfigTabId();
+ const { currentSelectedConfigTabId } = useStore_SelectedConfigTabId();
switch (currentSelectedConfigTabId) {
case "device":
return
dev
- - -Check Volume
{t(`config_page.side_menu_labels.${currentSelectedConfigTabId}`)}
diff --git a/src-ui/app/main_page/MainPage.jsx b/src-ui/app/main_page/MainPage.jsx index 66ee6bba..037b53aa 100644 --- a/src-ui/app/main_page/MainPage.jsx +++ b/src-ui/app/main_page/MainPage.jsx @@ -2,10 +2,10 @@ import clsx from "clsx"; import styles from "./MainPage.module.scss"; import { SidebarSection } from "./sidebar_section/SidebarSection"; import { MainSection } from "./main_section/MainSection"; -import { useIsOpenedConfigPage } from "@store"; +import { useStore_IsOpenedConfigPage } from "@store"; export const MainPage = () => { - const { currentIsOpenedConfigPage } = useIsOpenedConfigPage(); + const { currentIsOpenedConfigPage } = useStore_IsOpenedConfigPage(); return (