@@ -78,6 +83,19 @@ export const Vr = () => {
);
};
+const EnableOverlaySmallLogContainer = () => {
+ const { t } = useTranslation();
+ const { currentIsEnabledOverlaySmallLog, toggleIsEnabledOverlaySmallLog } = useIsEnabledOverlaySmallLog();
+
+ return (
+
+ );
+};
+
const CommonControls = () => {
const { t } = useTranslation();
const { currentOverlaySettings, setOverlaySettings } = useOverlaySettings();
diff --git a/src-ui/logics/configs/vr/useIsEnabledOverlaySmallLog.js b/src-ui/logics/configs/vr/useIsEnabledOverlaySmallLog.js
index cf46ce4e..b27280ab 100644
--- a/src-ui/logics/configs/vr/useIsEnabledOverlaySmallLog.js
+++ b/src-ui/logics/configs/vr/useIsEnabledOverlaySmallLog.js
@@ -6,7 +6,7 @@ export const useIsEnabledOverlaySmallLog = () => {
const { currentIsEnabledOverlaySmallLog, updateIsEnabledOverlaySmallLog, pendingIsEnabledOverlaySmallLog } = useStore_IsEnabledOverlaySmallLog();
const getIsEnabledOverlaySmallLog = () => {
- // pendingIsEnabledOverlaySmallLog();
+ pendingIsEnabledOverlaySmallLog();
asyncStdoutToPython("/get/data/overlay_settings");
};
diff --git a/src-ui/logics/useReceiveRoutes.js b/src-ui/logics/useReceiveRoutes.js
index cd109e60..7879b28e 100644
--- a/src-ui/logics/useReceiveRoutes.js
+++ b/src-ui/logics/useReceiveRoutes.js
@@ -46,6 +46,7 @@ import {
useSpeakerPhraseTimeout,
useSpeakerMaxWords,
useOverlaySettings,
+ useIsEnabledOverlaySmallLog,
useOverlaySmallLogSettings,
useOscIpAddress,
useOscPort,
@@ -117,6 +118,7 @@ export const useReceiveRoutes = () => {
const { updateOverlaySettings } = useOverlaySettings();
const { updateOverlaySmallLogSettings } = useOverlaySmallLogSettings();
+ const { updateIsEnabledOverlaySmallLog } = useIsEnabledOverlaySmallLog();
const { updateOscIpAddress } = useOscIpAddress();
const { updateOscPort } = useOscPort();
@@ -320,6 +322,10 @@ export const useReceiveRoutes = () => {
"/get/data/overlay_settings": updateOverlaySettings,
"/set/data/overlay_settings": updateOverlaySettings,
+ "/get/data/overlay_small_log": updateIsEnabledOverlaySmallLog,
+ "/set/enable/overlay_small_log": updateIsEnabledOverlaySmallLog,
+ "/set/disable/overlay_small_log": updateIsEnabledOverlaySmallLog,
+
"/get/data/overlay_small_log_settings": updateOverlaySmallLogSettings,
"/set/data/overlay_small_log_settings": updateOverlaySmallLogSettings,
From 51bf5a2e2781870c987a7a937ff6305345b37956 Mon Sep 17 00:00:00 2001
From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com>
Date: Thu, 31 Oct 2024 16:32:53 +0900
Subject: [PATCH 3/4] [Update] Quick Settings: Add Vrc Mic Mute Sync.
---
.../setting_section/setting_box/index.js | 2 +-
.../setting_box/others/Others.jsx | 2 +-
.../RightSideComponents.jsx | 23 ++++++++++++++++---
.../app/modal_controller/ModalController.jsx | 17 ++++++++++++--
4 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/src-ui/app/config_page/setting_section/setting_box/index.js b/src-ui/app/config_page/setting_section/setting_box/index.js
index 1d8953fd..a656c23c 100644
--- a/src-ui/app/config_page/setting_section/setting_box/index.js
+++ b/src-ui/app/config_page/setting_section/setting_box/index.js
@@ -1,7 +1,7 @@
export { Device } from "./device/Device";
export { Appearance } from "./appearance/Appearance";
export { Transcription } from "./transcription/Transcription";
-export { Others } from "./others/Others";
+export { Others, VrcMicMuteSyncContainer } from "./others/Others";
export { AdvancedSettings } from "./advanced_settings/AdvancedSettings";
export { Vr } from "./vr/Vr";
// export { AboutVrct } from "./about_vrct/AboutVrct";
\ No newline at end of file
diff --git a/src-ui/app/config_page/setting_section/setting_box/others/Others.jsx b/src-ui/app/config_page/setting_section/setting_box/others/Others.jsx
index 2112db2c..da450f77 100644
--- a/src-ui/app/config_page/setting_section/setting_box/others/Others.jsx
+++ b/src-ui/app/config_page/setting_section/setting_box/others/Others.jsx
@@ -82,7 +82,7 @@ const AutoExportMessageLogsContainer = () => {
);
};
-const VrcMicMuteSyncContainer = () => {
+export const VrcMicMuteSyncContainer = () => {
const { t } = useTranslation();
const { currentEnableVrcMicMuteSync, toggleEnableVrcMicMuteSync } = useEnableVrcMicMuteSync();
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 fc05b10a..3afbb24a 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
@@ -2,13 +2,13 @@ import styles from "./RightSideComponents.module.scss";
import HelpSvg from "@images/help.svg?react";
import { useStore_OpenedQuickSetting } from "@store";
-import { useIsEnabledOverlaySmallLog } from "@logics_configs";
+import { useIsEnabledOverlaySmallLog, useEnableVrcMicMuteSync } from "@logics_configs";
import { OpenQuickSettingButton } from "./_buttons/OpenQuickSettingButton";
export const RightSideComponents = () => {
return (
-
VRC mic mute sync
+
{
};
const OpenOverlayQuickSetting = () => {
- const { currentOpenedQuickSetting, updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
+ const { updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
const { currentIsEnabledOverlaySmallLog } = useIsEnabledOverlaySmallLog();
const onClickFunction = () => {
@@ -37,4 +37,21 @@ const OpenOverlayQuickSetting = () => {
onClickFunction={onClickFunction}
/>
);
+};
+
+const OpenVrcMicMuteSyncQuickSetting = () => {
+ const { updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
+ const { currentEnableVrcMicMuteSync } = useEnableVrcMicMuteSync();
+
+ const onClickFunction = () => {
+ updateOpenedQuickSetting("vrc_mic_mute_sync");
+ };
+
+ return (
+
+ );
};
\ No newline at end of file
diff --git a/src-ui/app/modal_controller/ModalController.jsx b/src-ui/app/modal_controller/ModalController.jsx
index 4d2e4e54..762f9fb6 100644
--- a/src-ui/app/modal_controller/ModalController.jsx
+++ b/src-ui/app/modal_controller/ModalController.jsx
@@ -1,6 +1,6 @@
import styles from "./ModalController.module.scss";
import { useStore_OpenedQuickSetting } from "@store";
-import { Vr } from "@setting_box";
+import { Vr, VrcMicMuteSyncContainer } from "@setting_box";
export const ModalController = () => {
const { currentOpenedQuickSetting, updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
if (currentOpenedQuickSetting.data === "") return null;
@@ -8,8 +8,21 @@ export const ModalController = () => {
updateOpenedQuickSetting("")}>
-
+
);
+};
+
+const QuickSettingsController = () => {
+ const { currentOpenedQuickSetting, updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
+
+ switch (currentOpenedQuickSetting.data) {
+ case "overlay":
+ return ;
+ case "vrc_mic_mute_sync":
+ return ;
+ default:
+ return null;
+ }
};
\ No newline at end of file
From 30de46cf2cab64b6d507f35e45ed6dd7811fe65b Mon Sep 17 00:00:00 2001
From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com>
Date: Thu, 31 Oct 2024 16:50:21 +0900
Subject: [PATCH 4/4] [Update] Quick Settings: Apply localization.
---
.../top_bar/right_side_components/RightSideComponents.jsx | 5 ++++-
.../_buttons/OpenQuickSettingButton.jsx | 6 ++++--
2 files changed, 8 insertions(+), 3 deletions(-)
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 3afbb24a..c16cd4f1 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,3 +1,4 @@
+import { useTranslation } from "react-i18next";
import styles from "./RightSideComponents.module.scss";
import HelpSvg from "@images/help.svg?react";
@@ -23,6 +24,7 @@ export const RightSideComponents = () => {
};
const OpenOverlayQuickSetting = () => {
+ // const { t } = useTranslation();
const { updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
const { currentIsEnabledOverlaySmallLog } = useIsEnabledOverlaySmallLog();
@@ -40,6 +42,7 @@ const OpenOverlayQuickSetting = () => {
};
const OpenVrcMicMuteSyncQuickSetting = () => {
+ const { t } = useTranslation();
const { updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
const { currentEnableVrcMicMuteSync } = useEnableVrcMicMuteSync();
@@ -49,7 +52,7 @@ const OpenVrcMicMuteSyncQuickSetting = () => {
return (
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 c3151df3..d23eae2c 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,14 +1,16 @@
+import { useTranslation } from "react-i18next";
import clsx from "clsx";
import styles from "./OpenQuickSettingButton.module.scss";
export const OpenQuickSettingButton = (props) => {
+ const { t } = useTranslation();
return (
{props.label}
{props.variable === true
- ?
Enabled
- :
Disabled
+ ?
{t("main_page.state_text_enabled")}
+ :
{t("main_page.state_text_disabled")}
}