diff --git a/src-ui/app/config_page/version_label/VersionLabel.jsx b/src-ui/app/config_page/version_label/VersionLabel.jsx
index 95abd94d..32540cc2 100644
--- a/src-ui/app/config_page/version_label/VersionLabel.jsx
+++ b/src-ui/app/config_page/version_label/VersionLabel.jsx
@@ -1,4 +1,4 @@
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import { useState } from "react";
import clsx from "clsx";
import styles from "./VersionLabel.module.scss";
@@ -10,7 +10,7 @@ import CheckMarkSvg from "@images/check_mark.svg?react";
export const VersionLabel = () => {
const [is_copied, setIsCopied] = useState(false);
- const { t } = useTranslation();
+ const { t } = useI18n();
const { currentSoftwareVersion } = useSoftwareVersion();
const { currentComputeMode } = useComputeMode();
diff --git a/src-ui/app/main_page/main_section/MainSection.jsx b/src-ui/app/main_page/main_section/MainSection.jsx
index b0ffb77c..5a9140df 100644
--- a/src-ui/app/main_page/main_section/MainSection.jsx
+++ b/src-ui/app/main_page/main_section/MainSection.jsx
@@ -1,4 +1,4 @@
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import styles from "./MainSection.module.scss";
import { TopBar } from "./top_bar/TopBar";
@@ -37,7 +37,7 @@ export const MainSection = () => {
const HandleLanguageSelector = () => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const { currentIsOpenedLanguageSelector, updateIsOpenedLanguageSelector } = useStore_IsOpenedLanguageSelector();
const {
currentSelectedPresetTabNumber,
diff --git a/src-ui/app/main_page/main_section/language_selector/LanguageSelector.jsx b/src-ui/app/main_page/main_section/language_selector/LanguageSelector.jsx
index 3665df67..6d4be514 100644
--- a/src-ui/app/main_page/main_section/language_selector/LanguageSelector.jsx
+++ b/src-ui/app/main_page/main_section/language_selector/LanguageSelector.jsx
@@ -1,11 +1,11 @@
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import { useLanguageSettings } from "@logics_main";
import styles from "./LanguageSelector.module.scss";
import { LanguageSelectorTopBar } from "./language_selector_top_bar/LanguageSelectorTopBar";
export const LanguageSelector = ({ title, onClickFunction }) => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const { currentSelectableLanguageList } = useLanguageSettings();
const groupLanguagesByFirstLetter = (languages) => {
diff --git a/src-ui/app/main_page/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.jsx b/src-ui/app/main_page/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.jsx
index 1ea1c832..b0bdc8de 100644
--- a/src-ui/app/main_page/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.jsx
+++ b/src-ui/app/main_page/main_section/language_selector/language_selector_top_bar/LanguageSelectorTopBar.jsx
@@ -1,9 +1,9 @@
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import styles from "./LanguageSelectorTopBar.module.scss";
import { useStore_IsOpenedLanguageSelector } from "@store";
export const LanguageSelectorTopBar = (props) => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const { updateIsOpenedLanguageSelector } = useStore_IsOpenedLanguageSelector();
const closeLanguageSelector = () => {
updateIsOpenedLanguageSelector({
diff --git a/src-ui/app/main_page/main_section/message_container/log_box/LogBox.jsx b/src-ui/app/main_page/main_section/message_container/log_box/LogBox.jsx
index 8aa8d2ec..aa37ac12 100644
--- a/src-ui/app/main_page/main_section/message_container/log_box/LogBox.jsx
+++ b/src-ui/app/main_page/main_section/message_container/log_box/LogBox.jsx
@@ -27,9 +27,9 @@ export const LogBox = () => {
);
};
-import { useMessageLogUiScaling } from "@logics_configs";
+import { useAppearance } from "@logics_configs";
const MessageLogUiSizeController = () => {
- const { currentMessageLogUiScaling } = useMessageLogUiScaling();
+ const { currentMessageLogUiScaling } = useAppearance();
const font_size = currentMessageLogUiScaling.data / 100;
useEffect(() => {
diff --git a/src-ui/app/main_page/main_section/message_container/log_box/message_container/MessageContainer.jsx b/src-ui/app/main_page/main_section/message_container/log_box/message_container/MessageContainer.jsx
index 1dbc7607..d982f27c 100644
--- a/src-ui/app/main_page/main_section/message_container/log_box/message_container/MessageContainer.jsx
+++ b/src-ui/app/main_page/main_section/message_container/log_box/message_container/MessageContainer.jsx
@@ -1,18 +1,18 @@
import { useState } from "react";
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import clsx from "clsx";
import styles from "./MessageContainer.module.scss";
import { MessageSubMenuContainer } from "./message_sub_menu_container/MessageSubMenuContainer";
import { useMessage } from "@logics_common";
-import { useShowResendButton } from "@logics_configs";
+import { useAppearance } from "@logics_configs";
export const MessageContainer = ({ messages, status, category, created_at }) => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const {
sendMessage,
updateMessageInputValue,
} = useMessage();
- const { currentShowResendButton } = useShowResendButton();
+ const { currentShowResendButton } = useAppearance();
const [is_hovered, setIsHovered] = useState(false);
const [is_locked, setIsLocked] = useState(false);
diff --git a/src-ui/app/main_page/main_section/message_container/log_box/message_container/message_sub_menu_container/MessageSubMenuContainer.jsx b/src-ui/app/main_page/main_section/message_container/log_box/message_container/message_sub_menu_container/MessageSubMenuContainer.jsx
index 6144ff37..7b2b2f3d 100644
--- a/src-ui/app/main_page/main_section/message_container/log_box/message_container/message_sub_menu_container/MessageSubMenuContainer.jsx
+++ b/src-ui/app/main_page/main_section/message_container/log_box/message_container/message_sub_menu_container/MessageSubMenuContainer.jsx
@@ -1,5 +1,5 @@
import React, { useState, useRef } from "react";
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import Tooltip, { tooltipClasses } from '@mui/material/Tooltip';
import styles from "./MessageSubMenuContainer.module.scss";
import SendMessageSvg from "@images/send_message.svg?react";
@@ -68,6 +68,6 @@ export const MessageSubMenuContainer = (props) => {
};
const Title_p = () => {
- const { t } = useTranslation();
+ const { t } = useI18n();
return
;
};
diff --git a/src-ui/app/main_page/main_section/message_container/message_input_box/MessageInputBox.jsx b/src-ui/app/main_page/main_section/message_container/message_input_box/MessageInputBox.jsx
index 765ea9e1..6aa32092 100644
--- a/src-ui/app/main_page/main_section/message_container/message_input_box/MessageInputBox.jsx
+++ b/src-ui/app/main_page/main_section/message_container/message_input_box/MessageInputBox.jsx
@@ -2,7 +2,7 @@ import { useState, useEffect, useLayoutEffect, useRef } from "react";
import styles from "./MessageInputBox.module.scss";
import SendMessageSvg from "@images/send_message.svg?react";
import { useMessage } from "@logics_common";
-import { useSendMessageButtonType, useEnableAutoClearMessageInputBox } from "@logics_configs";
+import { useAppearance, useOthers } from "@logics_configs";
import { useMessageLogScroll } from "@logics_main";
import { store } from "@store";
@@ -18,8 +18,8 @@ export const MessageInputBox = () => {
stopTyping,
} = useMessage();
- const { currentEnableAutoClearMessageInputBox } = useEnableAutoClearMessageInputBox();
- const { currentSendMessageButtonType } = useSendMessageButtonType();
+ const { currentEnableAutoClearMessageInputBox } = useOthers();
+ const { currentSendMessageButtonType } = useAppearance();
const { scrollToBottom } = useMessageLogScroll();
diff --git a/src-ui/app/main_page/main_section/message_container/message_log_settings_container/MessageLogSettingsContainer.jsx b/src-ui/app/main_page/main_section/message_container/message_log_settings_container/MessageLogSettingsContainer.jsx
index 8b0bbc32..ddff4a51 100644
--- a/src-ui/app/main_page/main_section/message_container/message_log_settings_container/MessageLogSettingsContainer.jsx
+++ b/src-ui/app/main_page/main_section/message_container/message_log_settings_container/MessageLogSettingsContainer.jsx
@@ -1,13 +1,13 @@
import { useState } from "react";
import styles from "./MessageLogSettingsContainer.module.scss";
import clsx from "clsx";
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import { MessageLogUiScalingContainer } from "@setting_box";
import ConfigSvg from "@images/configuration.svg?react";
export const MessageLogSettingsContainer = (props) => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const [is_opened, setIsOpened] = useState(false);
const [is_hovered, setIsHovered] = useState(false);
diff --git a/src-ui/app/main_page/main_section/top_bar/right_side_components/RightSideComponents.jsx b/src-ui/app/main_page/main_section/top_bar/right_side_components/RightSideComponents.jsx
index 3f8be6e2..6c1ff7d3 100644
--- a/src-ui/app/main_page/main_section/top_bar/right_side_components/RightSideComponents.jsx
+++ b/src-ui/app/main_page/main_section/top_bar/right_side_components/RightSideComponents.jsx
@@ -1,11 +1,11 @@
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import styles from "./RightSideComponents.module.scss";
import RefreshSvg from "@images/refresh.svg?react";
import HelpSvg from "@images/help.svg?react";
import { useStore_OpenedQuickSetting } from "@store";
import { useSoftwareVersion } from "@logics_common";
-import { useIsEnabledOverlaySmallLog, useIsEnabledOverlayLargeLog, useEnableVrcMicMuteSync } from "@logics_configs";
+import { useVr, useOthers } from "@logics_configs";
import { OpenQuickSettingButton } from "./_buttons/OpenQuickSettingButton";
export const RightSideComponents = () => {
@@ -30,10 +30,12 @@ export const RightSideComponents = () => {
};
const OpenOverlayQuickSetting = () => {
- // const { t } = useTranslation();
+ // const { t } = useI18n();
const { updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
- const { currentIsEnabledOverlaySmallLog } = useIsEnabledOverlaySmallLog();
- const { currentIsEnabledOverlayLargeLog } = useIsEnabledOverlayLargeLog();
+ const {
+ currentIsEnabledOverlaySmallLog,
+ currentIsEnabledOverlayLargeLog,
+ } = useVr();
const onClickFunction = () => {
updateOpenedQuickSetting("overlay");
@@ -50,7 +52,7 @@ const OpenOverlayQuickSetting = () => {
);
};
const PluginsQuickSetting = () => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const { updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
const onClickFunction = () => {
@@ -66,9 +68,9 @@ const PluginsQuickSetting = () => {
};
const OpenVrcMicMuteSyncQuickSetting = () => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const { updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
- const { currentEnableVrcMicMuteSync } = useEnableVrcMicMuteSync();
+ const { currentEnableVrcMicMuteSync } = useOthers();
const onClickFunction = () => {
updateOpenedQuickSetting("vrc_mic_mute_sync");
@@ -85,7 +87,7 @@ const OpenVrcMicMuteSyncQuickSetting = () => {
const SoftwareUpdateAvailableButton = () => {
const { currentLatestSoftwareVersionInfo } = useSoftwareVersion();
- const { t } = useTranslation();
+ const { t } = useI18n();
if (currentLatestSoftwareVersionInfo.data.is_update_available === false) return null;
const { updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
diff --git a/src-ui/app/main_page/main_section/top_bar/right_side_components/_buttons/OpenQuickSettingButton.jsx b/src-ui/app/main_page/main_section/top_bar/right_side_components/_buttons/OpenQuickSettingButton.jsx
index abc779e3..c24f40f4 100644
--- a/src-ui/app/main_page/main_section/top_bar/right_side_components/_buttons/OpenQuickSettingButton.jsx
+++ b/src-ui/app/main_page/main_section/top_bar/right_side_components/_buttons/OpenQuickSettingButton.jsx
@@ -1,9 +1,9 @@
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import clsx from "clsx";
import styles from "./OpenQuickSettingButton.module.scss";
export const OpenQuickSettingButton = (props) => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const variable = (typeof props.variable === "boolean") ? props.variable : null;
return (
diff --git a/src-ui/app/main_page/sidebar_section/language_settings/LanguageSettings.jsx b/src-ui/app/main_page/sidebar_section/language_settings/LanguageSettings.jsx
index 7d90bdf4..4665896f 100644
--- a/src-ui/app/main_page/sidebar_section/language_settings/LanguageSettings.jsx
+++ b/src-ui/app/main_page/sidebar_section/language_settings/LanguageSettings.jsx
@@ -1,4 +1,4 @@
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import styles from "./LanguageSettings.module.scss";
import { PresetTabSelector } from "./preset_tab_selector/PresetTabSelector";
import { LanguageSelectorOpenButton } from "./language_selector_open_button/LanguageSelectorOpenButton";
@@ -8,7 +8,7 @@ import { AddRemoveTargetLanguageButtons } from "./add_remove_target_language_but
import { useStore_IsOpenedTranslatorSelector } from "@store";
export const LanguageSettings = () => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const { updateIsOpenedTranslatorSelector } = useStore_IsOpenedTranslatorSelector();
const closeTranslatorSelector = () => updateIsOpenedTranslatorSelector(false);
@@ -26,7 +26,7 @@ import HeadphonesSvg from "@images/headphones.svg?react";
import { useMainFunction } from "@logics_main";
const PresetContainer = () => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const { currentTranscriptionSendStatus, currentTranscriptionReceiveStatus } = useMainFunction();
const yourLanguageSettings = {
diff --git a/src-ui/app/main_page/sidebar_section/language_settings/language_selector_open_button/LanguageSelectorOpenButton.jsx b/src-ui/app/main_page/sidebar_section/language_settings/language_selector_open_button/LanguageSelectorOpenButton.jsx
index eacbf8f4..e6098a3f 100644
--- a/src-ui/app/main_page/sidebar_section/language_settings/language_selector_open_button/LanguageSelectorOpenButton.jsx
+++ b/src-ui/app/main_page/sidebar_section/language_settings/language_selector_open_button/LanguageSelectorOpenButton.jsx
@@ -1,4 +1,4 @@
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import clsx from "clsx";
import styles from "./LanguageSelectorOpenButton.module.scss";
import ArrowLeftSvg from "@images/arrow_left.svg?react";
@@ -8,7 +8,7 @@ import {
} from "@logics_main";
export const LanguageSelectorOpenButton = ({ TurnedOnSvgComponent, is_turned_on, selector_key, target_key }) => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const { updateIsOpenedLanguageSelector, currentIsOpenedLanguageSelector } = useStore_IsOpenedLanguageSelector();
const {
diff --git a/src-ui/app/main_page/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.jsx b/src-ui/app/main_page/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.jsx
index ef8d7c0b..0c953f96 100644
--- a/src-ui/app/main_page/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.jsx
+++ b/src-ui/app/main_page/sidebar_section/language_settings/language_swap_button/LanguageSwapButton.jsx
@@ -1,6 +1,6 @@
import { useState } from "react";
import clsx from "clsx";
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import styles from "./LanguageSwapButton.module.scss";
@@ -9,7 +9,7 @@ import { useLanguageSettings } from "@logics_main";
export const LanguageSwapButton = () => {
const [isHovered, setIsHovered] = useState(false);
- const { t } = useTranslation();
+ const { t } = useI18n();
const { swapSelectedLanguages } = useLanguageSettings();
const label = isHovered
diff --git a/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.jsx b/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.jsx
index 7a869e8a..773aab96 100644
--- a/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.jsx
+++ b/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.jsx
@@ -1,4 +1,4 @@
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import { updateLabelsById } from "@utils";
import styles from "./TranslatorSelectorOpenButton.module.scss";
import { TranslatorSelector } from "./translator_selector/TranslatorSelector";
@@ -7,7 +7,7 @@ import { useLanguageSettings } from "@logics_main";
import WarningSvg from "@images/warning.svg?react";
export const TranslatorSelectorOpenButton = () => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const {
currentSelectedYourLanguages,
currentSelectedTargetLanguages,
diff --git a/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/translator_selector/TranslatorSelector.jsx b/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/translator_selector/TranslatorSelector.jsx
index cdbc159e..094c9255 100644
--- a/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/translator_selector/TranslatorSelector.jsx
+++ b/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/translator_selector/TranslatorSelector.jsx
@@ -1,12 +1,13 @@
import clsx from "clsx";
import styles from "./TranslatorSelector.module.scss";
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import { chunkArray } from "@utils";
import { useStore_IsOpenedTranslatorSelector } from "@store";
import { useLanguageSettings } from "@logics_main";
-export const TranslatorSelector = ({selected_id, translation_engines, is_selected_same_language}) => { const { t } = useTranslation();
+export const TranslatorSelector = ({selected_id, translation_engines, is_selected_same_language}) => {
+ const { t } = useI18n();
const columns = chunkArray(translation_engines, 2);
return (
@@ -46,7 +47,7 @@ export const TranslatorSelector = ({selected_id, translation_engines, is_selecte
};
const TranslatorBox = (props) => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const { setSelectedTranslationEngines} = useLanguageSettings();
const { updateIsOpenedTranslatorSelector} = useStore_IsOpenedTranslatorSelector();
diff --git a/src-ui/app/main_page/sidebar_section/main_function_switch/MainFunctionSwitch.jsx b/src-ui/app/main_page/sidebar_section/main_function_switch/MainFunctionSwitch.jsx
index 991239f8..b3f031b6 100644
--- a/src-ui/app/main_page/sidebar_section/main_function_switch/MainFunctionSwitch.jsx
+++ b/src-ui/app/main_page/sidebar_section/main_function_switch/MainFunctionSwitch.jsx
@@ -1,4 +1,4 @@
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import clsx from "clsx";
import styles from "./MainFunctionSwitch.module.scss";
import TranslationSvg from "@images/translation.svg?react";
@@ -11,7 +11,7 @@ import {
} from "@logics_main";
export const MainFunctionSwitch = () => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const {
toggleTranslation, currentTranslationStatus,
diff --git a/src-ui/app/others/modal_controller/update_modal/UpdateModal.jsx b/src-ui/app/others/modal_controller/update_modal/UpdateModal.jsx
index dd8f0f43..11198da7 100644
--- a/src-ui/app/others/modal_controller/update_modal/UpdateModal.jsx
+++ b/src-ui/app/others/modal_controller/update_modal/UpdateModal.jsx
@@ -1,6 +1,6 @@
import clsx from "clsx";
import styles from "./UpdateModal.module.scss";
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import { useStore_OpenedQuickSetting } from "@store";
import { usePlugins } from "@logics_configs";
import {
@@ -13,7 +13,7 @@ import {
import { PluginCompatibilityList } from "./plugins_compatibility_list/PluginCompatibilityList";
export const UpdateModal = () => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const { updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
const { updateSoftware, updateSoftware_CUDA } = useUpdateSoftware();
const { updateIsSoftwareUpdating } = useIsSoftwareUpdating();
@@ -91,7 +91,7 @@ const VersionDescComponent = (props) => {
};
const CurrentVersionLabel = (props) => {
- const { t } = useTranslation();
+ const { t } = useI18n();
if (props.is_latest_version_already) {
return
{t("update_modal.is_latest_version_already")}
;
diff --git a/src-ui/app/others/splash_component/download_models_container/DownloadModelsContainer.jsx b/src-ui/app/others/splash_component/download_models_container/DownloadModelsContainer.jsx
index 9e3d8e67..9f1768f1 100644
--- a/src-ui/app/others/splash_component/download_models_container/DownloadModelsContainer.jsx
+++ b/src-ui/app/others/splash_component/download_models_container/DownloadModelsContainer.jsx
@@ -3,13 +3,13 @@ import vrct_logo_for_dark_mode from "@images/vrct_logo_for_dark_mode.png";
import vrct_now_downloading from "@images/VRCT_now_downloading.png";
import {
- useCTranslate2WeightTypeStatus,
- useWhisperWeightTypeStatus,
+ useTranslation,
+ useTranscription,
} from "@logics_configs";
export const DownloadModelsContainer = () => {
- const { currentCTranslate2WeightTypeStatus } = useCTranslate2WeightTypeStatus();
- const { currentWhisperWeightTypeStatus } = useWhisperWeightTypeStatus();
+ const { currentCTranslate2WeightTypeStatus } = useTranslation();
+ const { currentWhisperWeightTypeStatus } = useTranscription();
const c_translate_2 = currentCTranslate2WeightTypeStatus.data.find(d => d.id === "small");
const whisper = currentWhisperWeightTypeStatus.data.find(d => d.id === "base");
diff --git a/src-ui/app/others/updating_component/UpdatingComponent.jsx b/src-ui/app/others/updating_component/UpdatingComponent.jsx
index 5dce4765..df362623 100644
--- a/src-ui/app/others/updating_component/UpdatingComponent.jsx
+++ b/src-ui/app/others/updating_component/UpdatingComponent.jsx
@@ -1,10 +1,10 @@
import styles from "./UpdatingComponent.module.scss";
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import CircularProgress from "@mui/material/CircularProgress";
import chat_white_square from "@images/chato_white_square.png";
export const UpdatingComponent = () => {
- const { t } = useTranslation();
+ const { t } = useI18n();
return (
diff --git a/src-ui/logics/_useBackendErrorHandling.js b/src-ui/logics/_useBackendErrorHandling.js
index e44b293c..83819883 100644
--- a/src-ui/logics/_useBackendErrorHandling.js
+++ b/src-ui/logics/_useBackendErrorHandling.js
@@ -1,4 +1,4 @@
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import {
useNotificationStatus,
@@ -9,43 +9,42 @@ import {
} from "@logics_main";
import {
- useMicRecordTimeout,
- useMicPhraseTimeout,
- useMicMaxWords,
+ useTranscription,
- useSpeakerRecordTimeout,
- useSpeakerPhraseTimeout,
- useSpeakerMaxWords,
+ useTranslation,
- useDeepLAuthKey,
+ useOthers,
- useEnableVrcMicMuteSync,
-
- useOscIpAddress,
- useWebsocket,
+ useAdvancedSettings,
} from "@logics_configs";
import { ui_configs } from "../ui_configs";
export const _useBackendErrorHandling = () => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const { showNotification_Error } = useNotificationStatus();
+ const {
+ updateMicRecordTimeout,
+ updateMicPhraseTimeout,
+ updateMicMaxWords,
+
+ updateSpeakerRecordTimeout,
+ updateSpeakerPhraseTimeout,
+ updateSpeakerMaxWords,
+ } = useTranscription();
+
const { updateTranslationStatus, updateTranscriptionSendStatus, updateTranscriptionReceiveStatus } = useMainFunction();
- const { updateMicRecordTimeout } = useMicRecordTimeout();
- const { updateMicPhraseTimeout } = useMicPhraseTimeout();
- const { updateMicMaxWords } = useMicMaxWords();
+ const { updateDeepLAuthKey } = useTranslation();
- const { updateSpeakerRecordTimeout } = useSpeakerRecordTimeout();
- const { updateSpeakerPhraseTimeout } = useSpeakerPhraseTimeout();
- const { updateSpeakerMaxWords } = useSpeakerMaxWords();
+ const { updateEnableVrcMicMuteSync } = useOthers();
- const { updateDeepLAuthKey } = useDeepLAuthKey();
-
- const { updateEnableVrcMicMuteSync } = useEnableVrcMicMuteSync();
-
- const { updateOscIpAddress } = useOscIpAddress();
- const { updateEnableWebsocket, updateWebsocketHost, updateWebsocketPort } = useWebsocket();
+ const {
+ updateOscIpAddress,
+ updateEnableWebsocket,
+ updateWebsocketHost,
+ updateWebsocketPort,
+ } = useAdvancedSettings();
const errorHandling_Backend = ({message, data, endpoint, result}) => {
switch (endpoint) {
diff --git a/src-ui/logics/common/useHandleOscQuery.js b/src-ui/logics/common/useHandleOscQuery.js
index dace04d5..f952aaac 100644
--- a/src-ui/logics/common/useHandleOscQuery.js
+++ b/src-ui/logics/common/useHandleOscQuery.js
@@ -1,11 +1,11 @@
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import { useNotificationStatus } from "@logics_common";
-import { useEnableVrcMicMuteSync } from "@logics_configs";
+import { useOthers } from "@logics_configs";
export const useHandleOscQuery = () => {
- const { t } = useTranslation();
+ const { t } = useI18n();
const { showNotification_Warning } = useNotificationStatus();
- const { updateEnableVrcMicMuteSync } = useEnableVrcMicMuteSync();
+ const { updateEnableVrcMicMuteSync } = useOthers();
const handleOscQuery = (payload) => {
const is_osc_query_enabled = payload.data;
diff --git a/src-ui/logics/common/useWindow.js b/src-ui/logics/common/useWindow.js
index 9585d0df..3e7f4059 100644
--- a/src-ui/logics/common/useWindow.js
+++ b/src-ui/logics/common/useWindow.js
@@ -2,12 +2,12 @@ import { useEffect, useRef } from "react";
import { currentMonitor, availableMonitors, PhysicalPosition, PhysicalSize } from "@tauri-apps/api/window";
import { useStdoutToPython } from "@useStdoutToPython";
import { useStore_IsBreakPoint } from "@store";
-import { useUiScaling } from "@logics_configs";
+import { useAppearance } from "@logics_configs";
import { store } from "@store";
export const useWindow = () => {
const { asyncStdoutToPython } = useStdoutToPython();
- const { currentUiScaling } = useUiScaling();
+ const { currentUiScaling } = useAppearance();
const { updateIsBreakPoint } = useStore_IsBreakPoint();
const appWindow = store.appWindow;
diff --git a/src-ui/logics/configs/advanced_settings/useWebsocket.js b/src-ui/logics/configs/advanced_settings/useAdvancedSettings.js
similarity index 54%
rename from src-ui/logics/configs/advanced_settings/useWebsocket.js
rename to src-ui/logics/configs/advanced_settings/useAdvancedSettings.js
index 2002b78d..327a15a6 100644
--- a/src-ui/logics/configs/advanced_settings/useWebsocket.js
+++ b/src-ui/logics/configs/advanced_settings/useAdvancedSettings.js
@@ -1,16 +1,54 @@
import {
+ useStore_OscIpAddress,
+ useStore_OscPort,
useStore_EnableWebsocket,
useStore_WebsocketHost,
useStore_WebsocketPort,
} from "@store";
import { useStdoutToPython } from "@useStdoutToPython";
+import { useNotificationStatus } from "@logics_common";
-export const useWebsocket = () => {
+export const useAdvancedSettings = () => {
const { asyncStdoutToPython } = useStdoutToPython();
+ const { showNotification_Error } = useNotificationStatus();
+
+ // OSC IP Address
+ const { currentOscIpAddress, updateOscIpAddress, pendingOscIpAddress } = useStore_OscIpAddress();
+ // OSC Port
+ const { currentOscPort, updateOscPort, pendingOscPort } = useStore_OscPort();
+ // WebSocket
const { currentEnableWebsocket, updateEnableWebsocket, pendingEnableWebsocket } = useStore_EnableWebsocket();
const { currentWebsocketHost, updateWebsocketHost, pendingWebsocketHost } = useStore_WebsocketHost();
const { currentWebsocketPort, updateWebsocketPort, pendingWebsocketPort } = useStore_WebsocketPort();
+ // OSC IP Address
+ const getOscIpAddress = () => {
+ pendingOscIpAddress();
+ asyncStdoutToPython("/get/data/osc_ip_address");
+ };
+
+ const setOscIpAddress = (osc_ip_address) => {
+ pendingOscIpAddress();
+ asyncStdoutToPython("/set/data/osc_ip_address", osc_ip_address);
+ };
+
+ // OSC Port
+ const getOscPort = () => {
+ pendingOscPort();
+ asyncStdoutToPython("/get/data/osc_port");
+ };
+
+ const setOscPort = (osc_port) => {
+ pendingOscPort();
+ asyncStdoutToPython("/set/data/osc_port", osc_port);
+ };
+
+ const saveErrorOscPort = ({data, message, _result}) => {
+ updateOscPort(d => d.data);
+ showNotification_Error(_result);
+ };
+
+ // WebSocket
const getEnableWebsocket = () => {
pendingEnableWebsocket();
asyncStdoutToPython("/get/data/websocket_server");
@@ -47,7 +85,22 @@ export const useWebsocket = () => {
asyncStdoutToPython("/set/data/websocket_port", websocket_port);
};
+
return {
+ // OSC IP Address
+ currentOscIpAddress,
+ getOscIpAddress,
+ updateOscIpAddress,
+ setOscIpAddress,
+
+ // OSC Port
+ currentOscPort,
+ getOscPort,
+ updateOscPort,
+ setOscPort,
+ saveErrorOscPort,
+
+ // WebSocket
currentEnableWebsocket,
updateEnableWebsocket,
getEnableWebsocket,
@@ -62,6 +115,5 @@ export const useWebsocket = () => {
updateWebsocketPort,
getWebsocketPort,
setWebsocketPort,
-
};
};
\ No newline at end of file
diff --git a/src-ui/logics/configs/advanced_settings/useOscIpAddress.js b/src-ui/logics/configs/advanced_settings/useOscIpAddress.js
deleted file mode 100644
index 8fe1ae06..00000000
--- a/src-ui/logics/configs/advanced_settings/useOscIpAddress.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_OscIpAddress } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useOscIpAddress = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentOscIpAddress, updateOscIpAddress, pendingOscIpAddress } = useStore_OscIpAddress();
-
- const getOscIpAddress = () => {
- pendingOscIpAddress();
- asyncStdoutToPython("/get/data/osc_ip_address");
- };
-
- const setOscIpAddress = (osc_ip_address) => {
- pendingOscIpAddress();
- asyncStdoutToPython("/set/data/osc_ip_address", osc_ip_address);
- };
-
- return {
- currentOscIpAddress,
- getOscIpAddress,
- updateOscIpAddress,
- setOscIpAddress,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/advanced_settings/useOscPort.js b/src-ui/logics/configs/advanced_settings/useOscPort.js
deleted file mode 100644
index 0710021c..00000000
--- a/src-ui/logics/configs/advanced_settings/useOscPort.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import { useStore_OscPort } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-import { useNotificationStatus } from "@logics_common";
-
-export const useOscPort = () => {
- const { showNotification_Error } = useNotificationStatus();
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentOscPort, updateOscPort, pendingOscPort } = useStore_OscPort();
-
- const getOscPort = () => {
- pendingOscPort();
- asyncStdoutToPython("/get/data/osc_port");
- };
-
- const setOscPort = (osc_port) => {
- pendingOscPort();
- asyncStdoutToPython("/set/data/osc_port", osc_port);
- };
-
- const saveErrorOscPort = ({data, message, _result}) => {
- updateOscPort(d => d.data);
- showNotification_Error(_result);
- };
-
- return {
- currentOscPort,
- getOscPort,
- updateOscPort,
- setOscPort,
-
- saveErrorOscPort,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/appearance/useAppearance.js b/src-ui/logics/configs/appearance/useAppearance.js
new file mode 100644
index 00000000..582ebf73
--- /dev/null
+++ b/src-ui/logics/configs/appearance/useAppearance.js
@@ -0,0 +1,156 @@
+import {
+ useStore_UiLanguage,
+ useStore_UiScaling,
+ useStore_MessageLogUiScaling,
+ useStore_SendMessageButtonType,
+ useStore_ShowResendButton,
+ useStore_SelectedFontFamily,
+ useStore_Transparency,
+} from "@store";
+import { useStdoutToPython } from "@useStdoutToPython";
+
+export const useAppearance = () => {
+ const { asyncStdoutToPython } = useStdoutToPython();
+
+ // UI Language
+ const { currentUiLanguage, updateUiLanguage, pendingUiLanguage } = useStore_UiLanguage();
+ // UI Scaling
+ const { currentUiScaling, updateUiScaling, pendingUiScaling } = useStore_UiScaling();
+ // Message Log Ui Scaling
+ const { currentMessageLogUiScaling, updateMessageLogUiScaling, pendingMessageLogUiScaling } = useStore_MessageLogUiScaling();
+ // Send Message Button Type
+ const { currentSendMessageButtonType, updateSendMessageButtonType, pendingSendMessageButtonType } = useStore_SendMessageButtonType();
+ // Show Resend Button
+ const { currentShowResendButton, updateShowResendButton, pendingShowResendButton } = useStore_ShowResendButton();
+ // Selected Font Family
+ const { currentSelectedFontFamily, updateSelectedFontFamily, pendingSelectedFontFamily } = useStore_SelectedFontFamily();
+ // Transparency
+ const { currentTransparency, updateTransparency, pendingTransparency } = useStore_Transparency();
+
+
+ // UI Language
+ const getUiLanguage = () => {
+ pendingUiLanguage();
+ asyncStdoutToPython("/get/data/ui_language");
+ };
+
+ const setUiLanguage = (selected_ui_language) => {
+ pendingUiLanguage();
+ asyncStdoutToPython("/set/data/ui_language", selected_ui_language);
+ };
+
+ // UI Scaling
+ const getUiScaling = () => {
+ pendingUiScaling();
+ asyncStdoutToPython("/get/data/ui_scaling");
+ };
+
+ const setUiScaling = (selected_ui_scaling) => {
+ pendingUiScaling();
+ asyncStdoutToPython("/set/data/ui_scaling", selected_ui_scaling);
+ };
+
+ // Message Log Ui Scaling
+ const getMessageLogUiScaling = () => {
+ pendingMessageLogUiScaling();
+ asyncStdoutToPython("/get/data/textbox_ui_scaling");
+ };
+
+ const setMessageLogUiScaling = (selected_ui_scaling) => {
+ pendingMessageLogUiScaling();
+ asyncStdoutToPython("/set/data/textbox_ui_scaling", selected_ui_scaling);
+ };
+
+ // Send Message Button Type
+ const getSendMessageButtonType = () => {
+ pendingSendMessageButtonType();
+ asyncStdoutToPython("/get/data/send_message_button_type");
+ };
+
+ const setSendMessageButtonType = (send_message_button_type) => {
+ pendingSendMessageButtonType();
+ asyncStdoutToPython("/set/data/send_message_button_type", send_message_button_type);
+ };
+
+ // Show Resend Button
+ const getShowResendButton = () => {
+ pendingShowResendButton();
+ asyncStdoutToPython("/get/data/show_resend_button");
+ };
+
+ const toggleShowResendButton = () => {
+ pendingShowResendButton();
+ if (currentShowResendButton.data) {
+ asyncStdoutToPython("/set/disable/show_resend_button");
+ } else {
+ asyncStdoutToPython("/set/enable/show_resend_button");
+ }
+ };
+
+ // Selected Font Family
+ const getSelectedFontFamily = () => {
+ pendingSelectedFontFamily();
+ asyncStdoutToPython("/get/data/font_family");
+ };
+
+ const setSelectedFontFamily = (selected_font_family) => {
+ pendingSelectedFontFamily();
+ asyncStdoutToPython("/set/data/font_family", selected_font_family);
+ };
+
+ // Transparency
+ const getTransparency = () => {
+ pendingTransparency();
+ asyncStdoutToPython("/get/data/transparency");
+ };
+
+ const setTransparency = (selected_transparency) => {
+ pendingTransparency();
+ asyncStdoutToPython("/set/data/transparency", selected_transparency);
+ };
+
+
+ return {
+ // UI Language
+ currentUiLanguage,
+ getUiLanguage,
+ updateUiLanguage,
+ setUiLanguage,
+
+ // UI Scaling
+ currentUiScaling,
+ getUiScaling,
+ updateUiScaling,
+ setUiScaling,
+
+ // Message Log Ui Scaling
+ currentMessageLogUiScaling,
+ getMessageLogUiScaling,
+ updateMessageLogUiScaling,
+ setMessageLogUiScaling,
+
+ // Send Message Button Type
+ currentSendMessageButtonType,
+ getSendMessageButtonType,
+ setSendMessageButtonType,
+ updateSendMessageButtonType,
+
+ // Show Resend Button
+ currentShowResendButton,
+ getShowResendButton,
+ updateShowResendButton,
+ toggleShowResendButton,
+
+ // Selected Font Family
+ currentSelectedFontFamily,
+ getSelectedFontFamily,
+ updateSelectedFontFamily,
+ setSelectedFontFamily,
+
+ // Transparency
+ currentTransparency,
+ getTransparency,
+ updateTransparency,
+ setTransparency,
+ };
+};
\ No newline at end of file
diff --git a/src-ui/logics/configs/appearance/useMessageLogUiScaling.js b/src-ui/logics/configs/appearance/useMessageLogUiScaling.js
deleted file mode 100644
index 2833774f..00000000
--- a/src-ui/logics/configs/appearance/useMessageLogUiScaling.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_MessageLogUiScaling } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useMessageLogUiScaling = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentMessageLogUiScaling, updateMessageLogUiScaling, pendingMessageLogUiScaling } = useStore_MessageLogUiScaling();
-
- const getMessageLogUiScaling = () => {
- pendingMessageLogUiScaling();
- asyncStdoutToPython("/get/data/textbox_ui_scaling");
- };
-
- const setMessageLogUiScaling = (selected_ui_scaling) => {
- pendingMessageLogUiScaling();
- asyncStdoutToPython("/set/data/textbox_ui_scaling", selected_ui_scaling);
- };
-
- return {
- currentMessageLogUiScaling,
- getMessageLogUiScaling,
- updateMessageLogUiScaling,
- setMessageLogUiScaling,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/appearance/useSelectedFontFamily.js b/src-ui/logics/configs/appearance/useSelectedFontFamily.js
deleted file mode 100644
index 538ef462..00000000
--- a/src-ui/logics/configs/appearance/useSelectedFontFamily.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_SelectedFontFamily } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useSelectedFontFamily = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentSelectedFontFamily, updateSelectedFontFamily, pendingSelectedFontFamily } = useStore_SelectedFontFamily();
-
- const getSelectedFontFamily = () => {
- pendingSelectedFontFamily();
- asyncStdoutToPython("/get/data/font_family");
- };
-
- const setSelectedFontFamily = (selected_font_family) => {
- pendingSelectedFontFamily();
- asyncStdoutToPython("/set/data/font_family", selected_font_family);
- };
-
- return {
- currentSelectedFontFamily,
- getSelectedFontFamily,
- updateSelectedFontFamily,
- setSelectedFontFamily,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/appearance/useSendMessageButtonType.js b/src-ui/logics/configs/appearance/useSendMessageButtonType.js
deleted file mode 100644
index 621c7dbc..00000000
--- a/src-ui/logics/configs/appearance/useSendMessageButtonType.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_SendMessageButtonType } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useSendMessageButtonType = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentSendMessageButtonType, updateSendMessageButtonType, pendingSendMessageButtonType } = useStore_SendMessageButtonType();
-
- const getSendMessageButtonType = () => {
- pendingSendMessageButtonType();
- asyncStdoutToPython("/get/data/send_message_button_type");
- };
-
- const setSendMessageButtonType = (send_message_button_type) => {
- pendingSendMessageButtonType();
- asyncStdoutToPython("/set/data/send_message_button_type", send_message_button_type);
- };
-
- return {
- currentSendMessageButtonType,
- getSendMessageButtonType,
- setSendMessageButtonType,
- updateSendMessageButtonType,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/appearance/useShowResendButton.js b/src-ui/logics/configs/appearance/useShowResendButton.js
deleted file mode 100644
index 10a9fd00..00000000
--- a/src-ui/logics/configs/appearance/useShowResendButton.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { useStore_ShowResendButton } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useShowResendButton = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentShowResendButton, updateShowResendButton, pendingShowResendButton } = useStore_ShowResendButton();
-
- const getShowResendButton = () => {
- pendingShowResendButton();
- asyncStdoutToPython("/get/data/show_resend_button");
- };
-
- const toggleShowResendButton = () => {
- pendingShowResendButton();
- if (currentShowResendButton.data) {
- asyncStdoutToPython("/set/disable/show_resend_button");
- } else {
- asyncStdoutToPython("/set/enable/show_resend_button");
- }
- };
-
- return {
- currentShowResendButton,
- getShowResendButton,
- updateShowResendButton,
- toggleShowResendButton,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/appearance/useTransparency.js b/src-ui/logics/configs/appearance/useTransparency.js
deleted file mode 100644
index 4c719503..00000000
--- a/src-ui/logics/configs/appearance/useTransparency.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_Transparency } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useTransparency = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentTransparency, updateTransparency, pendingTransparency } = useStore_Transparency();
-
- const getTransparency = () => {
- pendingTransparency();
- asyncStdoutToPython("/get/data/transparency");
- };
-
- const setTransparency = (selected_transparency) => {
- pendingTransparency();
- asyncStdoutToPython("/set/data/transparency", selected_transparency);
- };
-
- return {
- currentTransparency,
- getTransparency,
- updateTransparency,
- setTransparency,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/appearance/useUiLanguage.js b/src-ui/logics/configs/appearance/useUiLanguage.js
deleted file mode 100644
index bb3a5b39..00000000
--- a/src-ui/logics/configs/appearance/useUiLanguage.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_UiLanguage } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useUiLanguage = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentUiLanguage, updateUiLanguage, pendingUiLanguage } = useStore_UiLanguage();
-
- const getUiLanguage = () => {
- pendingUiLanguage();
- asyncStdoutToPython("/get/data/ui_language");
- };
-
- const setUiLanguage = (selected_ui_language) => {
- pendingUiLanguage();
- asyncStdoutToPython("/set/data/ui_language", selected_ui_language);
- };
-
- return {
- currentUiLanguage,
- getUiLanguage,
- updateUiLanguage,
- setUiLanguage,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/appearance/useUiScaling.js b/src-ui/logics/configs/appearance/useUiScaling.js
deleted file mode 100644
index e5d75e1d..00000000
--- a/src-ui/logics/configs/appearance/useUiScaling.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_UiScaling } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useUiScaling = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentUiScaling, updateUiScaling, pendingUiScaling } = useStore_UiScaling();
-
- const getUiScaling = () => {
- pendingUiScaling();
- asyncStdoutToPython("/get/data/ui_scaling");
- };
-
- const setUiScaling = (selected_ui_scaling) => {
- pendingUiScaling();
- asyncStdoutToPython("/set/data/ui_scaling", selected_ui_scaling);
- };
-
- return {
- currentUiScaling,
- getUiScaling,
- updateUiScaling,
- setUiScaling,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/index.js b/src-ui/logics/configs/index.js
index 9ffc7145..54e7d133 100644
--- a/src-ui/logics/configs/index.js
+++ b/src-ui/logics/configs/index.js
@@ -1,58 +1,12 @@
export { useDevice } from "./device/useDevice";
-
-export { useMessageLogUiScaling } from "./appearance/useMessageLogUiScaling";
-export { useSelectedFontFamily } from "./appearance/useSelectedFontFamily";
-export { useTransparency } from "./appearance/useTransparency";
-export { useSendMessageButtonType } from "./appearance/useSendMessageButtonType";
-export { useShowResendButton } from "./appearance/useShowResendButton";
-export { useUiLanguage } from "./appearance/useUiLanguage";
-export { useUiScaling } from "./appearance/useUiScaling";
-
-export { useEnableAutoClearMessageInputBox } from "./others/useEnableAutoClearMessageInputBox";
-export { useEnableAutoExportMessageLogs } from "./others/useEnableAutoExportMessageLogs";
-export { useEnableSendMessageToVrc } from "./others/useEnableSendMessageToVrc";
-export { useEnableSendReceivedMessageToVrc } from "./others/useEnableSendReceivedMessageToVrc";
-export { useEnableSendOnlyTranslatedMessages } from "./others/useEnableSendOnlyTranslatedMessages";
-export { useEnableVrcMicMuteSync } from "./others/useEnableVrcMicMuteSync";
-export { useEnableNotificationVrcSfx } from "./others/useEnableNotificationVrcSfx";
-
-export { useMicRecordTimeout } from "./transcription/useMicRecordTimeout";
-export { useMicPhraseTimeout } from "./transcription/useMicPhraseTimeout";
-export { useMicMaxWords } from "./transcription/useMicMaxWords";
-export { useMicWordFilterList } from "./transcription/useMicWordFilterList";
-
-export { useSpeakerRecordTimeout } from "./transcription/useSpeakerRecordTimeout";
-export { useSpeakerPhraseTimeout } from "./transcription/useSpeakerPhraseTimeout";
-export { useSpeakerMaxWords } from "./transcription/useSpeakerMaxWords";
-
-export { useSelectedTranscriptionEngine } from "./transcription/useSelectedTranscriptionEngine";
-export { useWhisperWeightTypeStatus } from "./transcription/useWhisperWeightTypeStatus";
-export { useSelectedWhisperWeightType } from "./transcription/useSelectedWhisperWeightType";
-export { useSelectableWhisperComputeDeviceList } from "./transcription/useSelectableWhisperComputeDeviceList";
-export { useSelectedWhisperComputeDevice } from "./transcription/useSelectedWhisperComputeDevice";
-
-export { useDeepLAuthKey } from "./translation/useDeepLAuthKey";
-export { useCTranslate2WeightTypeStatus } from "./translation/useCTranslate2WeightTypeStatus";
-export { useSelectedCTranslate2WeightType } from "./translation/useSelectedCTranslate2WeightType";
-export { useSelectableCTranslate2ComputeDeviceList } from "./translation/useSelectableCTranslate2ComputeDeviceList";
-export { useSelectedCTranslate2ComputeDevice } from "./translation/useSelectedCTranslate2ComputeDevice";
-
-export { useIsEnabledOverlaySmallLog } from "./vr/useIsEnabledOverlaySmallLog";
-export { useOverlaySmallLogSettings } from "./vr/useOverlaySmallLogSettings";
-export { useIsEnabledOverlayLargeLog } from "./vr/useIsEnabledOverlayLargeLog";
-export { useOverlayShowOnlyTranslatedMessages } from "./vr/useOverlayShowOnlyTranslatedMessages";
-export { useOverlayLargeLogSettings } from "./vr/useOverlayLargeLogSettings";
-export { useSendTextToOverlay } from "./vr/useSendTextToOverlay";
-
+export { useAppearance } from "./appearance/useAppearance";
+export { useOthers } from "./others/useOthers";
+export { useTranscription } from "./transcription/useTranscription";
+export { useTranslation } from "./translation/useTranslation";
+export { useVr } from "./vr/useVr";
export { useHotkeys } from "./hotkeys/useHotkeys";
-
-export { useOscIpAddress } from "./advanced_settings/useOscIpAddress";
-export { useOscPort } from "./advanced_settings/useOscPort";
-export { useWebsocket } from "./advanced_settings/useWebsocket";
-
-
+export { useAdvancedSettings } from "./advanced_settings/useAdvancedSettings";
export { useSupporters } from "./supporters/useSupporters";
-
export { usePlugins } from "./plugins/usePlugins";
export { useSettingBoxScrollPosition } from "./useSettingBoxScrollPosition";
\ No newline at end of file
diff --git a/src-ui/logics/configs/others/useEnableAutoClearMessageInputBox.js b/src-ui/logics/configs/others/useEnableAutoClearMessageInputBox.js
deleted file mode 100644
index 6508990c..00000000
--- a/src-ui/logics/configs/others/useEnableAutoClearMessageInputBox.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { useStore_EnableAutoClearMessageInputBox } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useEnableAutoClearMessageInputBox = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentEnableAutoClearMessageInputBox, updateEnableAutoClearMessageInputBox, pendingEnableAutoClearMessageInputBox } = useStore_EnableAutoClearMessageInputBox();
-
- const getEnableAutoClearMessageInputBox = () => {
- pendingEnableAutoClearMessageInputBox();
- asyncStdoutToPython("/get/data/auto_clear_message_box");
- };
-
- const toggleEnableAutoClearMessageInputBox = () => {
- pendingEnableAutoClearMessageInputBox();
- if (currentEnableAutoClearMessageInputBox.data) {
- asyncStdoutToPython("/set/disable/auto_clear_message_box");
- } else {
- asyncStdoutToPython("/set/enable/auto_clear_message_box");
- }
- };
-
- return {
- currentEnableAutoClearMessageInputBox,
- getEnableAutoClearMessageInputBox,
- toggleEnableAutoClearMessageInputBox,
- updateEnableAutoClearMessageInputBox,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/others/useEnableAutoExportMessageLogs.js b/src-ui/logics/configs/others/useEnableAutoExportMessageLogs.js
deleted file mode 100644
index e9faab35..00000000
--- a/src-ui/logics/configs/others/useEnableAutoExportMessageLogs.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { useStore_EnableAutoExportMessageLogs } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useEnableAutoExportMessageLogs = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentEnableAutoExportMessageLogs, updateEnableAutoExportMessageLogs, pendingEnableAutoExportMessageLogs } = useStore_EnableAutoExportMessageLogs();
-
- const getEnableAutoExportMessageLogs = () => {
- pendingEnableAutoExportMessageLogs();
- asyncStdoutToPython("/get/data/logger_feature");
- };
-
- const toggleEnableAutoExportMessageLogs = () => {
- pendingEnableAutoExportMessageLogs();
- if (currentEnableAutoExportMessageLogs.data) {
- asyncStdoutToPython("/set/disable/logger_feature");
- } else {
- asyncStdoutToPython("/set/enable/logger_feature");
- }
- };
-
- return {
- currentEnableAutoExportMessageLogs,
- getEnableAutoExportMessageLogs,
- toggleEnableAutoExportMessageLogs,
- updateEnableAutoExportMessageLogs,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/others/useEnableNotificationVrcSfx.js b/src-ui/logics/configs/others/useEnableNotificationVrcSfx.js
deleted file mode 100644
index 9a001114..00000000
--- a/src-ui/logics/configs/others/useEnableNotificationVrcSfx.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { useStore_EnableNotificationVrcSfx } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useEnableNotificationVrcSfx = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentEnableNotificationVrcSfx, updateEnableNotificationVrcSfx, pendingEnableNotificationVrcSfx } = useStore_EnableNotificationVrcSfx();
-
- const getEnableNotificationVrcSfx = () => {
- pendingEnableNotificationVrcSfx();
- asyncStdoutToPython("/get/data/notification_vrc_sfx");
- };
-
- const toggleEnableNotificationVrcSfx = () => {
- pendingEnableNotificationVrcSfx();
- if (currentEnableNotificationVrcSfx.data) {
- asyncStdoutToPython("/set/disable/notification_vrc_sfx");
- } else {
- asyncStdoutToPython("/set/enable/notification_vrc_sfx");
- }
- };
-
- return {
- currentEnableNotificationVrcSfx,
- getEnableNotificationVrcSfx,
- toggleEnableNotificationVrcSfx,
- updateEnableNotificationVrcSfx,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/others/useEnableSendMessageToVrc.js b/src-ui/logics/configs/others/useEnableSendMessageToVrc.js
deleted file mode 100644
index 6284dd17..00000000
--- a/src-ui/logics/configs/others/useEnableSendMessageToVrc.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { useStore_EnableSendMessageToVrc } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useEnableSendMessageToVrc = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentEnableSendMessageToVrc, updateEnableSendMessageToVrc, pendingEnableSendMessageToVrc } = useStore_EnableSendMessageToVrc();
-
- const getEnableSendMessageToVrc = () => {
- pendingEnableSendMessageToVrc();
- asyncStdoutToPython("/get/data/send_message_to_vrc");
- };
-
- const toggleEnableSendMessageToVrc = () => {
- pendingEnableSendMessageToVrc();
- if (currentEnableSendMessageToVrc.data) {
- asyncStdoutToPython("/set/disable/send_message_to_vrc");
- } else {
- asyncStdoutToPython("/set/enable/send_message_to_vrc");
- }
- };
-
- return {
- currentEnableSendMessageToVrc,
- getEnableSendMessageToVrc,
- toggleEnableSendMessageToVrc,
- updateEnableSendMessageToVrc,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/others/useEnableSendOnlyTranslatedMessages.js b/src-ui/logics/configs/others/useEnableSendOnlyTranslatedMessages.js
deleted file mode 100644
index 4ba9d4af..00000000
--- a/src-ui/logics/configs/others/useEnableSendOnlyTranslatedMessages.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { useStore_EnableSendOnlyTranslatedMessages } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useEnableSendOnlyTranslatedMessages = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentEnableSendOnlyTranslatedMessages, updateEnableSendOnlyTranslatedMessages, pendingEnableSendOnlyTranslatedMessages } = useStore_EnableSendOnlyTranslatedMessages();
-
- const getEnableSendOnlyTranslatedMessages = () => {
- pendingEnableSendOnlyTranslatedMessages();
- asyncStdoutToPython("/get/data/send_only_translated_messages");
- };
-
- const toggleEnableSendOnlyTranslatedMessages = () => {
- pendingEnableSendOnlyTranslatedMessages();
- if (currentEnableSendOnlyTranslatedMessages.data) {
- asyncStdoutToPython("/set/disable/send_only_translated_messages");
- } else {
- asyncStdoutToPython("/set/enable/send_only_translated_messages");
- }
- };
-
- return {
- currentEnableSendOnlyTranslatedMessages,
- getEnableSendOnlyTranslatedMessages,
- toggleEnableSendOnlyTranslatedMessages,
- updateEnableSendOnlyTranslatedMessages,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/others/useEnableSendReceivedMessageToVrc.js b/src-ui/logics/configs/others/useEnableSendReceivedMessageToVrc.js
deleted file mode 100644
index bfc550a1..00000000
--- a/src-ui/logics/configs/others/useEnableSendReceivedMessageToVrc.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { useStore_EnableSendReceivedMessageToVrc } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useEnableSendReceivedMessageToVrc = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentEnableSendReceivedMessageToVrc, updateEnableSendReceivedMessageToVrc, pendingEnableSendReceivedMessageToVrc } = useStore_EnableSendReceivedMessageToVrc();
-
- const getEnableSendReceivedMessageToVrc = () => {
- pendingEnableSendReceivedMessageToVrc();
- asyncStdoutToPython("/get/data/send_received_message_to_vrc");
- };
-
- const toggleEnableSendReceivedMessageToVrc = () => {
- pendingEnableSendReceivedMessageToVrc();
- if (currentEnableSendReceivedMessageToVrc.data) {
- asyncStdoutToPython("/set/disable/send_received_message_to_vrc");
- } else {
- asyncStdoutToPython("/set/enable/send_received_message_to_vrc");
- }
- };
-
- return {
- currentEnableSendReceivedMessageToVrc,
- getEnableSendReceivedMessageToVrc,
- toggleEnableSendReceivedMessageToVrc,
- updateEnableSendReceivedMessageToVrc,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/others/useEnableVrcMicMuteSync.js b/src-ui/logics/configs/others/useEnableVrcMicMuteSync.js
deleted file mode 100644
index df79fd54..00000000
--- a/src-ui/logics/configs/others/useEnableVrcMicMuteSync.js
+++ /dev/null
@@ -1,36 +0,0 @@
-import { useStore_EnableVrcMicMuteSync } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useEnableVrcMicMuteSync = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentEnableVrcMicMuteSync, updateEnableVrcMicMuteSync, pendingEnableVrcMicMuteSync } = useStore_EnableVrcMicMuteSync();
-
- const getEnableVrcMicMuteSync = () => {
- pendingEnableVrcMicMuteSync();
- asyncStdoutToPython("/get/data/vrc_mic_mute_sync");
- };
-
- const toggleEnableVrcMicMuteSync = () => {
- pendingEnableVrcMicMuteSync();
- if (currentEnableVrcMicMuteSync.data.is_enabled) {
- asyncStdoutToPython("/set/disable/vrc_mic_mute_sync");
- } else {
- asyncStdoutToPython("/set/enable/vrc_mic_mute_sync");
- }
- };
-
- const updateEnableVrcMicMuteSync_FromBackend = (payload) => {
- updateEnableVrcMicMuteSync((old_value) => {
- return {...old_value.data, is_enabled: payload};
- });
- };
-
- return {
- currentEnableVrcMicMuteSync,
- getEnableVrcMicMuteSync,
- toggleEnableVrcMicMuteSync,
- updateEnableVrcMicMuteSync,
-
- updateEnableVrcMicMuteSync_FromBackend,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/others/useOthers.js b/src-ui/logics/configs/others/useOthers.js
new file mode 100644
index 00000000..b9f13612
--- /dev/null
+++ b/src-ui/logics/configs/others/useOthers.js
@@ -0,0 +1,192 @@
+import {
+ useStore_EnableAutoClearMessageInputBox,
+ useStore_EnableSendOnlyTranslatedMessages,
+ useStore_EnableAutoExportMessageLogs,
+ useStore_EnableVrcMicMuteSync,
+ useStore_EnableSendMessageToVrc,
+ useStore_EnableNotificationVrcSfx,
+ useStore_EnableSendReceivedMessageToVrc,
+} from "@store";
+import { useStdoutToPython } from "@useStdoutToPython";
+
+export const useOthers = () => {
+ const { asyncStdoutToPython } = useStdoutToPython();
+
+ // Auto Clear Message Input Box
+ const { currentEnableAutoClearMessageInputBox, updateEnableAutoClearMessageInputBox, pendingEnableAutoClearMessageInputBox } = useStore_EnableAutoClearMessageInputBox();
+ // Send Only Translated Messages
+ const { currentEnableSendOnlyTranslatedMessages, updateEnableSendOnlyTranslatedMessages, pendingEnableSendOnlyTranslatedMessages } = useStore_EnableSendOnlyTranslatedMessages();
+ // Auto Export Message Logs
+ const { currentEnableAutoExportMessageLogs, updateEnableAutoExportMessageLogs, pendingEnableAutoExportMessageLogs } = useStore_EnableAutoExportMessageLogs();
+ // VRC Mic Mute Sync
+ const { currentEnableVrcMicMuteSync, updateEnableVrcMicMuteSync, pendingEnableVrcMicMuteSync } = useStore_EnableVrcMicMuteSync();
+ // Send Message To VRCT
+ const { currentEnableSendMessageToVrc, updateEnableSendMessageToVrc, pendingEnableSendMessageToVrc } = useStore_EnableSendMessageToVrc();
+ // Sounds
+ // Notification VRC SFX
+ const { currentEnableNotificationVrcSfx, updateEnableNotificationVrcSfx, pendingEnableNotificationVrcSfx } = useStore_EnableNotificationVrcSfx();
+ // Speaker2Chatbox
+ // Send Received Message To VRC
+ const { currentEnableSendReceivedMessageToVrc, updateEnableSendReceivedMessageToVrc, pendingEnableSendReceivedMessageToVrc } = useStore_EnableSendReceivedMessageToVrc();
+
+
+ // Auto Clear Message Input Box
+ const getEnableAutoClearMessageInputBox = () => {
+ pendingEnableAutoClearMessageInputBox();
+ asyncStdoutToPython("/get/data/auto_clear_message_box");
+ };
+
+ const toggleEnableAutoClearMessageInputBox = () => {
+ pendingEnableAutoClearMessageInputBox();
+ if (currentEnableAutoClearMessageInputBox.data) {
+ asyncStdoutToPython("/set/disable/auto_clear_message_box");
+ } else {
+ asyncStdoutToPython("/set/enable/auto_clear_message_box");
+ }
+ };
+
+ // Send Only Translated Messages
+ const getEnableSendOnlyTranslatedMessages = () => {
+ pendingEnableSendOnlyTranslatedMessages();
+ asyncStdoutToPython("/get/data/send_only_translated_messages");
+ };
+
+ const toggleEnableSendOnlyTranslatedMessages = () => {
+ pendingEnableSendOnlyTranslatedMessages();
+ if (currentEnableSendOnlyTranslatedMessages.data) {
+ asyncStdoutToPython("/set/disable/send_only_translated_messages");
+ } else {
+ asyncStdoutToPython("/set/enable/send_only_translated_messages");
+ }
+ };
+
+ // Auto Export Message Logs
+ const getEnableAutoExportMessageLogs = () => {
+ pendingEnableAutoExportMessageLogs();
+ asyncStdoutToPython("/get/data/logger_feature");
+ };
+
+ const toggleEnableAutoExportMessageLogs = () => {
+ pendingEnableAutoExportMessageLogs();
+ if (currentEnableAutoExportMessageLogs.data) {
+ asyncStdoutToPython("/set/disable/logger_feature");
+ } else {
+ asyncStdoutToPython("/set/enable/logger_feature");
+ }
+ };
+
+ // VRC Mic Mute Sync
+ const getEnableVrcMicMuteSync = () => {
+ pendingEnableVrcMicMuteSync();
+ asyncStdoutToPython("/get/data/vrc_mic_mute_sync");
+ };
+
+ const toggleEnableVrcMicMuteSync = () => {
+ pendingEnableVrcMicMuteSync();
+ if (currentEnableVrcMicMuteSync.data.is_enabled) {
+ asyncStdoutToPython("/set/disable/vrc_mic_mute_sync");
+ } else {
+ asyncStdoutToPython("/set/enable/vrc_mic_mute_sync");
+ }
+ };
+
+ const updateEnableVrcMicMuteSync_FromBackend = (payload) => {
+ updateEnableVrcMicMuteSync((old_value) => {
+ return {...old_value.data, is_enabled: payload};
+ });
+ };
+
+ // Send Message To VRCT
+ const getEnableSendMessageToVrc = () => {
+ pendingEnableSendMessageToVrc();
+ asyncStdoutToPython("/get/data/send_message_to_vrc");
+ };
+
+ const toggleEnableSendMessageToVrc = () => {
+ pendingEnableSendMessageToVrc();
+ if (currentEnableSendMessageToVrc.data) {
+ asyncStdoutToPython("/set/disable/send_message_to_vrc");
+ } else {
+ asyncStdoutToPython("/set/enable/send_message_to_vrc");
+ }
+ };
+
+ // Sounds
+ // Notification VRC SFX
+ const getEnableNotificationVrcSfx = () => {
+ pendingEnableNotificationVrcSfx();
+ asyncStdoutToPython("/get/data/notification_vrc_sfx");
+ };
+
+ const toggleEnableNotificationVrcSfx = () => {
+ pendingEnableNotificationVrcSfx();
+ if (currentEnableNotificationVrcSfx.data) {
+ asyncStdoutToPython("/set/disable/notification_vrc_sfx");
+ } else {
+ asyncStdoutToPython("/set/enable/notification_vrc_sfx");
+ }
+ };
+
+ // Speaker2Chatbox
+ // Send Received Message To VRC
+ const getEnableSendReceivedMessageToVrc = () => {
+ pendingEnableSendReceivedMessageToVrc();
+ asyncStdoutToPython("/get/data/send_received_message_to_vrc");
+ };
+
+ const toggleEnableSendReceivedMessageToVrc = () => {
+ pendingEnableSendReceivedMessageToVrc();
+ if (currentEnableSendReceivedMessageToVrc.data) {
+ asyncStdoutToPython("/set/disable/send_received_message_to_vrc");
+ } else {
+ asyncStdoutToPython("/set/enable/send_received_message_to_vrc");
+ }
+ };
+
+ return {
+ // Auto Clear Message Input Box
+ currentEnableAutoClearMessageInputBox,
+ getEnableAutoClearMessageInputBox,
+ toggleEnableAutoClearMessageInputBox,
+ updateEnableAutoClearMessageInputBox,
+
+ // Send Only Translated Messages
+ currentEnableSendOnlyTranslatedMessages,
+ getEnableSendOnlyTranslatedMessages,
+ toggleEnableSendOnlyTranslatedMessages,
+ updateEnableSendOnlyTranslatedMessages,
+
+ // Auto Export Message Logs
+ currentEnableAutoExportMessageLogs,
+ getEnableAutoExportMessageLogs,
+ toggleEnableAutoExportMessageLogs,
+ updateEnableAutoExportMessageLogs,
+
+ // VRC Mic Mute Sync
+ currentEnableVrcMicMuteSync,
+ getEnableVrcMicMuteSync,
+ toggleEnableVrcMicMuteSync,
+ updateEnableVrcMicMuteSync,
+ updateEnableVrcMicMuteSync_FromBackend,
+
+ // Send Message To VRCT
+ currentEnableSendMessageToVrc,
+ getEnableSendMessageToVrc,
+ toggleEnableSendMessageToVrc,
+ updateEnableSendMessageToVrc,
+
+ // Sounds
+ // Notification VRC SFX
+ currentEnableNotificationVrcSfx,
+ getEnableNotificationVrcSfx,
+ toggleEnableNotificationVrcSfx,
+ updateEnableNotificationVrcSfx,
+
+ // Speaker2Chatbox
+ // Send Received Message To VRC
+ currentEnableSendReceivedMessageToVrc,
+ getEnableSendReceivedMessageToVrc,
+ toggleEnableSendReceivedMessageToVrc,
+ updateEnableSendReceivedMessageToVrc,
+ };
+};
\ No newline at end of file
diff --git a/src-ui/logics/configs/plugins/usePlugins.js b/src-ui/logics/configs/plugins/usePlugins.js
index 50a9fe41..e22c2aff 100644
--- a/src-ui/logics/configs/plugins/usePlugins.js
+++ b/src-ui/logics/configs/plugins/usePlugins.js
@@ -1,5 +1,5 @@
import { invoke } from "@tauri-apps/api/core";
-import { useTranslation } from "react-i18next";
+import { useI18n } from "@useI18n";
import { IS_PLUGIN_PATH_DEV_MODE, getPluginsList } from "@ui_configs";
import {
store,
@@ -36,7 +36,7 @@ import * as logics_common from "@logics_common";
const PLUGIN_LIST_URL = getPluginsList();
export const usePlugins = () => {
- const { t } = useTranslation();
+ const { t, i18n } = useI18n();
const { showNotification_Success, showNotification_Error } = useNotificationStatus();
const { asyncStdoutToPython } = useStdoutToPython();
@@ -50,8 +50,6 @@ export const usePlugins = () => {
const { asyncTauriFetchGithub } = useFetch();
- const { i18n } = useTranslation();
-
const generatePluginContext = (downloaded_plugin_info) => {
const plugin_context = {
registerComponent: (component) => {
diff --git a/src-ui/logics/configs/transcription/useMicMaxWords.js b/src-ui/logics/configs/transcription/useMicMaxWords.js
deleted file mode 100644
index 72abd77b..00000000
--- a/src-ui/logics/configs/transcription/useMicMaxWords.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_MicMaxWords } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useMicMaxWords = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentMicMaxWords, updateMicMaxWords, pendingMicMaxWords } = useStore_MicMaxWords();
-
- const getMicMaxWords = () => {
- pendingMicMaxWords();
- asyncStdoutToPython("/get/data/mic_max_phrases");
- };
-
- const setMicMaxWords = (selected_mic_max_phrases) => {
- pendingMicMaxWords();
- asyncStdoutToPython("/set/data/mic_max_phrases", selected_mic_max_phrases);
- };
-
- return {
- currentMicMaxWords,
- getMicMaxWords,
- updateMicMaxWords,
- setMicMaxWords,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/transcription/useMicPhraseTimeout.js b/src-ui/logics/configs/transcription/useMicPhraseTimeout.js
deleted file mode 100644
index 6f66abf8..00000000
--- a/src-ui/logics/configs/transcription/useMicPhraseTimeout.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_MicPhraseTimeout } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useMicPhraseTimeout = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentMicPhraseTimeout, updateMicPhraseTimeout, pendingMicPhraseTimeout } = useStore_MicPhraseTimeout();
-
- const getMicPhraseTimeout = () => {
- pendingMicPhraseTimeout();
- asyncStdoutToPython("/get/data/mic_phrase_timeout");
- };
-
- const setMicPhraseTimeout = (selected_mic_phrase_timeout) => {
- pendingMicPhraseTimeout();
- asyncStdoutToPython("/set/data/mic_phrase_timeout", selected_mic_phrase_timeout);
- };
-
- return {
- currentMicPhraseTimeout,
- getMicPhraseTimeout,
- updateMicPhraseTimeout,
- setMicPhraseTimeout,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/transcription/useMicRecordTimeout.js b/src-ui/logics/configs/transcription/useMicRecordTimeout.js
deleted file mode 100644
index cfeab807..00000000
--- a/src-ui/logics/configs/transcription/useMicRecordTimeout.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_MicRecordTimeout } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useMicRecordTimeout = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentMicRecordTimeout, updateMicRecordTimeout, pendingMicRecordTimeout } = useStore_MicRecordTimeout();
-
- const getMicRecordTimeout = () => {
- pendingMicRecordTimeout();
- asyncStdoutToPython("/get/data/mic_record_timeout");
- };
-
- const setMicRecordTimeout = (selected_mic_record_timeout) => {
- pendingMicRecordTimeout();
- asyncStdoutToPython("/set/data/mic_record_timeout", selected_mic_record_timeout);
- };
-
- return {
- currentMicRecordTimeout,
- getMicRecordTimeout,
- updateMicRecordTimeout,
- setMicRecordTimeout,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/transcription/useMicWordFilterList.js b/src-ui/logics/configs/transcription/useMicWordFilterList.js
deleted file mode 100644
index 1901e286..00000000
--- a/src-ui/logics/configs/transcription/useMicWordFilterList.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import { useStore_MicWordFilterList } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useMicWordFilterList = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentMicWordFilterList, updateMicWordFilterList, pendingMicWordFilterList } = useStore_MicWordFilterList();
-
- const getMicWordFilterList = () => {
- pendingMicWordFilterList();
- asyncStdoutToPython("/get/data/mic_word_filter");
- };
-
- const setMicWordFilterList = (selected_mic_word_filter) => {
- pendingMicWordFilterList();
- asyncStdoutToPython("/set/data/mic_word_filter", selected_mic_word_filter);
- };
-
- const updateMicWordFilterList_FromBackend = (payload) => {
- updateMicWordFilterList((prev_list) => {
- const updated_list = [...prev_list.data];
- for (const value of payload) {
- const existing_item = updated_list.find(item => item.value === value);
- if (existing_item) {
- existing_item.is_redoable = false;
- } else {
- updated_list.push({ value, is_redoable: false });
- }
- }
- return updated_list;
- });
- };
-
- return {
- currentMicWordFilterList,
- getMicWordFilterList,
- updateMicWordFilterList,
- setMicWordFilterList,
-
- updateMicWordFilterList_FromBackend,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/transcription/useSelectableWhisperComputeDeviceList.js b/src-ui/logics/configs/transcription/useSelectableWhisperComputeDeviceList.js
deleted file mode 100644
index a5528937..00000000
--- a/src-ui/logics/configs/transcription/useSelectableWhisperComputeDeviceList.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { useStore_SelectableWhisperComputeDeviceList } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-import { transformToIndexedArray } from "@utils";
-
-export const useSelectableWhisperComputeDeviceList = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentSelectableWhisperComputeDeviceList, updateSelectableWhisperComputeDeviceList, pendingSelectableWhisperComputeDeviceList } = useStore_SelectableWhisperComputeDeviceList();
-
- const getSelectableWhisperComputeDeviceList = () => {
- pendingSelectableWhisperComputeDeviceList();
- asyncStdoutToPython("/get/data/transcription_compute_device_list");
- };
-
- const updateSelectableWhisperComputeDeviceList_FromBackend = (payload) => {
- updateSelectableWhisperComputeDeviceList(transformToIndexedArray(payload));
- };
-
- return {
- currentSelectableWhisperComputeDeviceList,
- getSelectableWhisperComputeDeviceList,
- updateSelectableWhisperComputeDeviceList,
-
- updateSelectableWhisperComputeDeviceList_FromBackend,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/transcription/useSelectedTranscriptionEngine.js b/src-ui/logics/configs/transcription/useSelectedTranscriptionEngine.js
deleted file mode 100644
index 9c7758f7..00000000
--- a/src-ui/logics/configs/transcription/useSelectedTranscriptionEngine.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_SelectedTranscriptionEngine } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useSelectedTranscriptionEngine = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentSelectedTranscriptionEngine, updateSelectedTranscriptionEngine, pendingSelectedTranscriptionEngine } = useStore_SelectedTranscriptionEngine();
-
- const getSelectedTranscriptionEngine = () => {
- pendingSelectedTranscriptionEngine();
- asyncStdoutToPython("/get/data/selected_transcription_engine");
- };
-
- const setSelectedTranscriptionEngine = (selected_transcription_engine) => {
- pendingSelectedTranscriptionEngine();
- asyncStdoutToPython("/set/data/selected_transcription_engine", selected_transcription_engine);
- };
-
- return {
- currentSelectedTranscriptionEngine,
- getSelectedTranscriptionEngine,
- updateSelectedTranscriptionEngine,
- setSelectedTranscriptionEngine,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/transcription/useSelectedWhisperComputeDevice.js b/src-ui/logics/configs/transcription/useSelectedWhisperComputeDevice.js
deleted file mode 100644
index 517dde00..00000000
--- a/src-ui/logics/configs/transcription/useSelectedWhisperComputeDevice.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_SelectedWhisperComputeDevice } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useSelectedWhisperComputeDevice = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentSelectedWhisperComputeDevice, updateSelectedWhisperComputeDevice, pendingSelectedWhisperComputeDevice } = useStore_SelectedWhisperComputeDevice();
-
- const getSelectedWhisperComputeDevice = () => {
- pendingSelectedWhisperComputeDevice();
- asyncStdoutToPython("/get/data/selected_transcription_compute_device");
- };
-
- const setSelectedWhisperComputeDevice = (selected_transcription_compute_device) => {
- pendingSelectedWhisperComputeDevice();
- asyncStdoutToPython("/set/data/selected_transcription_compute_device", selected_transcription_compute_device);
- };
-
- return {
- currentSelectedWhisperComputeDevice,
- getSelectedWhisperComputeDevice,
- updateSelectedWhisperComputeDevice,
- setSelectedWhisperComputeDevice,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/transcription/useSelectedWhisperWeightType.js b/src-ui/logics/configs/transcription/useSelectedWhisperWeightType.js
deleted file mode 100644
index 220921ae..00000000
--- a/src-ui/logics/configs/transcription/useSelectedWhisperWeightType.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_SelectedWhisperWeightType } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useSelectedWhisperWeightType = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentSelectedWhisperWeightType, updateSelectedWhisperWeightType, pendingSelectedWhisperWeightType } = useStore_SelectedWhisperWeightType();
-
- const getSelectedWhisperWeightType = () => {
- pendingSelectedWhisperWeightType();
- asyncStdoutToPython("/get/data/whisper_weight_type");
- };
-
- const setSelectedWhisperWeightType = (selected_whisper_weight_type) => {
- pendingSelectedWhisperWeightType();
- asyncStdoutToPython("/set/data/whisper_weight_type", selected_whisper_weight_type);
- };
-
- return {
- currentSelectedWhisperWeightType,
- getSelectedWhisperWeightType,
- updateSelectedWhisperWeightType,
- setSelectedWhisperWeightType,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/transcription/useSpeakerMaxWords.js b/src-ui/logics/configs/transcription/useSpeakerMaxWords.js
deleted file mode 100644
index 4907ab09..00000000
--- a/src-ui/logics/configs/transcription/useSpeakerMaxWords.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_SpeakerMaxWords } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useSpeakerMaxWords = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentSpeakerMaxWords, updateSpeakerMaxWords, pendingSpeakerMaxWords } = useStore_SpeakerMaxWords();
-
- const getSpeakerMaxWords = () => {
- pendingSpeakerMaxWords();
- asyncStdoutToPython("/get/data/speaker_max_phrases");
- };
-
- const setSpeakerMaxWords = (selected_speaker_max_phrases) => {
- pendingSpeakerMaxWords();
- asyncStdoutToPython("/set/data/speaker_max_phrases", selected_speaker_max_phrases);
- };
-
- return {
- currentSpeakerMaxWords,
- getSpeakerMaxWords,
- updateSpeakerMaxWords,
- setSpeakerMaxWords,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/transcription/useSpeakerPhraseTimeout.js b/src-ui/logics/configs/transcription/useSpeakerPhraseTimeout.js
deleted file mode 100644
index 4f9ac1c9..00000000
--- a/src-ui/logics/configs/transcription/useSpeakerPhraseTimeout.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_SpeakerPhraseTimeout } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useSpeakerPhraseTimeout = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentSpeakerPhraseTimeout, updateSpeakerPhraseTimeout, pendingSpeakerPhraseTimeout } = useStore_SpeakerPhraseTimeout();
-
- const getSpeakerPhraseTimeout = () => {
- pendingSpeakerPhraseTimeout();
- asyncStdoutToPython("/get/data/speaker_phrase_timeout");
- };
-
- const setSpeakerPhraseTimeout = (selected_speaker_phrase_timeout) => {
- pendingSpeakerPhraseTimeout();
- asyncStdoutToPython("/set/data/speaker_phrase_timeout", selected_speaker_phrase_timeout);
- };
-
- return {
- currentSpeakerPhraseTimeout,
- getSpeakerPhraseTimeout,
- updateSpeakerPhraseTimeout,
- setSpeakerPhraseTimeout,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/transcription/useSpeakerRecordTimeout.js b/src-ui/logics/configs/transcription/useSpeakerRecordTimeout.js
deleted file mode 100644
index 123ad89b..00000000
--- a/src-ui/logics/configs/transcription/useSpeakerRecordTimeout.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_SpeakerRecordTimeout } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useSpeakerRecordTimeout = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentSpeakerRecordTimeout, updateSpeakerRecordTimeout, pendingSpeakerRecordTimeout } = useStore_SpeakerRecordTimeout();
-
- const getSpeakerRecordTimeout = () => {
- pendingSpeakerRecordTimeout();
- asyncStdoutToPython("/get/data/speaker_record_timeout");
- };
-
- const setSpeakerRecordTimeout = (selected_speaker_record_timeout) => {
- pendingSpeakerRecordTimeout();
- asyncStdoutToPython("/set/data/speaker_record_timeout", selected_speaker_record_timeout);
- };
-
- return {
- currentSpeakerRecordTimeout,
- getSpeakerRecordTimeout,
- updateSpeakerRecordTimeout,
- setSpeakerRecordTimeout,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/transcription/useTranscription.js b/src-ui/logics/configs/transcription/useTranscription.js
new file mode 100644
index 00000000..2079780c
--- /dev/null
+++ b/src-ui/logics/configs/transcription/useTranscription.js
@@ -0,0 +1,292 @@
+import {
+ useStore_MicRecordTimeout,
+ useStore_MicPhraseTimeout,
+ useStore_MicMaxWords,
+ useStore_MicWordFilterList,
+
+ useStore_SpeakerMaxWords,
+ useStore_SpeakerPhraseTimeout,
+ useStore_SpeakerRecordTimeout,
+
+ useStore_SelectableWhisperComputeDeviceList,
+ useStore_SelectedTranscriptionEngine,
+ useStore_SelectedWhisperComputeDevice,
+ useStore_SelectedWhisperWeightType,
+
+ useStore_WhisperWeightTypeStatus,
+} from "@store";
+import { useStdoutToPython } from "@useStdoutToPython";
+import { transformToIndexedArray } from "@utils";
+
+export const useTranscription = () => {
+ const { asyncStdoutToPython } = useStdoutToPython();
+
+ // Mic
+ const { currentMicRecordTimeout, updateMicRecordTimeout, pendingMicRecordTimeout } = useStore_MicRecordTimeout();
+ const { currentMicPhraseTimeout, updateMicPhraseTimeout, pendingMicPhraseTimeout } = useStore_MicPhraseTimeout();
+ const { currentMicMaxWords, updateMicMaxWords, pendingMicMaxWords } = useStore_MicMaxWords();
+ const { currentMicWordFilterList, updateMicWordFilterList, pendingMicWordFilterList } = useStore_MicWordFilterList();
+
+ // Speaker
+ const { currentSpeakerRecordTimeout, updateSpeakerRecordTimeout, pendingSpeakerRecordTimeout } = useStore_SpeakerRecordTimeout();
+ const { currentSpeakerPhraseTimeout, updateSpeakerPhraseTimeout, pendingSpeakerPhraseTimeout } = useStore_SpeakerPhraseTimeout();
+ const { currentSpeakerMaxWords, updateSpeakerMaxWords, pendingSpeakerMaxWords } = useStore_SpeakerMaxWords();
+
+ // Transcription Engines
+ const { currentSelectedTranscriptionEngine, updateSelectedTranscriptionEngine, pendingSelectedTranscriptionEngine } = useStore_SelectedTranscriptionEngine();
+ const { currentWhisperWeightTypeStatus, updateWhisperWeightTypeStatus, pendingWhisperWeightTypeStatus } = useStore_WhisperWeightTypeStatus();
+ const { currentSelectedWhisperWeightType, updateSelectedWhisperWeightType, pendingSelectedWhisperWeightType } = useStore_SelectedWhisperWeightType();
+ const { currentSelectableWhisperComputeDeviceList, updateSelectableWhisperComputeDeviceList, pendingSelectableWhisperComputeDeviceList } = useStore_SelectableWhisperComputeDeviceList();
+ const { currentSelectedWhisperComputeDevice, updateSelectedWhisperComputeDevice, pendingSelectedWhisperComputeDevice } = useStore_SelectedWhisperComputeDevice();
+
+
+ // Mic
+ const getMicRecordTimeout = () => {
+ pendingMicRecordTimeout();
+ asyncStdoutToPython("/get/data/mic_record_timeout");
+ };
+
+ const setMicRecordTimeout = (selected_mic_record_timeout) => {
+ pendingMicRecordTimeout();
+ asyncStdoutToPython("/set/data/mic_record_timeout", selected_mic_record_timeout);
+ };
+
+
+ const getMicPhraseTimeout = () => {
+ pendingMicPhraseTimeout();
+ asyncStdoutToPython("/get/data/mic_phrase_timeout");
+ };
+
+ const setMicPhraseTimeout = (selected_mic_phrase_timeout) => {
+ pendingMicPhraseTimeout();
+ asyncStdoutToPython("/set/data/mic_phrase_timeout", selected_mic_phrase_timeout);
+ };
+
+
+ const getMicMaxWords = () => {
+ pendingMicMaxWords();
+ asyncStdoutToPython("/get/data/mic_max_phrases");
+ };
+
+ const setMicMaxWords = (selected_mic_max_phrases) => {
+ pendingMicMaxWords();
+ asyncStdoutToPython("/set/data/mic_max_phrases", selected_mic_max_phrases);
+ };
+
+ const getMicWordFilterList = () => {
+ pendingMicWordFilterList();
+ asyncStdoutToPython("/get/data/mic_word_filter");
+ };
+
+ const setMicWordFilterList = (selected_mic_word_filter) => {
+ pendingMicWordFilterList();
+ asyncStdoutToPython("/set/data/mic_word_filter", selected_mic_word_filter);
+ };
+
+ const updateMicWordFilterList_FromBackend = (payload) => {
+ updateMicWordFilterList((prev_list) => {
+ const updated_list = [...prev_list.data];
+ for (const value of payload) {
+ const existing_item = updated_list.find(item => item.value === value);
+ if (existing_item) {
+ existing_item.is_redoable = false;
+ } else {
+ updated_list.push({ value, is_redoable: false });
+ }
+ }
+ return updated_list;
+ });
+ };
+
+ // Speaker
+ const getSpeakerRecordTimeout = () => {
+ pendingSpeakerRecordTimeout();
+ asyncStdoutToPython("/get/data/speaker_record_timeout");
+ };
+
+ const setSpeakerRecordTimeout = (selected_speaker_record_timeout) => {
+ pendingSpeakerRecordTimeout();
+ asyncStdoutToPython("/set/data/speaker_record_timeout", selected_speaker_record_timeout);
+ };
+
+
+ const getSpeakerPhraseTimeout = () => {
+ pendingSpeakerPhraseTimeout();
+ asyncStdoutToPython("/get/data/speaker_phrase_timeout");
+ };
+
+ const setSpeakerPhraseTimeout = (selected_speaker_phrase_timeout) => {
+ pendingSpeakerPhraseTimeout();
+ asyncStdoutToPython("/set/data/speaker_phrase_timeout", selected_speaker_phrase_timeout);
+ };
+
+
+ const getSpeakerMaxWords = () => {
+ pendingSpeakerMaxWords();
+ asyncStdoutToPython("/get/data/speaker_max_phrases");
+ };
+
+ const setSpeakerMaxWords = (selected_speaker_max_phrases) => {
+ pendingSpeakerMaxWords();
+ asyncStdoutToPython("/set/data/speaker_max_phrases", selected_speaker_max_phrases);
+ };
+
+
+ // Transcription Engines
+ // Transcription Engines (Google / Whisper)
+ const getSelectedTranscriptionEngine = () => {
+ pendingSelectedTranscriptionEngine();
+ asyncStdoutToPython("/get/data/selected_transcription_engine");
+ };
+
+ const setSelectedTranscriptionEngine = (selected_transcription_engine) => {
+ pendingSelectedTranscriptionEngine();
+ asyncStdoutToPython("/set/data/selected_transcription_engine", selected_transcription_engine);
+ };
+
+
+ // Transcription Engines (Weight Type List)
+ const updateDownloadedWhisperWeightTypeStatus = (downloaded_weight_type_status) => {
+ updateWhisperWeightTypeStatus((old_status) =>
+ old_status.data.map((item) => ({
+ ...item,
+ is_downloaded: downloaded_weight_type_status[item.id] ?? item.is_downloaded,
+ }))
+ );
+ };
+ const updateDownloadProgressWhisperWeightTypeStatus = (payload) => {
+ if (payload === true) return console.error("fix me.");
+
+ updateWhisperWeightTypeStatus((old_status) =>
+ old_status.data.map((item) =>
+ payload.weight_type === item.id
+ ? { ...item, progress: payload.progress * 100 }
+ : item
+ )
+ );
+ };
+ const pendingWhisperWeightType = (id) => {
+ updateWhisperWeightTypeStatus((old_status) =>
+ old_status.data.map((item) =>
+ id === item.id
+ ? { ...item, is_pending: true }
+ : item
+ )
+ );
+ };
+ const downloadedWhisperWeightType = (id) => {
+ updateWhisperWeightTypeStatus((old_status) =>
+ old_status.data.map((item) =>
+ id === item.id
+ ? { ...item, is_downloaded: true, is_pending: false, progress: null }
+ : item
+ )
+ );
+ };
+
+ const downloadWhisperWeight = (weight_type) => {
+ asyncStdoutToPython("/run/download_whisper_weight", weight_type);
+ };
+
+ // Transcription Engines (Selected Weight Type)
+ const getSelectedWhisperWeightType = () => {
+ pendingSelectedWhisperWeightType();
+ asyncStdoutToPython("/get/data/whisper_weight_type");
+ };
+
+ const setSelectedWhisperWeightType = (selected_whisper_weight_type) => {
+ pendingSelectedWhisperWeightType();
+ asyncStdoutToPython("/set/data/whisper_weight_type", selected_whisper_weight_type);
+ };
+
+
+ // Transcription Engines (Compute Device List)
+ const getSelectableWhisperComputeDeviceList = () => {
+ pendingSelectableWhisperComputeDeviceList();
+ asyncStdoutToPython("/get/data/transcription_compute_device_list");
+ };
+
+ const updateSelectableWhisperComputeDeviceList_FromBackend = (payload) => {
+ updateSelectableWhisperComputeDeviceList(transformToIndexedArray(payload));
+ };
+
+ // Transcription Engines (Selected Compute Device)
+ const getSelectedWhisperComputeDevice = () => {
+ pendingSelectedWhisperComputeDevice();
+ asyncStdoutToPython("/get/data/selected_transcription_compute_device");
+ };
+
+ const setSelectedWhisperComputeDevice = (selected_transcription_compute_device) => {
+ pendingSelectedWhisperComputeDevice();
+ asyncStdoutToPython("/set/data/selected_transcription_compute_device", selected_transcription_compute_device);
+ };
+
+ return {
+ // Mic
+ currentMicRecordTimeout,
+ getMicRecordTimeout,
+ updateMicRecordTimeout,
+ setMicRecordTimeout,
+
+ currentMicPhraseTimeout,
+ getMicPhraseTimeout,
+ updateMicPhraseTimeout,
+ setMicPhraseTimeout,
+
+ currentMicMaxWords,
+ getMicMaxWords,
+ updateMicMaxWords,
+ setMicMaxWords,
+
+ currentMicWordFilterList,
+ getMicWordFilterList,
+ updateMicWordFilterList,
+ setMicWordFilterList,
+ updateMicWordFilterList_FromBackend,
+
+ // Speaker
+ currentSpeakerRecordTimeout,
+ getSpeakerRecordTimeout,
+ updateSpeakerRecordTimeout,
+ setSpeakerRecordTimeout,
+
+ currentSpeakerPhraseTimeout,
+ getSpeakerPhraseTimeout,
+ updateSpeakerPhraseTimeout,
+ setSpeakerPhraseTimeout,
+
+ currentSpeakerMaxWords,
+ getSpeakerMaxWords,
+ updateSpeakerMaxWords,
+ setSpeakerMaxWords,
+
+ // Transcription Engines
+ currentSelectedTranscriptionEngine,
+ getSelectedTranscriptionEngine,
+ updateSelectedTranscriptionEngine,
+ setSelectedTranscriptionEngine,
+
+ currentWhisperWeightTypeStatus,
+ updateWhisperWeightTypeStatus,
+ updateDownloadedWhisperWeightTypeStatus,
+ updateDownloadProgressWhisperWeightTypeStatus,
+ pendingWhisperWeightType,
+ downloadedWhisperWeightType,
+ downloadWhisperWeight,
+
+ currentSelectedWhisperWeightType,
+ getSelectedWhisperWeightType,
+ updateSelectedWhisperWeightType,
+ setSelectedWhisperWeightType,
+
+ currentSelectableWhisperComputeDeviceList,
+ getSelectableWhisperComputeDeviceList,
+ updateSelectableWhisperComputeDeviceList,
+ updateSelectableWhisperComputeDeviceList_FromBackend,
+
+ currentSelectedWhisperComputeDevice,
+ getSelectedWhisperComputeDevice,
+ updateSelectedWhisperComputeDevice,
+ setSelectedWhisperComputeDevice,
+ };
+};
\ No newline at end of file
diff --git a/src-ui/logics/configs/transcription/useWhisperWeightTypeStatus.js b/src-ui/logics/configs/transcription/useWhisperWeightTypeStatus.js
deleted file mode 100644
index 1d8a96c3..00000000
--- a/src-ui/logics/configs/transcription/useWhisperWeightTypeStatus.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import { useStore_WhisperWeightTypeStatus } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useWhisperWeightTypeStatus = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentWhisperWeightTypeStatus, updateWhisperWeightTypeStatus, pendingWhisperWeightTypeStatus } = useStore_WhisperWeightTypeStatus();
-
- const updateDownloadedWhisperWeightTypeStatus = (downloaded_weight_type_status) => {
- updateWhisperWeightTypeStatus((old_status) =>
- old_status.data.map((item) => ({
- ...item,
- is_downloaded: downloaded_weight_type_status[item.id] ?? item.is_downloaded,
- }))
- );
- };
- const updateDownloadProgressWhisperWeightTypeStatus = (payload) => {
- if (payload === true) return console.error("fix me.");
-
- updateWhisperWeightTypeStatus((old_status) =>
- old_status.data.map((item) =>
- payload.weight_type === item.id
- ? { ...item, progress: payload.progress * 100 }
- : item
- )
- );
- };
- const pendingWhisperWeightType = (id) => {
- updateWhisperWeightTypeStatus((old_status) =>
- old_status.data.map((item) =>
- id === item.id
- ? { ...item, is_pending: true }
- : item
- )
- );
- };
- const downloadedWhisperWeightType = (id) => {
- updateWhisperWeightTypeStatus((old_status) =>
- old_status.data.map((item) =>
- id === item.id
- ? { ...item, is_downloaded: true, is_pending: false, progress: null }
- : item
- )
- );
- };
-
- const downloadWhisperWeight = (weight_type) => {
- asyncStdoutToPython("/run/download_whisper_weight", weight_type);
- };
-
- return {
- currentWhisperWeightTypeStatus,
- updateWhisperWeightTypeStatus,
-
- updateDownloadedWhisperWeightTypeStatus,
- updateDownloadProgressWhisperWeightTypeStatus,
- pendingWhisperWeightType,
- downloadedWhisperWeightType,
- downloadWhisperWeight,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/translation/useCTranslate2WeightTypeStatus.js b/src-ui/logics/configs/translation/useCTranslate2WeightTypeStatus.js
deleted file mode 100644
index fa28404e..00000000
--- a/src-ui/logics/configs/translation/useCTranslate2WeightTypeStatus.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import { useStore_CTranslate2WeightTypeStatus } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useCTranslate2WeightTypeStatus = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentCTranslate2WeightTypeStatus, updateCTranslate2WeightTypeStatus, pendingCTranslate2WeightTypeStatus } = useStore_CTranslate2WeightTypeStatus();
-
- const updateDownloadedCTranslate2WeightTypeStatus = (downloaded_weight_type_status) => {
- updateCTranslate2WeightTypeStatus((old_status) =>
- old_status.data.map((item) => ({
- ...item,
- is_downloaded: downloaded_weight_type_status[item.id] ?? item.is_downloaded,
- }))
- );
- };
- const updateDownloadProgressCTranslate2WeightTypeStatus = (payload) => {
- if (payload === true) return console.error("fix me.");
-
- updateCTranslate2WeightTypeStatus((old_status) =>
- old_status.data.map((item) =>
- payload.weight_type === item.id
- ? { ...item, progress: payload.progress * 100 }
- : item
- )
- );
- };
- const pendingCTranslate2WeightType = (id) => {
- updateCTranslate2WeightTypeStatus((old_status) =>
- old_status.data.map((item) =>
- id === item.id
- ? { ...item, is_pending: true }
- : item
- )
- );
- };
- const downloadedCTranslate2WeightType = (id) => {
- updateCTranslate2WeightTypeStatus((old_status) =>
- old_status.data.map((item) =>
- id === item.id
- ? { ...item, is_downloaded: true, is_pending: false, progress: null }
- : item
- )
- );
- };
-
- const downloadCTranslate2Weight = (weight_type) => {
- asyncStdoutToPython("/run/download_ctranslate2_weight", weight_type);
- };
-
- return {
- currentCTranslate2WeightTypeStatus,
- updateCTranslate2WeightTypeStatus,
-
- updateDownloadedCTranslate2WeightTypeStatus,
- updateDownloadProgressCTranslate2WeightTypeStatus,
- pendingCTranslate2WeightType,
- downloadedCTranslate2WeightType,
- downloadCTranslate2Weight,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/translation/useDeepLAuthKey.js b/src-ui/logics/configs/translation/useDeepLAuthKey.js
deleted file mode 100644
index 89661ad1..00000000
--- a/src-ui/logics/configs/translation/useDeepLAuthKey.js
+++ /dev/null
@@ -1,45 +0,0 @@
-import { useStore_DeepLAuthKey } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-import { useTranslation } from "react-i18next";
-import { useNotificationStatus } from "@logics_common";
-
-export const useDeepLAuthKey = () => {
- const { t } = useTranslation();
- const { showNotification_Success, showNotification_Error } = useNotificationStatus();
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentDeepLAuthKey, updateDeepLAuthKey, pendingDeepLAuthKey } = useStore_DeepLAuthKey();
-
- const getDeepLAuthKey = () => {
- pendingDeepLAuthKey();
- asyncStdoutToPython("/get/data/deepl_auth_key");
- };
-
- const setDeepLAuthKey = (selected_deepl_auth_key) => {
- pendingDeepLAuthKey();
- asyncStdoutToPython("/set/data/deepl_auth_key", selected_deepl_auth_key);
- };
-
- const deleteDeepLAuthKey = () => {
- pendingDeepLAuthKey();
- asyncStdoutToPython("/delete/data/deepl_auth_key");
- };
- const deletedDeepLAuthKey = () => {
- updateDeepLAuthKey("");
- };
-
- const savedDeepLAuthKey = (data) => {
- updateDeepLAuthKey(data);
- showNotification_Success(t("config_page.translation.deepl_auth_key.auth_key_success"));
- };
-
- return {
- currentDeepLAuthKey,
- getDeepLAuthKey,
- updateDeepLAuthKey,
- setDeepLAuthKey,
- deleteDeepLAuthKey,
-
- deletedDeepLAuthKey,
- savedDeepLAuthKey,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/translation/useSelectableCTranslate2ComputeDeviceList.js b/src-ui/logics/configs/translation/useSelectableCTranslate2ComputeDeviceList.js
deleted file mode 100644
index 4ae60c1f..00000000
--- a/src-ui/logics/configs/translation/useSelectableCTranslate2ComputeDeviceList.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { useStore_SelectableCTranslate2ComputeDeviceList } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-import { transformToIndexedArray } from "@utils";
-
-export const useSelectableCTranslate2ComputeDeviceList = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentSelectableCTranslate2ComputeDeviceList, updateSelectableCTranslate2ComputeDeviceList, pendingSelectableCTranslate2ComputeDeviceList } = useStore_SelectableCTranslate2ComputeDeviceList();
-
- const getSelectableCTranslate2ComputeDeviceList = () => {
- pendingSelectableCTranslate2ComputeDeviceList();
- asyncStdoutToPython("/get/data/translation_compute_device_list");
- };
-
- const updateSelectableCTranslate2ComputeDeviceList_FromBackend = (payload) => {
- updateSelectableCTranslate2ComputeDeviceList(transformToIndexedArray(payload));
- };
-
- return {
- currentSelectableCTranslate2ComputeDeviceList,
- getSelectableCTranslate2ComputeDeviceList,
- updateSelectableCTranslate2ComputeDeviceList,
-
- updateSelectableCTranslate2ComputeDeviceList_FromBackend,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/translation/useSelectedCTranslate2ComputeDevice.js b/src-ui/logics/configs/translation/useSelectedCTranslate2ComputeDevice.js
deleted file mode 100644
index 0887364d..00000000
--- a/src-ui/logics/configs/translation/useSelectedCTranslate2ComputeDevice.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_SelectedCTranslate2ComputeDevice } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useSelectedCTranslate2ComputeDevice = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentSelectedCTranslate2ComputeDevice, updateSelectedCTranslate2ComputeDevice, pendingSelectedCTranslate2ComputeDevice } = useStore_SelectedCTranslate2ComputeDevice();
-
- const getSelectedCTranslate2ComputeDevice = () => {
- pendingSelectedCTranslate2ComputeDevice();
- asyncStdoutToPython("/get/data/selected_translation_compute_device");
- };
-
- const setSelectedCTranslate2ComputeDevice = (selected_translation_compute_device) => {
- pendingSelectedCTranslate2ComputeDevice();
- asyncStdoutToPython("/set/data/selected_translation_compute_device", selected_translation_compute_device);
- };
-
- return {
- currentSelectedCTranslate2ComputeDevice,
- getSelectedCTranslate2ComputeDevice,
- updateSelectedCTranslate2ComputeDevice,
- setSelectedCTranslate2ComputeDevice,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/translation/useSelectedCTranslate2WeightType.js b/src-ui/logics/configs/translation/useSelectedCTranslate2WeightType.js
deleted file mode 100644
index 9b6197dc..00000000
--- a/src-ui/logics/configs/translation/useSelectedCTranslate2WeightType.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_SelectedCTranslate2WeightType } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useSelectedCTranslate2WeightType = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentSelectedCTranslate2WeightType, updateSelectedCTranslate2WeightType, pendingSelectedCTranslate2WeightType } = useStore_SelectedCTranslate2WeightType();
-
- const getSelectedCTranslate2WeightType = () => {
- pendingSelectedCTranslate2WeightType();
- asyncStdoutToPython("/get/data/ctranslate2_weight_type");
- };
-
- const setSelectedCTranslate2WeightType = (selected_ctranslate2_weight_type) => {
- pendingSelectedCTranslate2WeightType();
- asyncStdoutToPython("/set/data/ctranslate2_weight_type", selected_ctranslate2_weight_type);
- };
-
- return {
- currentSelectedCTranslate2WeightType,
- getSelectedCTranslate2WeightType,
- updateSelectedCTranslate2WeightType,
- setSelectedCTranslate2WeightType,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/translation/useTranslation.js b/src-ui/logics/configs/translation/useTranslation.js
new file mode 100644
index 00000000..77747256
--- /dev/null
+++ b/src-ui/logics/configs/translation/useTranslation.js
@@ -0,0 +1,155 @@
+import {
+ useStore_CTranslate2WeightTypeStatus,
+ useStore_SelectedCTranslate2WeightType,
+ useStore_SelectableCTranslate2ComputeDeviceList,
+ useStore_SelectedCTranslate2ComputeDevice,
+ useStore_DeepLAuthKey,
+} from "@store";
+import { useStdoutToPython } from "@useStdoutToPython";
+import { useI18n } from "@useI18n";
+import { transformToIndexedArray } from "@utils";
+import { useNotificationStatus } from "@logics_common";
+
+export const useTranslation = () => {
+ const { t } = useI18n();
+ const { asyncStdoutToPython } = useStdoutToPython();
+ const { showNotification_Success, showNotification_Error } = useNotificationStatus();
+
+ const { currentCTranslate2WeightTypeStatus, updateCTranslate2WeightTypeStatus, pendingCTranslate2WeightTypeStatus } = useStore_CTranslate2WeightTypeStatus();
+ const { currentSelectedCTranslate2WeightType, updateSelectedCTranslate2WeightType, pendingSelectedCTranslate2WeightType } = useStore_SelectedCTranslate2WeightType();
+ const { currentSelectableCTranslate2ComputeDeviceList, updateSelectableCTranslate2ComputeDeviceList, pendingSelectableCTranslate2ComputeDeviceList } = useStore_SelectableCTranslate2ComputeDeviceList();
+ const { currentSelectedCTranslate2ComputeDevice, updateSelectedCTranslate2ComputeDevice, pendingSelectedCTranslate2ComputeDevice } = useStore_SelectedCTranslate2ComputeDevice();
+ const { currentDeepLAuthKey, updateDeepLAuthKey, pendingDeepLAuthKey } = useStore_DeepLAuthKey();
+
+
+ const updateDownloadedCTranslate2WeightTypeStatus = (downloaded_weight_type_status) => {
+ updateCTranslate2WeightTypeStatus((old_status) =>
+ old_status.data.map((item) => ({
+ ...item,
+ is_downloaded: downloaded_weight_type_status[item.id] ?? item.is_downloaded,
+ }))
+ );
+ };
+ const updateDownloadProgressCTranslate2WeightTypeStatus = (payload) => {
+ if (payload === true) return console.error("fix me.");
+
+ updateCTranslate2WeightTypeStatus((old_status) =>
+ old_status.data.map((item) =>
+ payload.weight_type === item.id
+ ? { ...item, progress: payload.progress * 100 }
+ : item
+ )
+ );
+ };
+ const pendingCTranslate2WeightType = (id) => {
+ updateCTranslate2WeightTypeStatus((old_status) =>
+ old_status.data.map((item) =>
+ id === item.id
+ ? { ...item, is_pending: true }
+ : item
+ )
+ );
+ };
+ const downloadedCTranslate2WeightType = (id) => {
+ updateCTranslate2WeightTypeStatus((old_status) =>
+ old_status.data.map((item) =>
+ id === item.id
+ ? { ...item, is_downloaded: true, is_pending: false, progress: null }
+ : item
+ )
+ );
+ };
+ const downloadCTranslate2Weight = (weight_type) => {
+ asyncStdoutToPython("/run/download_ctranslate2_weight", weight_type);
+ };
+
+
+ const getSelectedCTranslate2WeightType = () => {
+ pendingSelectedCTranslate2WeightType();
+ asyncStdoutToPython("/get/data/ctranslate2_weight_type");
+ };
+
+ const setSelectedCTranslate2WeightType = (selected_ctranslate2_weight_type) => {
+ pendingSelectedCTranslate2WeightType();
+ asyncStdoutToPython("/set/data/ctranslate2_weight_type", selected_ctranslate2_weight_type);
+ };
+
+
+ const getSelectableCTranslate2ComputeDeviceList = () => {
+ pendingSelectableCTranslate2ComputeDeviceList();
+ asyncStdoutToPython("/get/data/translation_compute_device_list");
+ };
+
+ const updateSelectableCTranslate2ComputeDeviceList_FromBackend = (payload) => {
+ updateSelectableCTranslate2ComputeDeviceList(transformToIndexedArray(payload));
+ };
+
+
+ const getSelectedCTranslate2ComputeDevice = () => {
+ pendingSelectedCTranslate2ComputeDevice();
+ asyncStdoutToPython("/get/data/selected_translation_compute_device");
+ };
+
+ const setSelectedCTranslate2ComputeDevice = (selected_translation_compute_device) => {
+ pendingSelectedCTranslate2ComputeDevice();
+ asyncStdoutToPython("/set/data/selected_translation_compute_device", selected_translation_compute_device);
+ };
+
+
+ const getDeepLAuthKey = () => {
+ pendingDeepLAuthKey();
+ asyncStdoutToPython("/get/data/deepl_auth_key");
+ };
+
+ const setDeepLAuthKey = (selected_deepl_auth_key) => {
+ pendingDeepLAuthKey();
+ asyncStdoutToPython("/set/data/deepl_auth_key", selected_deepl_auth_key);
+ };
+
+ const deleteDeepLAuthKey = () => {
+ pendingDeepLAuthKey();
+ asyncStdoutToPython("/delete/data/deepl_auth_key");
+ };
+ const deletedDeepLAuthKey = () => {
+ updateDeepLAuthKey("");
+ };
+
+ const savedDeepLAuthKey = (data) => {
+ updateDeepLAuthKey(data);
+ showNotification_Success(t("config_page.translation.deepl_auth_key.auth_key_success"));
+ };
+
+
+ return {
+ currentCTranslate2WeightTypeStatus,
+ updateCTranslate2WeightTypeStatus,
+ updateDownloadedCTranslate2WeightTypeStatus,
+ updateDownloadProgressCTranslate2WeightTypeStatus,
+ pendingCTranslate2WeightType,
+ downloadedCTranslate2WeightType,
+ downloadCTranslate2Weight,
+
+ currentSelectedCTranslate2WeightType,
+ getSelectedCTranslate2WeightType,
+ updateSelectedCTranslate2WeightType,
+ setSelectedCTranslate2WeightType,
+
+ currentSelectableCTranslate2ComputeDeviceList,
+ getSelectableCTranslate2ComputeDeviceList,
+ updateSelectableCTranslate2ComputeDeviceList,
+ updateSelectableCTranslate2ComputeDeviceList_FromBackend,
+
+ currentSelectedCTranslate2ComputeDevice,
+ getSelectedCTranslate2ComputeDevice,
+ updateSelectedCTranslate2ComputeDevice,
+ setSelectedCTranslate2ComputeDevice,
+
+ currentDeepLAuthKey,
+ getDeepLAuthKey,
+ updateDeepLAuthKey,
+ setDeepLAuthKey,
+ deleteDeepLAuthKey,
+ deletedDeepLAuthKey,
+ savedDeepLAuthKey,
+ };
+};
\ No newline at end of file
diff --git a/src-ui/logics/configs/vr/useIsEnabledOverlayLargeLog.js b/src-ui/logics/configs/vr/useIsEnabledOverlayLargeLog.js
deleted file mode 100644
index c66e865f..00000000
--- a/src-ui/logics/configs/vr/useIsEnabledOverlayLargeLog.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { useStore_IsEnabledOverlayLargeLog } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useIsEnabledOverlayLargeLog = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentIsEnabledOverlayLargeLog, updateIsEnabledOverlayLargeLog, pendingIsEnabledOverlayLargeLog } = useStore_IsEnabledOverlayLargeLog();
-
- const getIsEnabledOverlayLargeLog = () => {
- pendingIsEnabledOverlayLargeLog();
- asyncStdoutToPython("/get/data/overlay_large_log");
- };
-
- const toggleIsEnabledOverlayLargeLog = () => {
- pendingIsEnabledOverlayLargeLog();
- if (currentIsEnabledOverlayLargeLog.data) {
- asyncStdoutToPython("/set/disable/overlay_large_log");
- } else {
- asyncStdoutToPython("/set/enable/overlay_large_log");
- }
- };
-
- return {
- currentIsEnabledOverlayLargeLog,
- getIsEnabledOverlayLargeLog,
- updateIsEnabledOverlayLargeLog,
- toggleIsEnabledOverlayLargeLog,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/vr/useIsEnabledOverlaySmallLog.js b/src-ui/logics/configs/vr/useIsEnabledOverlaySmallLog.js
deleted file mode 100644
index dbdf0247..00000000
--- a/src-ui/logics/configs/vr/useIsEnabledOverlaySmallLog.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { useStore_IsEnabledOverlaySmallLog } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useIsEnabledOverlaySmallLog = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentIsEnabledOverlaySmallLog, updateIsEnabledOverlaySmallLog, pendingIsEnabledOverlaySmallLog } = useStore_IsEnabledOverlaySmallLog();
-
- const getIsEnabledOverlaySmallLog = () => {
- pendingIsEnabledOverlaySmallLog();
- asyncStdoutToPython("/get/data/overlay_small_log");
- };
-
- const toggleIsEnabledOverlaySmallLog = () => {
- pendingIsEnabledOverlaySmallLog();
- if (currentIsEnabledOverlaySmallLog.data) {
- asyncStdoutToPython("/set/disable/overlay_small_log");
- } else {
- asyncStdoutToPython("/set/enable/overlay_small_log");
- }
- };
-
- return {
- currentIsEnabledOverlaySmallLog,
- getIsEnabledOverlaySmallLog,
- updateIsEnabledOverlaySmallLog,
- toggleIsEnabledOverlaySmallLog,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/vr/useOverlayLargeLogSettings.js b/src-ui/logics/configs/vr/useOverlayLargeLogSettings.js
deleted file mode 100644
index f7a1a577..00000000
--- a/src-ui/logics/configs/vr/useOverlayLargeLogSettings.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_OverlayLargeLogSettings } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useOverlayLargeLogSettings = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentOverlayLargeLogSettings, updateOverlayLargeLogSettings, pendingOverlayLargeLogSettings } = useStore_OverlayLargeLogSettings();
-
- const getOverlayLargeLogSettings = () => {
- // pendingOverlayLargeLogSettings();
- asyncStdoutToPython("/get/data/overlay_large_log_settings");
- };
-
- const setOverlayLargeLogSettings = (overlay_large_log_settings) => {
- // pendingOverlayLargeLogSettings();
- asyncStdoutToPython("/set/data/overlay_large_log_settings", overlay_large_log_settings);
- };
-
- return {
- currentOverlayLargeLogSettings,
- getOverlayLargeLogSettings,
- updateOverlayLargeLogSettings,
- setOverlayLargeLogSettings,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/vr/useOverlayShowOnlyTranslatedMessages.js b/src-ui/logics/configs/vr/useOverlayShowOnlyTranslatedMessages.js
deleted file mode 100644
index 40e3fc87..00000000
--- a/src-ui/logics/configs/vr/useOverlayShowOnlyTranslatedMessages.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import { useStore_OverlayShowOnlyTranslatedMessages } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useOverlayShowOnlyTranslatedMessages = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentOverlayShowOnlyTranslatedMessages, updateOverlayShowOnlyTranslatedMessages, pendingOverlayShowOnlyTranslatedMessages } = useStore_OverlayShowOnlyTranslatedMessages();
-
- const getOverlayShowOnlyTranslatedMessages = () => {
- pendingOverlayShowOnlyTranslatedMessages();
- asyncStdoutToPython("/get/data/overlay_show_only_translated_messages");
- };
-
- const toggleOverlayShowOnlyTranslatedMessages = () => {
- pendingOverlayShowOnlyTranslatedMessages();
- if (currentOverlayShowOnlyTranslatedMessages.data) {
- asyncStdoutToPython("/set/disable/overlay_show_only_translated_messages");
- } else {
- asyncStdoutToPython("/set/enable/overlay_show_only_translated_messages");
- }
- };
-
- return {
- currentOverlayShowOnlyTranslatedMessages,
- getOverlayShowOnlyTranslatedMessages,
- updateOverlayShowOnlyTranslatedMessages,
- toggleOverlayShowOnlyTranslatedMessages,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/vr/useOverlaySmallLogSettings.js b/src-ui/logics/configs/vr/useOverlaySmallLogSettings.js
deleted file mode 100644
index 7979f5c1..00000000
--- a/src-ui/logics/configs/vr/useOverlaySmallLogSettings.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useStore_OverlaySmallLogSettings } from "@store";
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useOverlaySmallLogSettings = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
- const { currentOverlaySmallLogSettings, updateOverlaySmallLogSettings, pendingOverlaySmallLogSettings } = useStore_OverlaySmallLogSettings();
-
- const getOverlaySmallLogSettings = () => {
- // pendingOverlaySmallLogSettings();
- asyncStdoutToPython("/get/data/overlay_small_log_settings");
- };
-
- const setOverlaySmallLogSettings = (overlay_small_log_settings) => {
- // pendingOverlaySmallLogSettings();
- asyncStdoutToPython("/set/data/overlay_small_log_settings", overlay_small_log_settings);
- };
-
- return {
- currentOverlaySmallLogSettings,
- getOverlaySmallLogSettings,
- updateOverlaySmallLogSettings,
- setOverlaySmallLogSettings,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/vr/useSendTextToOverlay.js b/src-ui/logics/configs/vr/useSendTextToOverlay.js
deleted file mode 100644
index f109e3ad..00000000
--- a/src-ui/logics/configs/vr/useSendTextToOverlay.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import { useStdoutToPython } from "@useStdoutToPython";
-
-export const useSendTextToOverlay = () => {
- const { asyncStdoutToPython } = useStdoutToPython();
-
- const sendTextToOverlay = (text) => {
- asyncStdoutToPython("/run/send_text_overlay", text);
- };
-
- return {
- sendTextToOverlay,
- };
-};
\ No newline at end of file
diff --git a/src-ui/logics/configs/vr/useVr.js b/src-ui/logics/configs/vr/useVr.js
new file mode 100644
index 00000000..2f5dd9eb
--- /dev/null
+++ b/src-ui/logics/configs/vr/useVr.js
@@ -0,0 +1,120 @@
+import {
+ useStore_IsEnabledOverlaySmallLog,
+ useStore_IsEnabledOverlayLargeLog,
+ useStore_OverlaySmallLogSettings,
+ useStore_OverlayLargeLogSettings,
+ useStore_OverlayShowOnlyTranslatedMessages,
+} from "@store";
+import { useStdoutToPython } from "@useStdoutToPython";
+
+export const useVr = () => {
+ const { asyncStdoutToPython } = useStdoutToPython();
+
+ const { currentIsEnabledOverlaySmallLog, updateIsEnabledOverlaySmallLog, pendingIsEnabledOverlaySmallLog } = useStore_IsEnabledOverlaySmallLog();
+ const { currentIsEnabledOverlayLargeLog, updateIsEnabledOverlayLargeLog, pendingIsEnabledOverlayLargeLog } = useStore_IsEnabledOverlayLargeLog();
+ const { currentOverlaySmallLogSettings, updateOverlaySmallLogSettings, pendingOverlaySmallLogSettings } = useStore_OverlaySmallLogSettings();
+ const { currentOverlayLargeLogSettings, updateOverlayLargeLogSettings, pendingOverlayLargeLogSettings } = useStore_OverlayLargeLogSettings();
+ const { currentOverlayShowOnlyTranslatedMessages, updateOverlayShowOnlyTranslatedMessages, pendingOverlayShowOnlyTranslatedMessages } = useStore_OverlayShowOnlyTranslatedMessages();
+
+
+ const getIsEnabledOverlaySmallLog = () => {
+ pendingIsEnabledOverlaySmallLog();
+ asyncStdoutToPython("/get/data/overlay_small_log");
+ };
+
+ const toggleIsEnabledOverlaySmallLog = () => {
+ pendingIsEnabledOverlaySmallLog();
+ if (currentIsEnabledOverlaySmallLog.data) {
+ asyncStdoutToPython("/set/disable/overlay_small_log");
+ } else {
+ asyncStdoutToPython("/set/enable/overlay_small_log");
+ }
+ };
+
+
+ const getIsEnabledOverlayLargeLog = () => {
+ pendingIsEnabledOverlayLargeLog();
+ asyncStdoutToPython("/get/data/overlay_large_log");
+ };
+
+ const toggleIsEnabledOverlayLargeLog = () => {
+ pendingIsEnabledOverlayLargeLog();
+ if (currentIsEnabledOverlayLargeLog.data) {
+ asyncStdoutToPython("/set/disable/overlay_large_log");
+ } else {
+ asyncStdoutToPython("/set/enable/overlay_large_log");
+ }
+ };
+
+
+ const getOverlaySmallLogSettings = () => {
+ // pendingOverlaySmallLogSettings();
+ asyncStdoutToPython("/get/data/overlay_small_log_settings");
+ };
+
+ const setOverlaySmallLogSettings = (overlay_small_log_settings) => {
+ // pendingOverlaySmallLogSettings();
+ asyncStdoutToPython("/set/data/overlay_small_log_settings", overlay_small_log_settings);
+ };
+
+
+ const getOverlayLargeLogSettings = () => {
+ // pendingOverlayLargeLogSettings();
+ asyncStdoutToPython("/get/data/overlay_large_log_settings");
+ };
+
+ const setOverlayLargeLogSettings = (overlay_large_log_settings) => {
+ // pendingOverlayLargeLogSettings();
+ asyncStdoutToPython("/set/data/overlay_large_log_settings", overlay_large_log_settings);
+ };
+
+
+ const getOverlayShowOnlyTranslatedMessages = () => {
+ pendingOverlayShowOnlyTranslatedMessages();
+ asyncStdoutToPython("/get/data/overlay_show_only_translated_messages");
+ };
+
+ const toggleOverlayShowOnlyTranslatedMessages = () => {
+ pendingOverlayShowOnlyTranslatedMessages();
+ if (currentOverlayShowOnlyTranslatedMessages.data) {
+ asyncStdoutToPython("/set/disable/overlay_show_only_translated_messages");
+ } else {
+ asyncStdoutToPython("/set/enable/overlay_show_only_translated_messages");
+ }
+ };
+
+
+ const sendTextToOverlay = (text) => {
+ asyncStdoutToPython("/run/send_text_overlay", text);
+ };
+
+
+ return {
+ currentIsEnabledOverlaySmallLog,
+ getIsEnabledOverlaySmallLog,
+ updateIsEnabledOverlaySmallLog,
+ toggleIsEnabledOverlaySmallLog,
+
+ currentIsEnabledOverlayLargeLog,
+ getIsEnabledOverlayLargeLog,
+ updateIsEnabledOverlayLargeLog,
+ toggleIsEnabledOverlayLargeLog,
+
+ currentOverlaySmallLogSettings,
+ getOverlaySmallLogSettings,
+ updateOverlaySmallLogSettings,
+ setOverlaySmallLogSettings,
+
+ currentOverlayLargeLogSettings,
+ getOverlayLargeLogSettings,
+ updateOverlayLargeLogSettings,
+ setOverlayLargeLogSettings,
+
+ currentOverlayShowOnlyTranslatedMessages,
+ getOverlayShowOnlyTranslatedMessages,
+ updateOverlayShowOnlyTranslatedMessages,
+ toggleOverlayShowOnlyTranslatedMessages,
+
+ sendTextToOverlay,
+ };
+};
\ No newline at end of file
diff --git a/src-ui/logics/useReceiveRoutes.js b/src-ui/logics/useReceiveRoutes.js
index a4a1ad87..a956ba6e 100644
--- a/src-ui/logics/useReceiveRoutes.js
+++ b/src-ui/logics/useReceiveRoutes.js
@@ -137,140 +137,141 @@ export const ROUTE_META_LIST = [
// Appearance
- { endpoint: "/get/data/ui_language", ns: configs, hook_name: "useUiLanguage", method_name: "updateUiLanguage" },
- { endpoint: "/set/data/ui_language", ns: configs, hook_name: "useUiLanguage", method_name: "updateUiLanguage" },
+ { endpoint: "/get/data/ui_language", ns: configs, hook_name: "useAppearance", method_name: "updateUiLanguage" },
+ { endpoint: "/set/data/ui_language", ns: configs, hook_name: "useAppearance", method_name: "updateUiLanguage" },
- { endpoint: "/get/data/ui_scaling", ns: configs, hook_name: "useUiScaling", method_name: "updateUiScaling" },
- { endpoint: "/set/data/ui_scaling", ns: configs, hook_name: "useUiScaling", method_name: "updateUiScaling" },
+ { endpoint: "/get/data/ui_scaling", ns: configs, hook_name: "useAppearance", method_name: "updateUiScaling" },
+ { endpoint: "/set/data/ui_scaling", ns: configs, hook_name: "useAppearance", method_name: "updateUiScaling" },
- { endpoint: "/get/data/textbox_ui_scaling", ns: configs, hook_name: "useMessageLogUiScaling", method_name: "updateMessageLogUiScaling" },
- { endpoint: "/set/data/textbox_ui_scaling", ns: configs, hook_name: "useMessageLogUiScaling", method_name: "updateMessageLogUiScaling" },
+ { endpoint: "/get/data/textbox_ui_scaling", ns: configs, hook_name: "useAppearance", method_name: "updateMessageLogUiScaling" },
+ { endpoint: "/set/data/textbox_ui_scaling", ns: configs, hook_name: "useAppearance", method_name: "updateMessageLogUiScaling" },
- { endpoint: "/get/data/send_message_button_type", ns: configs, hook_name: "useSendMessageButtonType", method_name: "updateSendMessageButtonType" },
- { endpoint: "/set/data/send_message_button_type", ns: configs, hook_name: "useSendMessageButtonType", method_name: "updateSendMessageButtonType" },
+ { endpoint: "/get/data/send_message_button_type", ns: configs, hook_name: "useAppearance", method_name: "updateSendMessageButtonType" },
+ { endpoint: "/set/data/send_message_button_type", ns: configs, hook_name: "useAppearance", method_name: "updateSendMessageButtonType" },
- { endpoint: "/get/data/show_resend_button", ns: configs, hook_name: "useShowResendButton", method_name: "updateShowResendButton" },
- { endpoint: "/set/enable/show_resend_button", ns: configs, hook_name: "useShowResendButton", method_name: "updateShowResendButton" },
- { endpoint: "/set/disable/show_resend_button", ns: configs, hook_name: "useShowResendButton", method_name: "updateShowResendButton" },
+ { endpoint: "/get/data/show_resend_button", ns: configs, hook_name: "useAppearance", method_name: "updateShowResendButton" },
+ { endpoint: "/set/enable/show_resend_button", ns: configs, hook_name: "useAppearance", method_name: "updateShowResendButton" },
+ { endpoint: "/set/disable/show_resend_button", ns: configs, hook_name: "useAppearance", method_name: "updateShowResendButton" },
- { endpoint: "/get/data/font_family", ns: configs, hook_name: "useSelectedFontFamily", method_name: "updateSelectedFontFamily" },
- { endpoint: "/set/data/font_family", ns: configs, hook_name: "useSelectedFontFamily", method_name: "updateSelectedFontFamily" },
+ { endpoint: "/get/data/font_family", ns: configs, hook_name: "useAppearance", method_name: "updateSelectedFontFamily" },
+ { endpoint: "/set/data/font_family", ns: configs, hook_name: "useAppearance", method_name: "updateSelectedFontFamily" },
- { endpoint: "/get/data/transparency", ns: configs, hook_name: "useTransparency", method_name: "updateTransparency" },
- { endpoint: "/set/data/transparency", ns: configs, hook_name: "useTransparency", method_name: "updateTransparency" },
+ { endpoint: "/get/data/transparency", ns: configs, hook_name: "useAppearance", method_name: "updateTransparency" },
+ { endpoint: "/set/data/transparency", ns: configs, hook_name: "useAppearance", method_name: "updateTransparency" },
// Translation
- { endpoint: "/get/data/deepl_auth_key", ns: configs, hook_name: "useDeepLAuthKey", method_name: "updateDeepLAuthKey" },
- { endpoint: "/set/data/deepl_auth_key", ns: configs, hook_name: "useDeepLAuthKey", method_name: "savedDeepLAuthKey" },
- { endpoint: "/delete/data/deepl_auth_key", ns: configs, hook_name: "useDeepLAuthKey", method_name: "deletedDeepLAuthKey" },
+ { endpoint: "/get/data/deepl_auth_key", ns: configs, hook_name: "useTranslation", method_name: "updateDeepLAuthKey" },
+ { endpoint: "/set/data/deepl_auth_key", ns: configs, hook_name: "useTranslation", method_name: "savedDeepLAuthKey" },
+ { endpoint: "/delete/data/deepl_auth_key", ns: configs, hook_name: "useTranslation", method_name: "deletedDeepLAuthKey" },
// Translation (AI Models)
- { endpoint: "/get/data/ctranslate2_weight_type", ns: configs, hook_name: "useSelectedCTranslate2WeightType", method_name: "updateSelectedCTranslate2WeightType" },
- { endpoint: "/set/data/ctranslate2_weight_type", ns: configs, hook_name: "useSelectedCTranslate2WeightType", method_name: "updateSelectedCTranslate2WeightType" },
+ { endpoint: "/get/data/ctranslate2_weight_type", ns: configs, hook_name: "useTranslation", method_name: "updateSelectedCTranslate2WeightType" },
+ { endpoint: "/set/data/ctranslate2_weight_type", ns: configs, hook_name: "useTranslation", method_name: "updateSelectedCTranslate2WeightType" },
- { endpoint: "/get/data/selectable_ctranslate2_weight_type_dict", ns: configs, hook_name: "useCTranslate2WeightTypeStatus", method_name: "updateDownloadedCTranslate2WeightTypeStatus" },
+ { endpoint: "/get/data/selectable_ctranslate2_weight_type_dict", ns: configs, hook_name: "useTranslation", method_name: "updateDownloadedCTranslate2WeightTypeStatus" },
- { endpoint: "/get/data/translation_compute_device_list", ns: configs, hook_name: "useSelectableCTranslate2ComputeDeviceList", method_name: "updateSelectableCTranslate2ComputeDeviceList_FromBackend" },
-
- { endpoint: "/get/data/selected_translation_compute_device", ns: configs, hook_name: "useSelectedCTranslate2ComputeDevice", method_name: "updateSelectedCTranslate2ComputeDevice" },
- { endpoint: "/set/data/selected_translation_compute_device", ns: configs, hook_name: "useSelectedCTranslate2ComputeDevice", method_name: "updateSelectedCTranslate2ComputeDevice" },
-
- { endpoint: "/run/downloaded_ctranslate2_weight", ns: configs, hook_name: "useCTranslate2WeightTypeStatus", method_name: "downloadedCTranslate2WeightType" },
+ { endpoint: "/run/downloaded_ctranslate2_weight", ns: configs, hook_name: "useTranslation", method_name: "downloadedCTranslate2WeightType" },
{ endpoint: "/run/download_ctranslate2_weight", ns: null, hook_name: null, method_name: null },
- { endpoint: "/run/download_progress_ctranslate2_weight", ns: configs, hook_name: "useCTranslate2WeightTypeStatus", method_name: "updateDownloadProgressCTranslate2WeightTypeStatus" },
+ { endpoint: "/run/download_progress_ctranslate2_weight", ns: configs, hook_name: "useTranslation", method_name: "updateDownloadProgressCTranslate2WeightTypeStatus" },
+
+ { endpoint: "/get/data/translation_compute_device_list", ns: configs, hook_name: "useTranslation", method_name: "updateSelectableCTranslate2ComputeDeviceList_FromBackend" },
+
+ { endpoint: "/get/data/selected_translation_compute_device", ns: configs, hook_name: "useTranslation", method_name: "updateSelectedCTranslate2ComputeDevice" },
+ { endpoint: "/set/data/selected_translation_compute_device", ns: configs, hook_name: "useTranslation", method_name: "updateSelectedCTranslate2ComputeDevice" },
+
// Transcription
// Transcription (Mic)
- { endpoint: "/get/data/mic_record_timeout", ns: configs, hook_name: "useMicRecordTimeout", method_name: "updateMicRecordTimeout" },
- { endpoint: "/set/data/mic_record_timeout", ns: configs, hook_name: "useMicRecordTimeout", method_name: "updateMicRecordTimeout" },
+ { endpoint: "/get/data/mic_record_timeout", ns: configs, hook_name: "useTranscription", method_name: "updateMicRecordTimeout" },
+ { endpoint: "/set/data/mic_record_timeout", ns: configs, hook_name: "useTranscription", method_name: "updateMicRecordTimeout" },
- { endpoint: "/get/data/mic_phrase_timeout", ns: configs, hook_name: "useMicPhraseTimeout", method_name: "updateMicPhraseTimeout" },
- { endpoint: "/set/data/mic_phrase_timeout", ns: configs, hook_name: "useMicPhraseTimeout", method_name: "updateMicPhraseTimeout" },
+ { endpoint: "/get/data/mic_phrase_timeout", ns: configs, hook_name: "useTranscription", method_name: "updateMicPhraseTimeout" },
+ { endpoint: "/set/data/mic_phrase_timeout", ns: configs, hook_name: "useTranscription", method_name: "updateMicPhraseTimeout" },
- { endpoint: "/get/data/mic_max_phrases", ns: configs, hook_name: "useMicMaxWords", method_name: "updateMicMaxWords" },
- { endpoint: "/set/data/mic_max_phrases", ns: configs, hook_name: "useMicMaxWords", method_name: "updateMicMaxWords" },
+ { endpoint: "/get/data/mic_max_phrases", ns: configs, hook_name: "useTranscription", method_name: "updateMicMaxWords" },
+ { endpoint: "/set/data/mic_max_phrases", ns: configs, hook_name: "useTranscription", method_name: "updateMicMaxWords" },
- { endpoint: "/get/data/mic_word_filter", ns: configs, hook_name: "useMicWordFilterList", method_name: "updateMicWordFilterList_FromBackend" },
- { endpoint: "/set/data/mic_word_filter", ns: configs, hook_name: "useMicWordFilterList", method_name: "updateMicWordFilterList_FromBackend" },
+ { endpoint: "/get/data/mic_word_filter", ns: configs, hook_name: "useTranscription", method_name: "updateMicWordFilterList_FromBackend" },
+ { endpoint: "/set/data/mic_word_filter", ns: configs, hook_name: "useTranscription", method_name: "updateMicWordFilterList_FromBackend" },
// Transcription (Speaker)
- { endpoint: "/get/data/speaker_record_timeout", ns: configs, hook_name: "useSpeakerRecordTimeout", method_name: "updateSpeakerRecordTimeout" },
- { endpoint: "/set/data/speaker_record_timeout", ns: configs, hook_name: "useSpeakerRecordTimeout", method_name: "updateSpeakerRecordTimeout" },
+ { endpoint: "/get/data/speaker_record_timeout", ns: configs, hook_name: "useTranscription", method_name: "updateSpeakerRecordTimeout" },
+ { endpoint: "/set/data/speaker_record_timeout", ns: configs, hook_name: "useTranscription", method_name: "updateSpeakerRecordTimeout" },
- { endpoint: "/get/data/speaker_phrase_timeout", ns: configs, hook_name: "useSpeakerPhraseTimeout", method_name: "updateSpeakerPhraseTimeout" },
- { endpoint: "/set/data/speaker_phrase_timeout", ns: configs, hook_name: "useSpeakerPhraseTimeout", method_name: "updateSpeakerPhraseTimeout" },
+ { endpoint: "/get/data/speaker_phrase_timeout", ns: configs, hook_name: "useTranscription", method_name: "updateSpeakerPhraseTimeout" },
+ { endpoint: "/set/data/speaker_phrase_timeout", ns: configs, hook_name: "useTranscription", method_name: "updateSpeakerPhraseTimeout" },
- { endpoint: "/get/data/speaker_max_phrases", ns: configs, hook_name: "useSpeakerMaxWords", method_name: "updateSpeakerMaxWords" },
- { endpoint: "/set/data/speaker_max_phrases", ns: configs, hook_name: "useSpeakerMaxWords", method_name: "updateSpeakerMaxWords" },
+ { endpoint: "/get/data/speaker_max_phrases", ns: configs, hook_name: "useTranscription", method_name: "updateSpeakerMaxWords" },
+ { endpoint: "/set/data/speaker_max_phrases", ns: configs, hook_name: "useTranscription", method_name: "updateSpeakerMaxWords" },
// Transcription (AI Models)
- { endpoint: "/get/data/selected_transcription_engine", ns: configs, hook_name: "useSelectedTranscriptionEngine", method_name: "updateSelectedTranscriptionEngine" },
- { endpoint: "/set/data/selected_transcription_engine", ns: configs, hook_name: "useSelectedTranscriptionEngine", method_name: "updateSelectedTranscriptionEngine" },
+ { endpoint: "/get/data/selected_transcription_engine", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedTranscriptionEngine" },
+ { endpoint: "/set/data/selected_transcription_engine", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedTranscriptionEngine" },
- { endpoint: "/get/data/whisper_weight_type", ns: configs, hook_name: "useSelectedWhisperWeightType", method_name: "updateSelectedWhisperWeightType" },
- { endpoint: "/set/data/whisper_weight_type", ns: configs, hook_name: "useSelectedWhisperWeightType", method_name: "updateSelectedWhisperWeightType" },
+ { endpoint: "/get/data/whisper_weight_type", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedWhisperWeightType" },
+ { endpoint: "/set/data/whisper_weight_type", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedWhisperWeightType" },
- { endpoint: "/get/data/selectable_whisper_weight_type_dict", ns: configs, hook_name: "useWhisperWeightTypeStatus", method_name: "updateDownloadedWhisperWeightTypeStatus" },
+ { endpoint: "/get/data/selectable_whisper_weight_type_dict", ns: configs, hook_name: "useTranscription", method_name: "updateDownloadedWhisperWeightTypeStatus" },
- { endpoint: "/run/downloaded_whisper_weight", ns: configs, hook_name: "useWhisperWeightTypeStatus", method_name: "downloadedWhisperWeightType" },
+ { endpoint: "/run/downloaded_whisper_weight", ns: configs, hook_name: "useTranscription", method_name: "downloadedWhisperWeightType" },
{ endpoint: "/run/download_whisper_weight", ns: null, hook_name: null, method_name: null },
- { endpoint: "/run/download_progress_whisper_weight", ns: configs, hook_name: "useWhisperWeightTypeStatus", method_name: "updateDownloadProgressWhisperWeightTypeStatus" },
+ { endpoint: "/run/download_progress_whisper_weight", ns: configs, hook_name: "useTranscription", method_name: "updateDownloadProgressWhisperWeightTypeStatus" },
- { endpoint: "/get/data/transcription_compute_device_list", ns: configs, hook_name: "useSelectableWhisperComputeDeviceList", method_name: "updateSelectableWhisperComputeDeviceList_FromBackend" },
- { endpoint: "/get/data/selected_transcription_compute_device", ns: configs, hook_name: "useSelectedWhisperComputeDevice", method_name: "updateSelectedWhisperComputeDevice" },
- { endpoint: "/set/data/selected_transcription_compute_device", ns: configs, hook_name: "useSelectedWhisperComputeDevice", method_name: "updateSelectedWhisperComputeDevice" },
+ { endpoint: "/get/data/transcription_compute_device_list", ns: configs, hook_name: "useTranscription", method_name: "updateSelectableWhisperComputeDeviceList_FromBackend" },
+ { endpoint: "/get/data/selected_transcription_compute_device", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedWhisperComputeDevice" },
+ { endpoint: "/set/data/selected_transcription_compute_device", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedWhisperComputeDevice" },
// VR
- { endpoint: "/get/data/overlay_small_log", ns: configs, hook_name: "useIsEnabledOverlaySmallLog", method_name: "updateIsEnabledOverlaySmallLog" },
- { endpoint: "/set/enable/overlay_small_log", ns: configs, hook_name: "useIsEnabledOverlaySmallLog", method_name: "updateIsEnabledOverlaySmallLog" },
- { endpoint: "/set/disable/overlay_small_log", ns: configs, hook_name: "useIsEnabledOverlaySmallLog", method_name: "updateIsEnabledOverlaySmallLog" },
+ { endpoint: "/get/data/overlay_small_log", ns: configs, hook_name: "useVr", method_name: "updateIsEnabledOverlaySmallLog" },
+ { endpoint: "/set/enable/overlay_small_log", ns: configs, hook_name: "useVr", method_name: "updateIsEnabledOverlaySmallLog" },
+ { endpoint: "/set/disable/overlay_small_log", ns: configs, hook_name: "useVr", method_name: "updateIsEnabledOverlaySmallLog" },
- { endpoint: "/get/data/overlay_small_log_settings", ns: configs, hook_name: "useOverlaySmallLogSettings", method_name: "updateOverlaySmallLogSettings" },
- { endpoint: "/set/data/overlay_small_log_settings", ns: configs, hook_name: "useOverlaySmallLogSettings", method_name: "updateOverlaySmallLogSettings" },
+ { endpoint: "/get/data/overlay_small_log_settings", ns: configs, hook_name: "useVr", method_name: "updateOverlaySmallLogSettings" },
+ { endpoint: "/set/data/overlay_small_log_settings", ns: configs, hook_name: "useVr", method_name: "updateOverlaySmallLogSettings" },
- { endpoint: "/get/data/overlay_large_log", ns: configs, hook_name: "useIsEnabledOverlayLargeLog", method_name: "updateIsEnabledOverlayLargeLog" },
- { endpoint: "/set/enable/overlay_large_log", ns: configs, hook_name: "useIsEnabledOverlayLargeLog", method_name: "updateIsEnabledOverlayLargeLog" },
- { endpoint: "/set/disable/overlay_large_log", ns: configs, hook_name: "useIsEnabledOverlayLargeLog", method_name: "updateIsEnabledOverlayLargeLog" },
+ { endpoint: "/get/data/overlay_large_log", ns: configs, hook_name: "useVr", method_name: "updateIsEnabledOverlayLargeLog" },
+ { endpoint: "/set/enable/overlay_large_log", ns: configs, hook_name: "useVr", method_name: "updateIsEnabledOverlayLargeLog" },
+ { endpoint: "/set/disable/overlay_large_log", ns: configs, hook_name: "useVr", method_name: "updateIsEnabledOverlayLargeLog" },
- { endpoint: "/get/data/overlay_large_log_settings", ns: configs, hook_name: "useOverlayLargeLogSettings", method_name: "updateOverlayLargeLogSettings" },
- { endpoint: "/set/data/overlay_large_log_settings", ns: configs, hook_name: "useOverlayLargeLogSettings", method_name: "updateOverlayLargeLogSettings" },
+ { endpoint: "/get/data/overlay_large_log_settings", ns: configs, hook_name: "useVr", method_name: "updateOverlayLargeLogSettings" },
+ { endpoint: "/set/data/overlay_large_log_settings", ns: configs, hook_name: "useVr", method_name: "updateOverlayLargeLogSettings" },
- { endpoint: "/get/data/overlay_show_only_translated_messages", ns: configs, hook_name: "useOverlayShowOnlyTranslatedMessages", method_name: "updateOverlayShowOnlyTranslatedMessages" },
- { endpoint: "/set/enable/overlay_show_only_translated_messages", ns: configs, hook_name: "useOverlayShowOnlyTranslatedMessages", method_name: "updateOverlayShowOnlyTranslatedMessages" },
- { endpoint: "/set/disable/overlay_show_only_translated_messages", ns: configs, hook_name: "useOverlayShowOnlyTranslatedMessages", method_name: "updateOverlayShowOnlyTranslatedMessages" },
+ { endpoint: "/get/data/overlay_show_only_translated_messages", ns: configs, hook_name: "useVr", method_name: "updateOverlayShowOnlyTranslatedMessages" },
+ { endpoint: "/set/enable/overlay_show_only_translated_messages", ns: configs, hook_name: "useVr", method_name: "updateOverlayShowOnlyTranslatedMessages" },
+ { endpoint: "/set/disable/overlay_show_only_translated_messages", ns: configs, hook_name: "useVr", method_name: "updateOverlayShowOnlyTranslatedMessages" },
{ endpoint: "/run/send_text_overlay", ns: null, hook_name: null, method_name: null },
// Others
- { endpoint: "/get/data/auto_clear_message_box", ns: configs, hook_name: "useEnableAutoClearMessageInputBox", method_name: "updateEnableAutoClearMessageInputBox" },
- { endpoint: "/set/enable/auto_clear_message_box", ns: configs, hook_name: "useEnableAutoClearMessageInputBox", method_name: "updateEnableAutoClearMessageInputBox" },
- { endpoint: "/set/disable/auto_clear_message_box", ns: configs, hook_name: "useEnableAutoClearMessageInputBox", method_name: "updateEnableAutoClearMessageInputBox" },
+ { endpoint: "/get/data/auto_clear_message_box", ns: configs, hook_name: "useOthers", method_name: "updateEnableAutoClearMessageInputBox" },
+ { endpoint: "/set/enable/auto_clear_message_box", ns: configs, hook_name: "useOthers", method_name: "updateEnableAutoClearMessageInputBox" },
+ { endpoint: "/set/disable/auto_clear_message_box", ns: configs, hook_name: "useOthers", method_name: "updateEnableAutoClearMessageInputBox" },
- { endpoint: "/get/data/send_only_translated_messages", ns: configs, hook_name: "useEnableSendOnlyTranslatedMessages", method_name: "updateEnableSendOnlyTranslatedMessages" },
- { endpoint: "/set/enable/send_only_translated_messages", ns: configs, hook_name: "useEnableSendOnlyTranslatedMessages", method_name: "updateEnableSendOnlyTranslatedMessages" },
- { endpoint: "/set/disable/send_only_translated_messages", ns: configs, hook_name: "useEnableSendOnlyTranslatedMessages", method_name: "updateEnableSendOnlyTranslatedMessages" },
+ { endpoint: "/get/data/send_only_translated_messages", ns: configs, hook_name: "useOthers", method_name: "updateEnableSendOnlyTranslatedMessages" },
+ { endpoint: "/set/enable/send_only_translated_messages", ns: configs, hook_name: "useOthers", method_name: "updateEnableSendOnlyTranslatedMessages" },
+ { endpoint: "/set/disable/send_only_translated_messages", ns: configs, hook_name: "useOthers", method_name: "updateEnableSendOnlyTranslatedMessages" },
- { endpoint: "/get/data/logger_feature", ns: configs, hook_name: "useEnableAutoExportMessageLogs", method_name: "updateEnableAutoExportMessageLogs" },
- { endpoint: "/set/enable/logger_feature", ns: configs, hook_name: "useEnableAutoExportMessageLogs", method_name: "updateEnableAutoExportMessageLogs" },
- { endpoint: "/set/disable/logger_feature", ns: configs, hook_name: "useEnableAutoExportMessageLogs", method_name: "updateEnableAutoExportMessageLogs" },
+ { endpoint: "/get/data/logger_feature", ns: configs, hook_name: "useOthers", method_name: "updateEnableAutoExportMessageLogs" },
+ { endpoint: "/set/enable/logger_feature", ns: configs, hook_name: "useOthers", method_name: "updateEnableAutoExportMessageLogs" },
+ { endpoint: "/set/disable/logger_feature", ns: configs, hook_name: "useOthers", method_name: "updateEnableAutoExportMessageLogs" },
- { endpoint: "/get/data/vrc_mic_mute_sync", ns: configs, hook_name: "useEnableVrcMicMuteSync", method_name: "updateEnableVrcMicMuteSync_FromBackend" },
- { endpoint: "/set/enable/vrc_mic_mute_sync", ns: configs, hook_name: "useEnableVrcMicMuteSync", method_name: "updateEnableVrcMicMuteSync_FromBackend" },
- { endpoint: "/set/disable/vrc_mic_mute_sync", ns: configs, hook_name: "useEnableVrcMicMuteSync", method_name: "updateEnableVrcMicMuteSync_FromBackend" },
+ { endpoint: "/get/data/vrc_mic_mute_sync", ns: configs, hook_name: "useOthers", method_name: "updateEnableVrcMicMuteSync_FromBackend" },
+ { endpoint: "/set/enable/vrc_mic_mute_sync", ns: configs, hook_name: "useOthers", method_name: "updateEnableVrcMicMuteSync_FromBackend" },
+ { endpoint: "/set/disable/vrc_mic_mute_sync", ns: configs, hook_name: "useOthers", method_name: "updateEnableVrcMicMuteSync_FromBackend" },
- { endpoint: "/get/data/send_message_to_vrc", ns: configs, hook_name: "useEnableSendMessageToVrc", method_name: "updateEnableSendMessageToVrc" },
- { endpoint: "/set/enable/send_message_to_vrc", ns: configs, hook_name: "useEnableSendMessageToVrc", method_name: "updateEnableSendMessageToVrc" },
- { endpoint: "/set/disable/send_message_to_vrc", ns: configs, hook_name: "useEnableSendMessageToVrc", method_name: "updateEnableSendMessageToVrc" },
+ { endpoint: "/get/data/send_message_to_vrc", ns: configs, hook_name: "useOthers", method_name: "updateEnableSendMessageToVrc" },
+ { endpoint: "/set/enable/send_message_to_vrc", ns: configs, hook_name: "useOthers", method_name: "updateEnableSendMessageToVrc" },
+ { endpoint: "/set/disable/send_message_to_vrc", ns: configs, hook_name: "useOthers", method_name: "updateEnableSendMessageToVrc" },
- { endpoint: "/get/data/send_received_message_to_vrc", ns: configs, hook_name: "useEnableSendReceivedMessageToVrc", method_name: "updateEnableSendReceivedMessageToVrc" },
- { endpoint: "/set/enable/send_received_message_to_vrc", ns: configs, hook_name: "useEnableSendReceivedMessageToVrc", method_name: "updateEnableSendReceivedMessageToVrc" },
- { endpoint: "/set/disable/send_received_message_to_vrc", ns: configs, hook_name: "useEnableSendReceivedMessageToVrc", method_name: "updateEnableSendReceivedMessageToVrc" },
+ { endpoint: "/get/data/send_received_message_to_vrc", ns: configs, hook_name: "useOthers", method_name: "updateEnableSendReceivedMessageToVrc" },
+ { endpoint: "/set/enable/send_received_message_to_vrc", ns: configs, hook_name: "useOthers", method_name: "updateEnableSendReceivedMessageToVrc" },
+ { endpoint: "/set/disable/send_received_message_to_vrc", ns: configs, hook_name: "useOthers", method_name: "updateEnableSendReceivedMessageToVrc" },
- { endpoint: "/get/data/notification_vrc_sfx", ns: configs, hook_name: "useEnableNotificationVrcSfx", method_name: "updateEnableNotificationVrcSfx" },
- { endpoint: "/set/enable/notification_vrc_sfx", ns: configs, hook_name: "useEnableNotificationVrcSfx", method_name: "updateEnableNotificationVrcSfx" },
- { endpoint: "/set/disable/notification_vrc_sfx", ns: configs, hook_name: "useEnableNotificationVrcSfx", method_name: "updateEnableNotificationVrcSfx" },
+ { endpoint: "/get/data/notification_vrc_sfx", ns: configs, hook_name: "useOthers", method_name: "updateEnableNotificationVrcSfx" },
+ { endpoint: "/set/enable/notification_vrc_sfx", ns: configs, hook_name: "useOthers", method_name: "updateEnableNotificationVrcSfx" },
+ { endpoint: "/set/disable/notification_vrc_sfx", ns: configs, hook_name: "useOthers", method_name: "updateEnableNotificationVrcSfx" },
// Hotkeys
{ endpoint: "/get/data/hotkeys", ns: configs, hook_name: "useHotkeys", method_name: "updateHotkeys" },
@@ -281,21 +282,21 @@ export const ROUTE_META_LIST = [
{ endpoint: "/set/data/plugins_status", ns: configs, hook_name: "usePlugins", method_name: "updateSavedPluginsStatus" },
// Advanced Settings
- { endpoint: "/get/data/osc_ip_address", ns: configs, hook_name: "useOscIpAddress", method_name: "updateOscIpAddress" },
- { endpoint: "/set/data/osc_ip_address", ns: configs, hook_name: "useOscIpAddress", method_name: "updateOscIpAddress" },
+ { endpoint: "/get/data/osc_ip_address", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateOscIpAddress" },
+ { endpoint: "/set/data/osc_ip_address", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateOscIpAddress" },
- { endpoint: "/get/data/osc_port", ns: configs, hook_name: "useOscPort", method_name: "updateOscPort" },
- { endpoint: "/set/data/osc_port", ns: configs, hook_name: "useOscPort", method_name: "updateOscPort" },
+ { endpoint: "/get/data/osc_port", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateOscPort" },
+ { endpoint: "/set/data/osc_port", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateOscPort" },
- { endpoint: "/get/data/websocket_server", ns: configs, hook_name: "useWebsocket", method_name: "updateEnableWebsocket" },
- { endpoint: "/set/enable/websocket_server", ns: configs, hook_name: "useWebsocket", method_name: "updateEnableWebsocket" },
- { endpoint: "/set/disable/websocket_server", ns: configs, hook_name: "useWebsocket", method_name: "updateEnableWebsocket" },
+ { endpoint: "/get/data/websocket_server", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateEnableWebsocket" },
+ { endpoint: "/set/enable/websocket_server", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateEnableWebsocket" },
+ { endpoint: "/set/disable/websocket_server", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateEnableWebsocket" },
- { endpoint: "/get/data/websocket_host", ns: configs, hook_name: "useWebsocket", method_name: "updateWebsocketHost" },
- { endpoint: "/set/data/websocket_host", ns: configs, hook_name: "useWebsocket", method_name: "updateWebsocketHost" },
+ { endpoint: "/get/data/websocket_host", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateWebsocketHost" },
+ { endpoint: "/set/data/websocket_host", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateWebsocketHost" },
- { endpoint: "/get/data/websocket_port", ns: configs, hook_name: "useWebsocket", method_name: "updateWebsocketPort" },
- { endpoint: "/set/data/websocket_port", ns: configs, hook_name: "useWebsocket", method_name: "updateWebsocketPort" },
+ { endpoint: "/get/data/websocket_port", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateWebsocketPort" },
+ { endpoint: "/set/data/websocket_port", ns: configs, hook_name: "useAdvancedSettings", method_name: "updateWebsocketPort" },
// Not Implemented Yet...
diff --git a/vite.config.js b/vite.config.js
index 32bd2c51..b678f171 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -57,6 +57,8 @@ export default defineConfig(async () => {
alias: {
"@root": path.resolve(__dirname),
+ "@useI18n": path.resolve(__dirname, "locales/useI18n.js"),
+
"@useReceiveRoutes": path.resolve(__dirname, "src-ui/logics/useReceiveRoutes.js"),
"@useStdoutToPython": path.resolve(__dirname, "src-ui/logics/useStdoutToPython.js"),