[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,
|
useUiLanguage,
|
||||||
useUiScaling,
|
useUiScaling,
|
||||||
useMessageLogUiScaling,
|
useMessageLogUiScaling,
|
||||||
|
useSendMessageButtonType,
|
||||||
useSelectedFontFamily,
|
useSelectedFontFamily,
|
||||||
useTransparency,
|
useTransparency,
|
||||||
} from "@logics_configs";
|
} from "@logics_configs";
|
||||||
@@ -18,6 +19,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
SliderContainer,
|
SliderContainer,
|
||||||
DropdownMenuContainer,
|
DropdownMenuContainer,
|
||||||
|
RadioButtonContainer,
|
||||||
} from "../_templates/Templates";
|
} from "../_templates/Templates";
|
||||||
|
|
||||||
export const Appearance = () => {
|
export const Appearance = () => {
|
||||||
@@ -26,6 +28,7 @@ export const Appearance = () => {
|
|||||||
<UiLanguageContainer />
|
<UiLanguageContainer />
|
||||||
<UiScalingContainer />
|
<UiScalingContainer />
|
||||||
<MessageLogUiScalingContainer />
|
<MessageLogUiScalingContainer />
|
||||||
|
<SendMessageButtonTypeContainer />
|
||||||
<FontFamilyContainer />
|
<FontFamilyContainer />
|
||||||
<TransparencyContainer />
|
<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 FontFamilyContainer = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { currentSelectedFontFamily, setSelectedFontFamily } = useSelectedFontFamily();
|
const { currentSelectedFontFamily, setSelectedFontFamily } = useSelectedFontFamily();
|
||||||
|
|||||||
@@ -2,12 +2,10 @@ import { useTranslation } from "react-i18next";
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
useEnableAutoClearMessageInputBox,
|
useEnableAutoClearMessageInputBox,
|
||||||
useSendMessageButtonType,
|
|
||||||
} from "@logics_configs";
|
} from "@logics_configs";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
CheckboxContainer,
|
CheckboxContainer,
|
||||||
RadioButtonContainer,
|
|
||||||
} from "../_templates/Templates";
|
} from "../_templates/Templates";
|
||||||
|
|
||||||
|
|
||||||
@@ -15,7 +13,6 @@ export const Others = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AutoClearMessageInputBoxContainer />
|
<AutoClearMessageInputBoxContainer />
|
||||||
<SendMessageButtonTypeContainer />
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -31,22 +28,4 @@ const AutoClearMessageInputBoxContainer = () => {
|
|||||||
toggleFunction={toggleEnableAutoClearMessageInputBox}
|
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}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
@@ -12,11 +12,11 @@ export { useSpeakerThreshold } from "./device/useSpeakerThreshold";
|
|||||||
export { useMessageLogUiScaling } from "./appearance/useMessageLogUiScaling";
|
export { useMessageLogUiScaling } from "./appearance/useMessageLogUiScaling";
|
||||||
export { useSelectedFontFamily } from "./appearance/useSelectedFontFamily";
|
export { useSelectedFontFamily } from "./appearance/useSelectedFontFamily";
|
||||||
export { useTransparency } from "./appearance/useTransparency";
|
export { useTransparency } from "./appearance/useTransparency";
|
||||||
|
export { useSendMessageButtonType } from "./others/useSendMessageButtonType";
|
||||||
export { useUiLanguage } from "./appearance/useUiLanguage";
|
export { useUiLanguage } from "./appearance/useUiLanguage";
|
||||||
export { useUiScaling } from "./appearance/useUiScaling";
|
export { useUiScaling } from "./appearance/useUiScaling";
|
||||||
|
|
||||||
export { useEnableAutoClearMessageInputBox } from "./others/useEnableAutoClearMessageInputBox";
|
export { useEnableAutoClearMessageInputBox } from "./others/useEnableAutoClearMessageInputBox";
|
||||||
export { useSendMessageButtonType } from "./others/useSendMessageButtonType";
|
|
||||||
|
|
||||||
export { useMicRecordTimeout } from "./transcription/useMicRecordTimeout";
|
export { useMicRecordTimeout } from "./transcription/useMicRecordTimeout";
|
||||||
export { useMicPhraseTimeout } from "./transcription/useMicPhraseTimeout";
|
export { useMicPhraseTimeout } from "./transcription/useMicPhraseTimeout";
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ import {
|
|||||||
useMicThreshold,
|
useMicThreshold,
|
||||||
useSpeakerThreshold,
|
useSpeakerThreshold,
|
||||||
useEnableAutoClearMessageInputBox,
|
useEnableAutoClearMessageInputBox,
|
||||||
useSendMessageButtonType,
|
|
||||||
useSelectedFontFamily,
|
useSelectedFontFamily,
|
||||||
useUiLanguage,
|
useUiLanguage,
|
||||||
useUiScaling,
|
useUiScaling,
|
||||||
useMessageLogUiScaling,
|
useMessageLogUiScaling,
|
||||||
|
useSendMessageButtonType,
|
||||||
useTransparency,
|
useTransparency,
|
||||||
useMicRecordTimeout,
|
useMicRecordTimeout,
|
||||||
useMicPhraseTimeout,
|
useMicPhraseTimeout,
|
||||||
@@ -237,6 +237,9 @@ export const useReceiveRoutes = () => {
|
|||||||
"/get/data/textbox_ui_scaling": updateMessageLogUiScaling,
|
"/get/data/textbox_ui_scaling": updateMessageLogUiScaling,
|
||||||
"/set/data/textbox_ui_scaling": updateMessageLogUiScaling,
|
"/set/data/textbox_ui_scaling": updateMessageLogUiScaling,
|
||||||
|
|
||||||
|
"/get/data/send_message_button_type": updateSendMessageButtonType,
|
||||||
|
"/set/data/send_message_button_type": updateSendMessageButtonType,
|
||||||
|
|
||||||
"/get/data/font_family": updateSelectedFontFamily,
|
"/get/data/font_family": updateSelectedFontFamily,
|
||||||
"/set/data/font_family": updateSelectedFontFamily,
|
"/set/data/font_family": updateSelectedFontFamily,
|
||||||
|
|
||||||
@@ -295,9 +298,6 @@ export const useReceiveRoutes = () => {
|
|||||||
"/get/data/auto_clear_message_box": updateEnableAutoClearMessageInputBox,
|
"/get/data/auto_clear_message_box": updateEnableAutoClearMessageInputBox,
|
||||||
"/set/enable/auto_clear_message_box": updateEnableAutoClearMessageInputBox,
|
"/set/enable/auto_clear_message_box": updateEnableAutoClearMessageInputBox,
|
||||||
"/set/disable/auto_clear_message_box": updateEnableAutoClearMessageInputBox,
|
"/set/disable/auto_clear_message_box": updateEnableAutoClearMessageInputBox,
|
||||||
|
|
||||||
"/get/data/send_message_button_type": updateSendMessageButtonType,
|
|
||||||
"/set/data/send_message_button_type": updateSendMessageButtonType,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const error_routes = {
|
const error_routes = {
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ export const { atomInstance: Atom_EnableAutomaticSpeakerThreshold, useHook: useS
|
|||||||
export const { atomInstance: Atom_UiLanguage, useHook: useStore_UiLanguage } = createAtomWithHook("en", "UiLanguage");
|
export const { atomInstance: Atom_UiLanguage, useHook: useStore_UiLanguage } = createAtomWithHook("en", "UiLanguage");
|
||||||
export const { atomInstance: Atom_UiScaling, useHook: useStore_UiScaling } = createAtomWithHook(100, "UiScaling");
|
export const { atomInstance: Atom_UiScaling, useHook: useStore_UiScaling } = createAtomWithHook(100, "UiScaling");
|
||||||
export const { atomInstance: Atom_MessageLogUiScaling, useHook: useStore_MessageLogUiScaling } = createAtomWithHook(100, "MessageLogUiScaling");
|
export const { atomInstance: Atom_MessageLogUiScaling, useHook: useStore_MessageLogUiScaling } = createAtomWithHook(100, "MessageLogUiScaling");
|
||||||
|
export const { atomInstance: Atom_SendMessageButtonType, useHook: useStore_SendMessageButtonType } = createAtomWithHook("show", "SendMessageButtonType");
|
||||||
export const { atomInstance: Atom_SelectedFontFamily, useHook: useStore_SelectedFontFamily } = createAtomWithHook("Yu Gothic UI", "SelectedFontFamily");
|
export const { atomInstance: Atom_SelectedFontFamily, useHook: useStore_SelectedFontFamily } = createAtomWithHook("Yu Gothic UI", "SelectedFontFamily");
|
||||||
export const { atomInstance: Atom_SelectableFontFamilyList, useHook: useStore_SelectableFontFamilyList } = createAtomWithHook({}, "SelectableFontFamilyList");
|
export const { atomInstance: Atom_SelectableFontFamilyList, useHook: useStore_SelectableFontFamilyList } = createAtomWithHook({}, "SelectableFontFamilyList");
|
||||||
export const { atomInstance: Atom_Transparency, useHook: useStore_Transparency } = createAtomWithHook(100, "Transparency");
|
export const { atomInstance: Atom_Transparency, useHook: useStore_Transparency } = createAtomWithHook(100, "Transparency");
|
||||||
@@ -190,8 +191,6 @@ export const { atomInstance: Atom_SpeakerMaxWords, useHook: useStore_SpeakerMaxW
|
|||||||
|
|
||||||
// Others
|
// Others
|
||||||
export const { atomInstance: Atom_EnableAutoClearMessageInputBox, useHook: useStore_EnableAutoClearMessageInputBox } = createAtomWithHook(true, "EnableAutoClearMessageInputBox");
|
export const { atomInstance: Atom_EnableAutoClearMessageInputBox, useHook: useStore_EnableAutoClearMessageInputBox } = createAtomWithHook(true, "EnableAutoClearMessageInputBox");
|
||||||
export const { atomInstance: Atom_SendMessageButtonType, useHook: useStore_SendMessageButtonType } = createAtomWithHook("show", "SendMessageButtonType");
|
|
||||||
|
|
||||||
|
|
||||||
export const { atomInstance: Atom_IsOpenedTranslatorSelector, useHook: useStore_IsOpenedTranslatorSelector } = createAtomWithHook(false, "IsOpenedTranslatorSelector");
|
export const { atomInstance: Atom_IsOpenedTranslatorSelector, useHook: useStore_IsOpenedTranslatorSelector } = createAtomWithHook(false, "IsOpenedTranslatorSelector");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user