[Update] Config Page: Move section Send Message Button Type where others tab to appearance tab.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user