[Update] Config Page: Others Tab: Add EnableSendReceivedMessageToVrc(Speaker2Chatbox).

This commit is contained in:
Sakamoto Shiina
2024-11-14 06:59:41 +09:00
parent 7cacdae46b
commit 4b8b098c57
7 changed files with 76 additions and 11 deletions

View File

@@ -8,6 +8,7 @@ import {
useEnableAutoExportMessageLogs,
useEnableVrcMicMuteSync,
useEnableSendMessageToVrc,
useEnableSendReceivedMessageToVrc,
} from "@logics_configs";
import {
@@ -18,19 +19,26 @@ import {
LabelComponent,
Checkbox,
ActionButton,
SectionLabelComponent,
} from "../_components/";
import OpenFolderSvg from "@images/open_folder.svg?react";
export const Others = () => {
return (
<>
<AutoClearMessageInputBoxContainer />
<SendOnlyTranslatedMessagesContainer />
<AutoExportMessageLogsContainer />
<VrcMicMuteSyncContainer />
<SendMessageToVrcContainer />
</>
<div className={styles.container}>
<div>
<AutoClearMessageInputBoxContainer />
<SendOnlyTranslatedMessagesContainer />
<AutoExportMessageLogsContainer />
<VrcMicMuteSyncContainer />
<SendMessageToVrcContainer />
</div>
<div>
<SectionLabelComponent label="Speaker2Chatbox" />
<SendReceivedMessageToVrcContainer />
</div>
</div>
);
};
@@ -64,12 +72,12 @@ const AutoExportMessageLogsContainer = () => {
const { openFolder_MessageLogs } = useOpenFolder();
return (
<div className={styles.container}>
<div className={styles.auto_export_message_logs_container}>
<LabelComponent
label={t("config_page.auto_export_message_logs.label")}
desc={t("config_page.auto_export_message_logs.desc")}
/>
<div className={styles.switch_section_container}>
<div className={styles.auto_export_message_logs_switch_section_container}>
<ActionButton
IconComponent={OpenFolderSvg}
onclickFunction={openFolder_MessageLogs}
@@ -107,4 +115,19 @@ const SendMessageToVrcContainer = () => {
toggleFunction={toggleEnableSendMessageToVrc}
/>
);
};
const SendReceivedMessageToVrcContainer = () => {
const { t } = useTranslation();
const { currentEnableSendReceivedMessageToVrc, toggleEnableSendReceivedMessageToVrc } = useEnableSendReceivedMessageToVrc();
return (
<CheckboxContainer
label={t("config_page.send_received_message_to_vrc.label")}
desc={t("config_page.send_received_message_to_vrc.desc")}
variable={currentEnableSendReceivedMessageToVrc}
toggleFunction={toggleEnableSendReceivedMessageToVrc}
/>
);
};

View File

@@ -1,4 +1,10 @@
.container {
display: flex;
gap: 6.4rem;
flex-direction: column;
}
.auto_export_message_logs_container {
display: flex;
width: 100%;
justify-content: space-between;
@@ -12,7 +18,7 @@
border-bottom: solid 0.1rem var(--dark_800_color);
}
.switch_section_container {
.auto_export_message_logs_switch_section_container {
display: flex;
width: 100%;
justify-content: space-between;