[Update] Config Page: Move section Send Message Button Type where others tab to appearance tab.

This commit is contained in:
Sakamoto Shiina
2024-10-16 21:23:04 +09:00
parent 2c460bc8e5
commit 2cb4a41e64
5 changed files with 27 additions and 28 deletions

View File

@@ -7,6 +7,7 @@ import {
useUiLanguage,
useUiScaling,
useMessageLogUiScaling,
useSendMessageButtonType,
useSelectedFontFamily,
useTransparency,
} from "@logics_configs";
@@ -18,6 +19,7 @@ import {
import {
SliderContainer,
DropdownMenuContainer,
RadioButtonContainer,
} from "../_templates/Templates";
export const Appearance = () => {
@@ -26,6 +28,7 @@ export const Appearance = () => {
<UiLanguageContainer />
<UiScalingContainer />
<MessageLogUiScalingContainer />
<SendMessageButtonTypeContainer />
<FontFamilyContainer />
<TransparencyContainer />
</>
@@ -157,6 +160,24 @@ const MessageLogUiScalingContainer = () => {
);
};
const SendMessageButtonTypeContainer = () => {
const { t } = useTranslation();
const { currentSendMessageButtonType, setSendMessageButtonType } = useSendMessageButtonType();
return (
<RadioButtonContainer
label={t("config_page.send_message_button_type.label")}
selectFunction={setSendMessageButtonType}
options={[
{ radio_button_id: "hide", label: t("config_page.send_message_button_type.hide") },
{ radio_button_id: "show", label: t("config_page.send_message_button_type.show") },
{ radio_button_id: "show_and_disable_enter_key", label: t("config_page.send_message_button_type.show_and_disable_enter_key") },
]}
checked_variable={currentSendMessageButtonType}
/>
);
};
const FontFamilyContainer = () => {
const { t } = useTranslation();
const { currentSelectedFontFamily, setSelectedFontFamily } = useSelectedFontFamily();

View File

@@ -2,12 +2,10 @@ import { useTranslation } from "react-i18next";
import {
useEnableAutoClearMessageInputBox,
useSendMessageButtonType,
} from "@logics_configs";
import {
CheckboxContainer,
RadioButtonContainer,
} from "../_templates/Templates";
@@ -15,7 +13,6 @@ export const Others = () => {
return (
<>
<AutoClearMessageInputBoxContainer />
<SendMessageButtonTypeContainer />
</>
);
};
@@ -31,22 +28,4 @@ const AutoClearMessageInputBoxContainer = () => {
toggleFunction={toggleEnableAutoClearMessageInputBox}
/>
);
};
const SendMessageButtonTypeContainer = () => {
const { t } = useTranslation();
const { currentSendMessageButtonType, setSendMessageButtonType } = useSendMessageButtonType();
return (
<RadioButtonContainer
label={t("config_page.send_message_button_type.label")}
selectFunction={setSendMessageButtonType}
options={[
{ radio_button_id: "hide", label: t("config_page.send_message_button_type.hide") },
{ radio_button_id: "show", label: t("config_page.send_message_button_type.show") },
{ radio_button_id: "show_and_disable_enter_key", label: t("config_page.send_message_button_type.show_and_disable_enter_key") },
]}
checked_variable={currentSendMessageButtonType}
/>
);
};