Merge branch 'ui' into for_webui
This commit is contained in:
commit
31d8b503d0
44 files changed
+157
-114
No files matched your search
+33
-27
@@ -25,30 +25,34 @@ export const App = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
import { useSoftwareVersion } from "@logics_configs/useSoftwareVersion";
|
import {
|
||||||
import { useEnableAutoMicSelect } from "@logics_configs/useEnableAutoMicSelect";
|
useSoftwareVersion,
|
||||||
import { useEnableAutoSpeakerSelect } from "@logics_configs/useEnableAutoSpeakerSelect";
|
useEnableAutoMicSelect,
|
||||||
import { useSelectedMicHost } from "@logics_configs/useSelectedMicHost";
|
useEnableAutoSpeakerSelect,
|
||||||
import { useSelectedMicDevice } from "@logics_configs/useSelectedMicDevice";
|
useSelectedMicHost,
|
||||||
import { useSelectedSpeakerDevice } from "@logics_configs/useSelectedSpeakerDevice";
|
useSelectedMicDevice,
|
||||||
import { useMicThreshold } from "@logics_configs/useMicThreshold";
|
useSelectedSpeakerDevice,
|
||||||
import { useSpeakerThreshold } from "@logics_configs/useSpeakerThreshold";
|
useMicThreshold,
|
||||||
import { useEnableAutoClearMessageBox } from "@logics_configs/useEnableAutoClearMessageBox";
|
useSpeakerThreshold,
|
||||||
import { useSendMessageButtonType } from "@logics_configs/useSendMessageButtonType";
|
useEnableAutoClearMessageBox,
|
||||||
import { useUiLanguage } from "@logics_configs/useUiLanguage";
|
useSendMessageButtonType,
|
||||||
import { useUiScaling } from "@logics_configs/useUiScaling";
|
useUiLanguage,
|
||||||
import { useMessageLogUiScaling } from "@logics_configs/useMessageLogUiScaling";
|
useUiScaling,
|
||||||
import { useSelectedFontFamily } from "@logics_configs/useSelectedFontFamily";
|
useMessageLogUiScaling,
|
||||||
import { useTransparency } from "@logics_configs/useTransparency";
|
useSelectedFontFamily,
|
||||||
|
useTransparency,
|
||||||
|
useMicHostList,
|
||||||
|
useMicDeviceList,
|
||||||
|
useSpeakerDeviceList,
|
||||||
|
} from "@logics_configs";
|
||||||
|
|
||||||
import { useIsMainPageCompactMode } from "@logics_main/useIsMainPageCompactMode";
|
import {
|
||||||
import { useLanguageSettings } from "@logics_main/useLanguageSettings";
|
useMainFunction,
|
||||||
import { useSelectableLanguageList } from "@logics_main/useSelectableLanguageList";
|
useIsMainPageCompactMode,
|
||||||
import { useMessageInputBoxRatio } from "@logics_main/useMessageInputBoxRatio";
|
useLanguageSettings,
|
||||||
|
useSelectableLanguageList,
|
||||||
import { useMicHostList } from "@logics_configs/useMicHostList";
|
useMessageInputBoxRatio,
|
||||||
import { useMicDeviceList } from "@logics_configs/useMicDeviceList";
|
} from "@logics_main";
|
||||||
import { useSpeakerDeviceList } from "@logics_configs/useSpeakerDeviceList";
|
|
||||||
|
|
||||||
const StartPythonFacadeComponent = () => {
|
const StartPythonFacadeComponent = () => {
|
||||||
const { asyncStartPython } = useStartPython();
|
const { asyncStartPython } = useStartPython();
|
||||||
@@ -90,7 +94,7 @@ const StartPythonFacadeComponent = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!hasRunRef.current) {
|
if (!hasRunRef.current) {
|
||||||
asyncStartPython().then((result) => {
|
asyncStartPython().then(() => {
|
||||||
startFeedingToWatchDog();
|
startFeedingToWatchDog();
|
||||||
|
|
||||||
getUiLanguage();
|
getUiLanguage();
|
||||||
@@ -152,9 +156,11 @@ const UiLanguageController = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
import { useStore_MainFunctionsStateMemory } from "@store";
|
import { useStore_MainFunctionsStateMemory } from "@store";
|
||||||
import { useVolume } from "@logics_common/useVolume";
|
import {
|
||||||
import { useIsOpenedConfigPage } from "@logics_common/useIsOpenedConfigPage";
|
useVolume,
|
||||||
import { useMainFunction } from "@logics_main/useMainFunction";
|
useIsOpenedConfigPage,
|
||||||
|
} from "@logics_common";
|
||||||
|
|
||||||
const ConfigPageCloseTrigger = () => {
|
const ConfigPageCloseTrigger = () => {
|
||||||
const { currentIsOpenedConfigPage } = useIsOpenedConfigPage();
|
const { currentIsOpenedConfigPage } = useIsOpenedConfigPage();
|
||||||
const { currentMainFunctionsStateMemory, updateMainFunctionsStateMemory} = useStore_MainFunctionsStateMemory();
|
const { currentMainFunctionsStateMemory, updateMainFunctionsStateMemory} = useStore_MainFunctionsStateMemory();
|
||||||
|
|||||||
@@ -2,11 +2,17 @@ import clsx from "clsx";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import styles from "./Appearance.module.scss";
|
import styles from "./Appearance.module.scss";
|
||||||
import { useSettingBox } from "../components/useSettingBox";
|
import { useSettingBox } from "../components/useSettingBox";
|
||||||
import { useStore_SelectedMicDevice, useStore_MicDeviceList } from "@store";
|
|
||||||
|
import {
|
||||||
|
useUiLanguage,
|
||||||
|
useUiScaling,
|
||||||
|
useMessageLogUiScaling,
|
||||||
|
useSelectedFontFamily,
|
||||||
|
useTransparency,
|
||||||
|
} from "@logics_configs";
|
||||||
|
|
||||||
export const Appearance = () => {
|
export const Appearance = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
// const { currentSelectedMicDevice, updateSelectedMicDevice } = useStore_SelectedMicDevice();
|
|
||||||
// const { currentMicDeviceList } = useStore_MicDeviceList();
|
|
||||||
const {
|
const {
|
||||||
DropdownMenuContainer,
|
DropdownMenuContainer,
|
||||||
// SliderContainer,
|
// SliderContainer,
|
||||||
@@ -53,7 +59,6 @@ export const Appearance = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
import { LabelComponent } from "../components/label_component/LabelComponent";
|
import { LabelComponent } from "../components/label_component/LabelComponent";
|
||||||
import { useUiLanguage } from "@logics_configs/useUiLanguage";
|
|
||||||
|
|
||||||
const UiLanguageContainer = () => {
|
const UiLanguageContainer = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -100,7 +105,6 @@ const UiLanguageContainer = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
import { useUiScaling } from "@logics_configs/useUiScaling";
|
|
||||||
import { SliderContainer } from "../components/useSettingBox";
|
import { SliderContainer } from "../components/useSettingBox";
|
||||||
|
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
@@ -145,7 +149,6 @@ const UiScalingContainer = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
import { useMessageLogUiScaling } from "@logics_configs/useMessageLogUiScaling";
|
|
||||||
|
|
||||||
const MessageLogUiScalingContainer = () => {
|
const MessageLogUiScalingContainer = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -189,7 +192,6 @@ const MessageLogUiScalingContainer = () => {
|
|||||||
};
|
};
|
||||||
import { useStore_SelectableFontFamilyList } from "@store";
|
import { useStore_SelectableFontFamilyList } from "@store";
|
||||||
import { DropdownMenuContainer } from "../components/useSettingBox";
|
import { DropdownMenuContainer } from "../components/useSettingBox";
|
||||||
import { useSelectedFontFamily } from "@logics_configs/useSelectedFontFamily";
|
|
||||||
const FontFamilyContainer = () => {
|
const FontFamilyContainer = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { currentSelectedFontFamily, setSelectedFontFamily } = useSelectedFontFamily();
|
const { currentSelectedFontFamily, setSelectedFontFamily } = useSelectedFontFamily();
|
||||||
@@ -212,7 +214,6 @@ const FontFamilyContainer = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
import { useTransparency } from "@logics_configs/useTransparency";
|
|
||||||
|
|
||||||
const TransparencyContainer = () => {
|
const TransparencyContainer = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
+10
-5
@@ -3,7 +3,14 @@ import styles from "./ThresholdComponent.module.scss";
|
|||||||
import { SliderAndMeter } from "./slider_and_meter/SliderAndMeter";
|
import { SliderAndMeter } from "./slider_and_meter/SliderAndMeter";
|
||||||
import { ThresholdEntry } from "./threshold_entry/ThresholdEntry";
|
import { ThresholdEntry } from "./threshold_entry/ThresholdEntry";
|
||||||
import { VolumeCheckButton } from "./volume_check_button/VolumeCheckButton";
|
import { VolumeCheckButton } from "./volume_check_button/VolumeCheckButton";
|
||||||
import { useVolume } from "@logics_common/useVolume";
|
import { useVolume } from "@logics_common";
|
||||||
|
import MicSvg from "@images/mic.svg?react";
|
||||||
|
import HeadphonesSvg from "@images/headphones.svg?react";
|
||||||
|
import {
|
||||||
|
useMicThreshold,
|
||||||
|
useSpeakerThreshold,
|
||||||
|
} from "@logics_configs";
|
||||||
|
|
||||||
export const ThresholdComponent = (props) => {
|
export const ThresholdComponent = (props) => {
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
@@ -14,8 +21,7 @@ export const ThresholdComponent = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
import MicSvg from "@images/mic.svg?react";
|
|
||||||
import { useMicThreshold } from "@logics_configs/useMicThreshold";
|
|
||||||
const MicComponent = (props) => {
|
const MicComponent = (props) => {
|
||||||
const {
|
const {
|
||||||
currentMicThreshold,
|
currentMicThreshold,
|
||||||
@@ -72,8 +78,7 @@ const MicComponent = (props) => {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
import HeadphonesSvg from "@images/headphones.svg?react";
|
|
||||||
import { useSpeakerThreshold } from "@logics_configs/useSpeakerThreshold";
|
|
||||||
const SpeakerComponent = (props) => {
|
const SpeakerComponent = (props) => {
|
||||||
const {
|
const {
|
||||||
currentSpeakerThreshold,
|
currentSpeakerThreshold,
|
||||||
|
|||||||
+4
-2
@@ -3,6 +3,10 @@ import {
|
|||||||
useStore_MicVolume,
|
useStore_MicVolume,
|
||||||
useStore_SpeakerVolume,
|
useStore_SpeakerVolume,
|
||||||
} from "@store";
|
} from "@store";
|
||||||
|
import {
|
||||||
|
useMicThreshold,
|
||||||
|
useSpeakerThreshold,
|
||||||
|
} from "@logics_configs";
|
||||||
|
|
||||||
export const SliderAndMeter = (props) => {
|
export const SliderAndMeter = (props) => {
|
||||||
return (
|
return (
|
||||||
@@ -17,7 +21,6 @@ export const SliderAndMeter = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
import { useMicThreshold } from "@logics_configs/useMicThreshold";
|
|
||||||
const ThresholdVolumeMeter_Mic = (props) => {
|
const ThresholdVolumeMeter_Mic = (props) => {
|
||||||
const { currentMicVolume } = useStore_MicVolume();
|
const { currentMicVolume } = useStore_MicVolume();
|
||||||
|
|
||||||
@@ -44,7 +47,6 @@ const ThresholdVolumeMeter_Mic = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
import { useSpeakerThreshold } from "@logics_configs/useSpeakerThreshold";
|
|
||||||
const ThresholdVolumeMeter_Speaker = (props) => {
|
const ThresholdVolumeMeter_Speaker = (props) => {
|
||||||
const { currentSpeakerVolume } = useStore_SpeakerVolume();
|
const { currentSpeakerVolume } = useStore_SpeakerVolume();
|
||||||
|
|
||||||
|
|||||||
@@ -13,14 +13,18 @@ export const Device = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
import { useEnableAutoMicSelect } from "@logics_configs/useEnableAutoMicSelect";
|
import {
|
||||||
|
useEnableAutoMicSelect,
|
||||||
import { useMicHostList } from "@logics_configs/useMicHostList";
|
useMicHostList,
|
||||||
import { useSelectedMicHost } from "@logics_configs/useSelectedMicHost";
|
useSelectedMicHost,
|
||||||
|
useMicDeviceList,
|
||||||
import { useMicDeviceList } from "@logics_configs/useMicDeviceList";
|
useSelectedMicDevice,
|
||||||
import { useSelectedMicDevice } from "@logics_configs/useSelectedMicDevice";
|
useMicThreshold,
|
||||||
import { useMicThreshold } from "@logics_configs/useMicThreshold";
|
useEnableAutoSpeakerSelect,
|
||||||
|
useSpeakerDeviceList,
|
||||||
|
useSelectedSpeakerDevice,
|
||||||
|
useSpeakerThreshold,
|
||||||
|
} from "@logics_configs";
|
||||||
|
|
||||||
import { LabelComponent } from "../components/label_component/LabelComponent";
|
import { LabelComponent } from "../components/label_component/LabelComponent";
|
||||||
import { DropdownMenu } from "../components/dropdown_menu/DropdownMenu";
|
import { DropdownMenu } from "../components/dropdown_menu/DropdownMenu";
|
||||||
@@ -126,11 +130,6 @@ const Mic_Container = () => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
import { useEnableAutoSpeakerSelect } from "@logics_configs/useEnableAutoSpeakerSelect";
|
|
||||||
|
|
||||||
import { useSpeakerDeviceList } from "@logics_configs/useSpeakerDeviceList";
|
|
||||||
import { useSelectedSpeakerDevice } from "@logics_configs/useSelectedSpeakerDevice";
|
|
||||||
import { useSpeakerThreshold } from "@logics_configs/useSpeakerThreshold";
|
|
||||||
|
|
||||||
const Speaker_Container = () => {
|
const Speaker_Container = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
|
|
||||||
import styles from "./Topbar.module.scss";
|
import styles from "./Topbar.module.scss";
|
||||||
import { useIsOpenedConfigPage } from "@logics_common/useIsOpenedConfigPage";
|
import { useIsOpenedConfigPage } from "@logics_common";
|
||||||
import ArrowLeftSvg from "@images/arrow_left.svg?react";
|
import ArrowLeftSvg from "@images/arrow_left.svg?react";
|
||||||
|
|
||||||
import { TitleBox } from "./title_box/TitleBox";
|
import { TitleBox } from "./title_box/TitleBox";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import clsx from "clsx";
|
|||||||
import styles from "./MainPage.module.scss";
|
import styles from "./MainPage.module.scss";
|
||||||
import { SidebarSection } from "./sidebar_section/SidebarSection";
|
import { SidebarSection } from "./sidebar_section/SidebarSection";
|
||||||
import { MainSection } from "./main_section/MainSection";
|
import { MainSection } from "./main_section/MainSection";
|
||||||
import { useIsOpenedConfigPage } from "@logics_common/useIsOpenedConfigPage";
|
import { useIsOpenedConfigPage } from "@logics_common";
|
||||||
|
|
||||||
export const MainPage = () => {
|
export const MainPage = () => {
|
||||||
const { currentIsOpenedConfigPage } = useIsOpenedConfigPage();
|
const { currentIsOpenedConfigPage } = useIsOpenedConfigPage();
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { MessageContainer } from "./message_container/MessageContainer";
|
|||||||
import { LanguageSelector } from "./language_selector/LanguageSelector";
|
import { LanguageSelector } from "./language_selector/LanguageSelector";
|
||||||
|
|
||||||
import { useStore_IsOpenedLanguageSelector } from "@store";
|
import { useStore_IsOpenedLanguageSelector } from "@store";
|
||||||
|
import { useLanguageSettings } from "@logics_main";
|
||||||
|
|
||||||
export const MainSection = () => {
|
export const MainSection = () => {
|
||||||
|
|
||||||
@@ -18,7 +19,6 @@ export const MainSection = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
import { useLanguageSettings } from "@logics_main/useLanguageSettings";
|
|
||||||
const HandleLanguageSelector = () => {
|
const HandleLanguageSelector = () => {
|
||||||
const { currentIsOpenedLanguageSelector, updateIsOpenedLanguageSelector } = useStore_IsOpenedLanguageSelector();
|
const { currentIsOpenedLanguageSelector, updateIsOpenedLanguageSelector } = useStore_IsOpenedLanguageSelector();
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { useSelectableLanguageList } from "@logics_main/useSelectableLanguageList";
|
import { useSelectableLanguageList } from "@logics_main";
|
||||||
import styles from "./LanguageSelector.module.scss";
|
import styles from "./LanguageSelector.module.scss";
|
||||||
|
|
||||||
import { LanguageSelectorTopBar } from "./language_selector_top_bar/LanguageSelectorTopBar";
|
import { LanguageSelectorTopBar } from "./language_selector_top_bar/LanguageSelectorTopBar";
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import styles from "./MessageContainer.module.scss";
|
|||||||
import { appWindow } from "@tauri-apps/api/window"; // Tauriのwindow APIをインポート
|
import { appWindow } from "@tauri-apps/api/window"; // Tauriのwindow APIをインポート
|
||||||
import { LogBox } from "./log_box/LogBox";
|
import { LogBox } from "./log_box/LogBox";
|
||||||
import { MessageInputBox } from "./message_input_box/MessageInputBox";
|
import { MessageInputBox } from "./message_input_box/MessageInputBox";
|
||||||
import { useMessageInputBoxRatio } from "@logics_main/useMessageInputBoxRatio";
|
import { useMessageInputBoxRatio } from "@logics_main";
|
||||||
|
|
||||||
export const MessageContainer = () => {
|
export const MessageContainer = () => {
|
||||||
const { currentMessageInputBoxRatio, setMessageInputBoxRatio } = useMessageInputBoxRatio();
|
const { currentMessageInputBoxRatio, setMessageInputBoxRatio } = useMessageInputBoxRatio();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import styles from "./LogBox.module.scss";
|
|||||||
import { store } from "@store";
|
import { store } from "@store";
|
||||||
import { MessageContainer } from "./message_container/MessageContainer";
|
import { MessageContainer } from "./message_container/MessageContainer";
|
||||||
import { scrollToBottom } from "@utils/scrollToBottom";
|
import { scrollToBottom } from "@utils/scrollToBottom";
|
||||||
import { useMessage } from "@logics_common/useMessage";
|
import { useMessage } from "@logics_common";
|
||||||
|
|
||||||
export const LogBox = () => {
|
export const LogBox = () => {
|
||||||
const { currentMessageLogs } = useMessage();
|
const { currentMessageLogs } = useMessage();
|
||||||
@@ -49,7 +49,7 @@ export const LogBox = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
import { useMessageLogUiScaling } from "@logics_configs/useMessageLogUiScaling";
|
import { useMessageLogUiScaling } from "@logics_configs";
|
||||||
const MessageLogUiSizeController = () => {
|
const MessageLogUiSizeController = () => {
|
||||||
const { currentMessageLogUiScaling } = useMessageLogUiScaling();
|
const { currentMessageLogUiScaling } = useMessageLogUiScaling();
|
||||||
const font_size = currentMessageLogUiScaling.data / 100;
|
const font_size = currentMessageLogUiScaling.data / 100;
|
||||||
|
|||||||
+5
-3
@@ -1,11 +1,13 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import styles from "./MessageInputBox.module.scss";
|
import styles from "./MessageInputBox.module.scss";
|
||||||
import SendMessageSvg from "@images/send_message.svg?react";
|
import SendMessageSvg from "@images/send_message.svg?react";
|
||||||
import { useMessage } from "@logics_common/useMessage";
|
import { useMessage } from "@logics_common";
|
||||||
import { store } from "@store";
|
import { store } from "@store";
|
||||||
import { scrollToBottom } from "@utils/scrollToBottom";
|
import { scrollToBottom } from "@utils/scrollToBottom";
|
||||||
import { useSendMessageButtonType } from "@logics_configs/useSendMessageButtonType";
|
import {
|
||||||
import { useEnableAutoClearMessageBox } from "@logics_configs/useEnableAutoClearMessageBox";
|
useSendMessageButtonType,
|
||||||
|
useEnableAutoClearMessageBox,
|
||||||
|
} from "@logics_configs";
|
||||||
|
|
||||||
export const MessageInputBox = () => {
|
export const MessageInputBox = () => {
|
||||||
const [inputValue, setInputValue] = useState("");
|
const [inputValue, setInputValue] = useState("");
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
import styles from "./SidebarCompactModeButton.module.scss";
|
import styles from "./SidebarCompactModeButton.module.scss";
|
||||||
|
|
||||||
import { useIsMainPageCompactMode } from "@logics_main/useIsMainPageCompactMode";
|
import { useIsMainPageCompactMode } from "@logics_main";
|
||||||
import ArrowLeftSvg from "@images/arrow_left.svg?react";
|
import ArrowLeftSvg from "@images/arrow_left.svg?react";
|
||||||
|
|
||||||
export const SidebarCompactModeButton = () => {
|
export const SidebarCompactModeButton = () => {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import clsx from "clsx";
|
|||||||
|
|
||||||
import styles from "./SidebarSection.module.scss";
|
import styles from "./SidebarSection.module.scss";
|
||||||
import { useStore_IsOpenedLanguageSelector } from "@store";
|
import { useStore_IsOpenedLanguageSelector } from "@store";
|
||||||
import { useIsMainPageCompactMode } from "@logics_main/useIsMainPageCompactMode";
|
import { useIsMainPageCompactMode } from "@logics_main";
|
||||||
|
|
||||||
import { Logo } from "./logo/Logo";
|
import { Logo } from "./logo/Logo";
|
||||||
import { MainFunctionSwitch } from "./main_function_switch/MainFunctionSwitch";
|
import { MainFunctionSwitch } from "./main_function_switch/MainFunctionSwitch";
|
||||||
|
|||||||
@@ -23,8 +23,10 @@ export const LanguageSettings = () => {
|
|||||||
import MicSvg from "@images/mic.svg?react";
|
import MicSvg from "@images/mic.svg?react";
|
||||||
import HeadphonesSvg from "@images/headphones.svg?react";
|
import HeadphonesSvg from "@images/headphones.svg?react";
|
||||||
import { useStore_IsOpenedLanguageSelector } from "@store";
|
import { useStore_IsOpenedLanguageSelector } from "@store";
|
||||||
import { useMainFunction } from "@logics_main/useMainFunction";
|
import {
|
||||||
import { useLanguageSettings } from "@logics_main/useLanguageSettings";
|
useMainFunction,
|
||||||
|
useLanguageSettings,
|
||||||
|
} from "@logics_main";
|
||||||
|
|
||||||
// 言語セレクターをトグルする処理を関数化
|
// 言語セレクターをトグルする処理を関数化
|
||||||
const toggleSelector = (selector, currentStatus, updateSelector) => {
|
const toggleSelector = (selector, currentStatus, updateSelector) => {
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import styles from "./LanguageSwapButton.module.scss";
|
import styles from "./LanguageSwapButton.module.scss";
|
||||||
|
|
||||||
import NarrowArrowDownSvg from "@images/narrow_arrow_down.svg?react";
|
import NarrowArrowDownSvg from "@images/narrow_arrow_down.svg?react";
|
||||||
import { useLanguageSettings } from "@logics_main/useLanguageSettings";
|
import { useLanguageSettings } from "@logics_main";
|
||||||
|
|
||||||
export const LanguageSwapButton = () => {
|
export const LanguageSwapButton = () => {
|
||||||
const [isHovered, setIsHovered] = useState(false);
|
const [isHovered, setIsHovered] = useState(false);
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ export const PresetTabSelector = () => {
|
|||||||
|
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
|
|
||||||
import { useLanguageSettings } from "@logics_main/useLanguageSettings";
|
import { useLanguageSettings } from "@logics_main";
|
||||||
|
|
||||||
const Tab = (props) => {
|
const Tab = (props) => {
|
||||||
const { currentSelectedPresetTabNumber, setSelectedPresetTabNumber } = useLanguageSettings();
|
const { currentSelectedPresetTabNumber, setSelectedPresetTabNumber } = useLanguageSettings();
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import styles from "./TranslatorSelectorOpenButton.module.scss";
|
import styles from "./TranslatorSelectorOpenButton.module.scss";
|
||||||
import { TranslatorSelector } from "./translator_selector/TranslatorSelector";
|
import { TranslatorSelector } from "./translator_selector/TranslatorSelector";
|
||||||
import { useStore_IsOpenedTranslatorSelector } from "@store";
|
import { useStore_IsOpenedTranslatorSelector } from "@store";
|
||||||
import { useLanguageSettings } from "@logics_main/useLanguageSettings";
|
import { useLanguageSettings } from "@logics_main";
|
||||||
|
|
||||||
export const TranslatorSelectorOpenButton = () => {
|
export const TranslatorSelectorOpenButton = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,9 @@
|
|||||||
|
import clsx from "clsx";
|
||||||
import styles from "./TranslatorSelector.module.scss";
|
import styles from "./TranslatorSelector.module.scss";
|
||||||
import { chunkArray } from "@utils/chunkArray";
|
import { chunkArray } from "@utils/chunkArray";
|
||||||
|
|
||||||
import { useStore_IsOpenedTranslatorSelector } from "@store";
|
import { useStore_IsOpenedTranslatorSelector } from "@store";
|
||||||
import { useLanguageSettings } from "@logics_main/useLanguageSettings";
|
import { useLanguageSettings } from "@logics_main";
|
||||||
|
|
||||||
export const TranslatorSelector = ({selected_translator_id, translation_engines}) => {
|
export const TranslatorSelector = ({selected_translator_id, translation_engines}) => {
|
||||||
const columns = (translation_engines.data !== undefined) ? chunkArray(translation_engines.data, 2) : [];
|
const columns = (translation_engines.data !== undefined) ? chunkArray(translation_engines.data, 2) : [];
|
||||||
@@ -28,7 +29,6 @@ export const TranslatorSelector = ({selected_translator_id, translation_engines}
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
import clsx from "clsx";
|
|
||||||
const TranslatorBox = (props) => {
|
const TranslatorBox = (props) => {
|
||||||
const { currentSelectedPresetTabNumber, currentSelectedTranslationEngines, setSelectedTranslationEngines} = useLanguageSettings();
|
const { currentSelectedPresetTabNumber, currentSelectedTranslationEngines, setSelectedTranslationEngines} = useLanguageSettings();
|
||||||
const { updateIsOpenedTranslatorSelector} = useStore_IsOpenedTranslatorSelector();
|
const { updateIsOpenedTranslatorSelector} = useStore_IsOpenedTranslatorSelector();
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export const Logo = () => {
|
|||||||
|
|
||||||
import vrct_logo from "@images/vrct_logo_for_dark_mode.png";
|
import vrct_logo from "@images/vrct_logo_for_dark_mode.png";
|
||||||
import chato_img from "@images/chato_white.png";
|
import chato_img from "@images/chato_white.png";
|
||||||
import { useIsMainPageCompactMode } from "@logics_main/useIsMainPageCompactMode";
|
import { useIsMainPageCompactMode } from "@logics_main";
|
||||||
|
|
||||||
export const LogoBox = () => {
|
export const LogoBox = () => {
|
||||||
const { currentIsMainPageCompactMode } = useIsMainPageCompactMode();
|
const { currentIsMainPageCompactMode } = useIsMainPageCompactMode();
|
||||||
|
|||||||
@@ -5,9 +5,10 @@ import TranslationSvg from "@images/translation.svg?react";
|
|||||||
import MicSvg from "@images/mic.svg?react";
|
import MicSvg from "@images/mic.svg?react";
|
||||||
import HeadphonesSvg from "@images/headphones.svg?react";
|
import HeadphonesSvg from "@images/headphones.svg?react";
|
||||||
import ForegroundSvg from "@images/foreground.svg?react";
|
import ForegroundSvg from "@images/foreground.svg?react";
|
||||||
import { useIsMainPageCompactMode } from "@logics_main/useIsMainPageCompactMode";
|
import {
|
||||||
|
useIsMainPageCompactMode,
|
||||||
import { useMainFunction } from "@logics_main/useMainFunction";
|
useMainFunction,
|
||||||
|
} from "@logics_main";
|
||||||
|
|
||||||
export const MainFunctionSwitch = () => {
|
export const MainFunctionSwitch = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import styles from "./OpenSettings.module.scss";
|
import styles from "./OpenSettings.module.scss";
|
||||||
import { useIsOpenedConfigPage } from "@logics_common/useIsOpenedConfigPage";
|
import { useIsOpenedConfigPage } from "@logics_common";
|
||||||
import ConfigurationSvg from "@images/configuration.svg?react";
|
import ConfigurationSvg from "@images/configuration.svg?react";
|
||||||
|
|
||||||
export const OpenSettings = () => {
|
export const OpenSettings = () => {
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export { useIsOpenedConfigPage } from "./useIsOpenedConfigPage";
|
||||||
|
export { useMessage } from "./useMessage";
|
||||||
|
export { useVolume } from "./useVolume";
|
||||||
@@ -1,17 +1,10 @@
|
|||||||
import { useStore_IsOpenedConfigPage } from "@store";
|
import { useStore_IsOpenedConfigPage } from "@store";
|
||||||
import { useStdoutToPython } from "@logics/useStdoutToPython";
|
|
||||||
|
|
||||||
export const useIsOpenedConfigPage = () => {
|
export const useIsOpenedConfigPage = () => {
|
||||||
const { asyncStdoutToPython } = useStdoutToPython();
|
|
||||||
const { currentIsOpenedConfigPage, updateIsOpenedConfigPage } = useStore_IsOpenedConfigPage();
|
const { currentIsOpenedConfigPage, updateIsOpenedConfigPage } = useStore_IsOpenedConfigPage();
|
||||||
|
|
||||||
const setIsOpenedConfigPage = (is_opened) => {
|
const setIsOpenedConfigPage = (is_opened) => {
|
||||||
updateIsOpenedConfigPage(is_opened);
|
updateIsOpenedConfigPage(is_opened);
|
||||||
// if (is_opened) {
|
|
||||||
// asyncStdoutToPython("/set/enable/config_window");
|
|
||||||
// } else {
|
|
||||||
// asyncStdoutToPython("/set/disable/config_window");
|
|
||||||
// }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,21 @@
|
|||||||
|
export { useEnableAutoMicSelect } from "./device/useEnableAutoMicSelect";
|
||||||
|
export { useEnableAutoSpeakerSelect } from "./device/useEnableAutoSpeakerSelect";
|
||||||
|
export { useMicDeviceList } from "./device/useMicDeviceList";
|
||||||
|
export { useMicHostList } from "./device/useMicHostList";
|
||||||
|
export { useMicThreshold } from "./device/useMicThreshold";
|
||||||
|
export { useSelectedMicDevice } from "./device/useSelectedMicDevice";
|
||||||
|
export { useSelectedMicHost } from "./device/useSelectedMicHost";
|
||||||
|
export { useSelectedSpeakerDevice } from "./device/useSelectedSpeakerDevice";
|
||||||
|
export { useSpeakerDeviceList } from "./device/useSpeakerDeviceList";
|
||||||
|
export { useSpeakerThreshold } from "./device/useSpeakerThreshold";
|
||||||
|
|
||||||
|
export { useMessageLogUiScaling } from "./appearance/useMessageLogUiScaling";
|
||||||
|
export { useSelectedFontFamily } from "./appearance/useSelectedFontFamily";
|
||||||
|
export { useSendMessageButtonType } from "./appearance/useSendMessageButtonType";
|
||||||
|
export { useTransparency } from "./appearance/useTransparency";
|
||||||
|
export { useUiLanguage } from "./appearance/useUiLanguage";
|
||||||
|
export { useUiScaling } from "./appearance/useUiScaling";
|
||||||
|
|
||||||
|
export { useEnableAutoClearMessageBox } from "./others/useEnableAutoClearMessageBox";
|
||||||
|
|
||||||
|
export { useSoftwareVersion } from "./useSoftwareVersion";
|
||||||
File renamed without changes.
@@ -0,0 +1,5 @@
|
|||||||
|
export { useIsMainPageCompactMode } from "./useIsMainPageCompactMode";
|
||||||
|
export { useLanguageSettings } from "./useLanguageSettings";
|
||||||
|
export { useMainFunction } from "./useMainFunction";
|
||||||
|
export { useMessageInputBoxRatio } from "./useMessageInputBoxRatio";
|
||||||
|
export { useSelectableLanguageList } from "./useSelectableLanguageList";
|
||||||
@@ -1,36 +1,39 @@
|
|||||||
import { translator_status } from "@data";
|
import { translator_status } from "@data";
|
||||||
|
|
||||||
import { arrayToObject } from "@utils/arrayToObject";
|
import { arrayToObject } from "@utils/arrayToObject";
|
||||||
|
|
||||||
import { useMessage } from "@logics_common/useMessage";
|
import {
|
||||||
import { useVolume } from "@logics_common/useVolume";
|
useMessage,
|
||||||
|
useVolume,
|
||||||
|
} from "@logics_common";
|
||||||
|
|
||||||
import { useMainFunction } from "@logics_main/useMainFunction";
|
import {
|
||||||
import { useSelectableLanguageList } from "@logics_main/useSelectableLanguageList";
|
useMainFunction,
|
||||||
import { useLanguageSettings } from "@logics_main/useLanguageSettings";
|
useSelectableLanguageList,
|
||||||
import { useIsMainPageCompactMode } from "@logics_main/useIsMainPageCompactMode";
|
useLanguageSettings,
|
||||||
import { useMessageInputBoxRatio } from "@logics_main/useMessageInputBoxRatio";
|
useIsMainPageCompactMode,
|
||||||
|
useMessageInputBoxRatio,
|
||||||
|
} from "@logics_main";
|
||||||
|
|
||||||
|
import {
|
||||||
import { useSoftwareVersion } from "@logics_configs/useSoftwareVersion";
|
useSoftwareVersion,
|
||||||
import { useEnableAutoMicSelect } from "@logics_configs/useEnableAutoMicSelect";
|
useEnableAutoMicSelect,
|
||||||
import { useEnableAutoSpeakerSelect } from "@logics_configs/useEnableAutoSpeakerSelect";
|
useEnableAutoSpeakerSelect,
|
||||||
import { useMicHostList } from "@logics_configs/useMicHostList";
|
useMicHostList,
|
||||||
import { useSelectedMicHost } from "@logics_configs/useSelectedMicHost";
|
useSelectedMicHost,
|
||||||
import { useMicDeviceList } from "@logics_configs/useMicDeviceList";
|
useMicDeviceList,
|
||||||
import { useSelectedMicDevice } from "@logics_configs/useSelectedMicDevice";
|
useSelectedMicDevice,
|
||||||
import { useSpeakerDeviceList } from "@logics_configs/useSpeakerDeviceList";
|
useSpeakerDeviceList,
|
||||||
import { useSelectedSpeakerDevice } from "@logics_configs/useSelectedSpeakerDevice";
|
useSelectedSpeakerDevice,
|
||||||
import { useMicThreshold } from "@logics_configs/useMicThreshold";
|
useMicThreshold,
|
||||||
import { useSpeakerThreshold } from "@logics_configs/useSpeakerThreshold";
|
useSpeakerThreshold,
|
||||||
import { useEnableAutoClearMessageBox } from "@logics_configs/useEnableAutoClearMessageBox";
|
useEnableAutoClearMessageBox,
|
||||||
import { useSendMessageButtonType } from "@logics_configs/useSendMessageButtonType";
|
useSendMessageButtonType,
|
||||||
import { useSelectedFontFamily } from "@logics_configs/useSelectedFontFamily";
|
useSelectedFontFamily,
|
||||||
|
useUiLanguage,
|
||||||
import { useUiLanguage } from "@logics_configs/useUiLanguage";
|
useUiScaling,
|
||||||
import { useUiScaling } from "@logics_configs/useUiScaling";
|
useMessageLogUiScaling,
|
||||||
import { useMessageLogUiScaling } from "@logics_configs/useMessageLogUiScaling";
|
useTransparency,
|
||||||
import { useTransparency } from "@logics_configs/useTransparency";
|
} from "@logics_configs";
|
||||||
|
|
||||||
export const useReceiveRoutes = () => {
|
export const useReceiveRoutes = () => {
|
||||||
const { updateIsMainPageCompactMode } = useIsMainPageCompactMode();
|
const { updateIsMainPageCompactMode } = useIsMainPageCompactMode();
|
||||||
|
|||||||
Reference in new issue
Block a user