From 6d84cabf885b17fb171657de341601562ad0f81e Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:12:36 +0900 Subject: [PATCH 1/4] [Update] Config Page: VR Tab: Add restore default settings button. --- .../setting_section/setting_box/vr/Vr.jsx | 12 ++++++++ .../setting_box/vr/Vr.module.scss | 14 ++++++++++ src-ui/ui_configs.js | 28 +++++++++++++++++++ 3 files changed, 54 insertions(+) diff --git a/src-ui/app/config_page/setting_section/setting_box/vr/Vr.jsx b/src-ui/app/config_page/setting_section/setting_box/vr/Vr.jsx index 1d9d4f6e..fabe60e8 100644 --- a/src-ui/app/config_page/setting_section/setting_box/vr/Vr.jsx +++ b/src-ui/app/config_page/setting_section/setting_box/vr/Vr.jsx @@ -34,6 +34,12 @@ export const Vr = () => { const { currentOverlayLargeLogSettings, setOverlayLargeLogSettings } = useOverlayLargeLogSettings(); const { currentIsEnabledOverlayLargeLog, toggleIsEnabledOverlayLargeLog } = useIsEnabledOverlayLargeLog(); + + const restoreDefaultSettings = () => { + setOverlaySmallLogSettings(ui_configs.overlay_small_log_default_settings); + setOverlayLargeLogSettings(ui_configs.overlay_large_log_default_settings); + }; + return (
@@ -64,6 +70,12 @@ export const Vr = () => { )}
+
); }; diff --git a/src-ui/app/config_page/setting_section/setting_box/vr/Vr.module.scss b/src-ui/app/config_page/setting_section/setting_box/vr/Vr.module.scss index e32a0fb2..fe7b244d 100644 --- a/src-ui/app/config_page/setting_section/setting_box/vr/Vr.module.scss +++ b/src-ui/app/config_page/setting_section/setting_box/vr/Vr.module.scss @@ -196,4 +196,18 @@ .common_label { font-size: 1.4rem; +} + +.restore_default_settings_button { + color: var(--dark_basic_text_color); + font-size: 1.2rem; + margin-top: 6rem; + padding: 0.8rem; + border-radius: 0.4rem; + &:hover { + background-color: var(--dark_775_color); + } + &:active { + background-color: var(--dark_900_color); + } } \ No newline at end of file diff --git a/src-ui/ui_configs.js b/src-ui/ui_configs.js index 0650726e..1b854015 100644 --- a/src-ui/ui_configs.js +++ b/src-ui/ui_configs.js @@ -15,6 +15,34 @@ export const ui_configs = { z_pos: { step: 0.05, min: -0.5, max: 1.5 }, ui_scaling: { step: 10, min: 40, max: 200 }, }, + + overlay_small_log_default_settings: { + x_pos: 0.0, + y_pos: 0.0, + z_pos: 0.0, + x_rotation: 0.0, + y_rotation: 0.0, + z_rotation: 0.0, + display_duration: 5, + fadeout_duration: 2, + opacity: 1.0, + ui_scaling: 1.0, + tracker: "HMD", + }, + overlay_large_log_default_settings: { + x_pos: 0.0, + y_pos: 0.0, + z_pos: 0.0, + x_rotation: 0.0, + y_rotation: 0.0, + z_rotation: 0.0, + display_duration: 5, + fadeout_duration: 2, + opacity: 1.0, + ui_scaling: 1.0, + tracker: "LeftHand", + }, + selectable_ui_languages: [ {id: "en", label: "English"}, {id: "ja", label: "日本語"}, From 5cbd8c46ab75cbc7818d05f69612b9c5666e38db Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:42:27 +0900 Subject: [PATCH 2/4] [Chore] Config Page: software version text. Adjust size a bit. --- src-ui/app/config_page/ConfigPage.module.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src-ui/app/config_page/ConfigPage.module.scss b/src-ui/app/config_page/ConfigPage.module.scss index 16922d38..28d2fd0e 100644 --- a/src-ui/app/config_page/ConfigPage.module.scss +++ b/src-ui/app/config_page/ConfigPage.module.scss @@ -29,5 +29,6 @@ position: absolute; bottom: 0.8rem; left: 1.2rem; - font-size: 1.4rem; + font-size: 1.2rem; + color: var(--dark_400_color); } \ No newline at end of file From a5ad2408be4245b06111f0a9bec6e3dac507717a Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Fri, 13 Dec 2024 19:18:53 +0900 Subject: [PATCH 3/4] [bugfix] Main Page: TranslatorSelectorOpenButton. Fix the new line. --- .../TranslatorSelectorOpenButton.module.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.module.scss b/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.module.scss index f32a232e..fcc32d96 100644 --- a/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.module.scss +++ b/src-ui/app/main_page/sidebar_section/language_settings/translator_selector_open_button/TranslatorSelectorOpenButton.module.scss @@ -24,4 +24,5 @@ .label { font-size: 1.2rem; color: var(--dark_basic_text_color); + white-space: nowrap; } \ No newline at end of file From 9f3ff154990829c103c49ebe8447217c812d8018 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Sat, 14 Dec 2024 13:43:13 +0900 Subject: [PATCH 4/4] [bugfix/Prepare] Main Page: Message Logs. Remove test code. and hide init invalid endpoint for now. Fix the error 'Uncaught TypeError: currentMessageLogs.data.map is not a function' with change the type obj to array when init. --- src-ui/logics/useReceiveRoutes.js | 2 ++ src-ui/store.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src-ui/logics/useReceiveRoutes.js b/src-ui/logics/useReceiveRoutes.js index 0c09da4f..a188dce2 100644 --- a/src-ui/logics/useReceiveRoutes.js +++ b/src-ui/logics/useReceiveRoutes.js @@ -463,6 +463,8 @@ export const useReceiveRoutes = () => { "/get/data/mic_no_speech_prob": ()=>{}, // Not implemented on UI yet "/get/data/speaker_avg_logprob": ()=>{}, // Not implemented on UI yet "/get/data/speaker_no_speech_prob": ()=>{}, // Not implemented on UI yet + "/get/data/convert_message_to_romaji": ()=>{}, // Not implemented on UI yet + "/get/data/convert_message_to_hiragana": ()=>{}, // Not implemented on UI yet }; const error_routes = { diff --git a/src-ui/store.js b/src-ui/store.js index 24c2824f..c9759e93 100644 --- a/src-ui/store.js +++ b/src-ui/store.js @@ -129,7 +129,8 @@ export const { atomInstance: Atom_TranscriptionSendStatus, useHook: useStore_Tra export const { atomInstance: Atom_TranscriptionReceiveStatus, useHook: useStore_TranscriptionReceiveStatus } = createAtomWithHook(false, "TranscriptionReceiveStatus", {is_state_ok: true}); export const { atomInstance: Atom_ForegroundStatus, useHook: useStore_ForegroundStatus } = createAtomWithHook(false, "ForegroundStatus", {is_state_ok: true}); -export const { atomInstance: Atom_MessageLogs, useHook: useStore_MessageLogs } = createAtomWithHook(generateTestData(20), "MessageLogs"); +export const { atomInstance: Atom_MessageLogs, useHook: useStore_MessageLogs } = createAtomWithHook([], "MessageLogs"); +// export const { atomInstance: Atom_MessageLogs, useHook: useStore_MessageLogs } = createAtomWithHook(generateTestData(20), "MessageLogs"); // For testing export const { atomInstance: Atom_MessageInputValue, useHook: useStore_MessageInputValue } = createAtomWithHook("", "MessageInputValue"); export const { atomInstance: Atom_IsVisibleResendButton, useHook: useStore_IsVisibleResendButton } = createAtomWithHook(false, "IsVisibleResendButton"); export const { atomInstance: Atom_IsAppliedInitMessageBoxHeight, useHook: useStore_IsAppliedInitMessageBoxHeight } = createAtomWithHook(false, "IsAppliedInitMessageBoxHeight");