<_Entry width="30rem" onChange={onChangeEntry} ui_variable={input_value}/>
diff --git a/src-ui/views/app/config_page/setting_section/setting_box/_components/word_filter/WordFilter.module.scss b/src-ui/views/app/config_page/setting_section/setting_box/_components/word_filter/WordFilter.module.scss
index 2fe9600d..842fee46 100644
--- a/src-ui/views/app/config_page/setting_section/setting_box/_components/word_filter/WordFilter.module.scss
+++ b/src-ui/views/app/config_page/setting_section/setting_box/_components/word_filter/WordFilter.module.scss
@@ -4,11 +4,13 @@
align-items: center;
flex-direction: column;
gap: 2rem;
+ width: 100%;
}
.list_section_wrapper {
display: flex;
+ justify-content: center;
flex-wrap: wrap;
width: 100%;
gap: 0.6rem;
diff --git a/src-ui/views/app/config_page/setting_section/setting_box/_templates/Templates.jsx b/src-ui/views/app/config_page/setting_section/setting_box/_templates/Templates.jsx
index 6faf882c..96378587 100644
--- a/src-ui/views/app/config_page/setting_section/setting_box/_templates/Templates.jsx
+++ b/src-ui/views/app/config_page/setting_section/setting_box/_templates/Templates.jsx
@@ -5,6 +5,7 @@ import { useStore_IsOpenedDropdownMenu, useStore_IsBreakPoint } from "@store";
import {
LabelComponent,
DropdownMenu,
+ MultiDropdownMenu,
Slider,
SwitchBox,
Entry,
@@ -22,13 +23,6 @@ import {
} from "../_components";
import { Checkbox } from "@common_components";
-const LabeledContainer = ({ children, label, desc, custom_class_name }) => (
-
-);
-
export const useOnMouseLeaveDropdownMenu = () => {
const { updateIsOpenedDropdownMenu } = useStore_IsOpenedDropdownMenu();
@@ -41,27 +35,87 @@ export const useOnMouseLeaveDropdownMenu = () => {
export const DropdownMenuContainer = (props) => {
const { onMouseLeaveFunction } = useOnMouseLeaveDropdownMenu();
+
return (
-
+
+
+ );
+};
+
+export const MultiDropdownMenuContainer = (props) => {
+ const { onMouseLeaveFunction } = useOnMouseLeaveDropdownMenu();
+
+ return (
+
+
+
+
+ );
+};
+
+const TemplatesContainerWrapper = ({
+ children,
+ add_break_point = true,
+ flex_column = false,
+ remove_border_bottom = false,
+ onMouseLeaveFunction = null,
+}) => {
+ const { currentIsBreakPoint } = useStore_IsBreakPoint();
+
+ const container_class = clsx(styles.container, {
+ [styles.is_break_point]: add_break_point && currentIsBreakPoint.data,
+ [styles.flex_column]: flex_column,
+ [styles.remove_border_bottom]: remove_border_bottom,
+ });
+
+ return (
+
+ {children}
);
};
-const CommonContainer = ({ Component, ...props }) => {
+const CommonContainer = ({
+ label_type = "label_component",
+ add_break_point = true,
+ flex_column = false,
+ remove_border_bottom = false,
+ Component,
+ ...props
+}) => {
const { currentIsBreakPoint } = useStore_IsBreakPoint();
- const container_class = clsx(styles.container, {
- [styles.is_break_point]: props.add_break_point ?? currentIsBreakPoint.data,
- });
+ const container_wrapper_props = {
+ add_break_point: add_break_point,
+ flex_column: flex_column,
+ remove_border_bottom: remove_border_bottom,
+ };
- return (
-
-
-
- );
+ if (label_type === "label_component") {
+ return (
+
+
+
+
+ );
+ } else if (label_type === "no_label") {
+ return (
+
+
+
+ );
+ } else if (label_type === "label_only") {
+ return (
+
+
+
+ );
+ }
};
+
+
export const SliderContainer = (props) => (
);
@@ -90,19 +144,14 @@ export const RadioButtonContainer = (props) => (
);
export const DeeplAuthKeyContainer = (props) => {
- const { currentIsBreakPoint } = useStore_IsBreakPoint();
- const container_class = clsx(styles.container, {
- [styles.is_break_point]: currentIsBreakPoint.data,
- });
-
return (
-
+
);
};
@@ -114,19 +163,22 @@ export const ComputeDeviceContainer = (props) => (
);
-export const WordFilterContainer = (props) => (
-
-);
+export const WordFilterContainer = (props) => {
+ return (
+ <>
+
+
+ >
+ );
+};
export const DownloadModelsContainer = (props) => (
@@ -134,13 +186,17 @@ export const DownloadModelsContainer = (props) => (
export const MessageFormatContainer = (props) => {
return (
-
+ <>
+
+
+ >
);
};
\ No newline at end of file
diff --git a/src-ui/views/app/config_page/setting_section/setting_box/_templates/Templates.module.scss b/src-ui/views/app/config_page/setting_section/setting_box/_templates/Templates.module.scss
index cab3118a..6767471d 100644
--- a/src-ui/views/app/config_page/setting_section/setting_box/_templates/Templates.module.scss
+++ b/src-ui/views/app/config_page/setting_section/setting_box/_templates/Templates.module.scss
@@ -8,7 +8,9 @@
&.flex_column {
flex-direction: column;
}
- border-bottom: solid 0.1rem var(--dark_800_color);
+ &:not(.remove_border_bottom) {
+ border-bottom: solid 0.1rem var(--dark_800_color);
+ }
&.is_break_point {
flex-direction: column;
@@ -17,10 +19,6 @@
}
}
-.label_only_section {
- width: 100%;
-}
-
.deepl_auth_key_label_section {
max-width: 34rem;
display: flex;
@@ -28,30 +26,4 @@
justify-content: space-between;
align-items: center;
gap: 1.4rem;
-}
-
-.message_format_section {
- width: 100%;
-}
-
-
-.word_filter_container {
- display: flex;
- width: 100%;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
- gap: 2rem;
- padding: 2rem;
-}
-
-.word_filter_switch_section {
- display: flex;
- width: 100%;
- justify-content: space-between;
- align-items: center;
-}
-
-.word_filter_label_wrapper {
- max-width: 34rem;
}
\ No newline at end of file
diff --git a/src-ui/views/app/config_page/setting_section/setting_box/device/Device.jsx b/src-ui/views/app/config_page/setting_section/setting_box/device/Device.jsx
index 9211bf37..fe468d57 100644
--- a/src-ui/views/app/config_page/setting_section/setting_box/device/Device.jsx
+++ b/src-ui/views/app/config_page/setting_section/setting_box/device/Device.jsx
@@ -9,11 +9,13 @@ import {
import {
useOnMouseLeaveDropdownMenu,
+ MultiDropdownMenuContainer,
} from "../_templates/Templates";
import {
LabelComponent,
DropdownMenu,
+ MultiDropdownMenu,
ThresholdComponent,
SwitchBox,
} from "../_components";
@@ -70,53 +72,41 @@ const Mic_Container = () => {
}
};
- const { currentIsBreakPoint } = useStore_IsBreakPoint();
- const device_container_class = clsx(styles.device_container, {
- [styles.is_break_point]: currentIsBreakPoint.data,
- });
-
return (
-
-
-
-
-
-
{t("config_page.device.label_auto_select")}
-
-
-
-
-
-
{t("config_page.device.label_host")}
-
-
-
-
-
{t("config_page.device.label_device")}
-
-
-
-
-
+
@@ -181,27 +171,21 @@ const Speaker_Container = () => {
-
-
-
{t("config_page.device.label_auto_select")}
-
-
-
-
-
{t("config_page.device.label_device")}
-
-
+
+
diff --git a/src-ui/views/app/config_page/setting_section/setting_box/device/Device.module.scss b/src-ui/views/app/config_page/setting_section/setting_box/device/Device.module.scss
index 5497b661..e88ae147 100644
--- a/src-ui/views/app/config_page/setting_section/setting_box/device/Device.module.scss
+++ b/src-ui/views/app/config_page/setting_section/setting_box/device/Device.module.scss
@@ -77,29 +77,4 @@
gap: 1.2rem;
justify-content: center;
align-items: center;
-}
-
-.device_dropdown_wrapper {
- display: flex;
- flex-direction: row;
- gap: 2.8rem;
-}
-
-.device_dropdown {
- display: flex;
- flex-direction: column;
- gap: 0.6rem;
- white-space: nowrap;
- max-width: 24rem;
- &.is_disabled {
- pointer-events: none;
- }
-}
-
-.device_secondary_label {
- padding-left: 0.2rem;
- padding-right: 0.4rem;
- font-size: 1.4rem;
- color: var(--dark_500_color);
- white-space: nowrap;
}
\ No newline at end of file
diff --git a/src-ui/views/app/config_page/setting_section/setting_box/plugins/plugins_control_component/PluginsControlComponent.jsx b/src-ui/views/app/config_page/setting_section/setting_box/plugins/plugins_control_component/PluginsControlComponent.jsx
index addd08c1..bf27774e 100644
--- a/src-ui/views/app/config_page/setting_section/setting_box/plugins/plugins_control_component/PluginsControlComponent.jsx
+++ b/src-ui/views/app/config_page/setting_section/setting_box/plugins/plugins_control_component/PluginsControlComponent.jsx
@@ -1,5 +1,5 @@
-import { SwitchBox } from "../../_components";
import { _DownloadButton } from "../../_components/_atoms/_download_button/_DownloadButton";
+import { _SwitchBox } from "../../_components/_atoms/_switch_box/_SwitchBox";
import styles from "./PluginsControlComponent.module.scss";
import { useI18n } from "@useI18n";
@@ -90,7 +90,7 @@ const DownloadedPluginControl = ({
return (
{t("config_page.plugins.no_latest_info")}
-
+ <_SwitchBox variable={option} toggleFunction={togglePlugin} />
);
} else if (plugin_status.is_latest_version_already) {
@@ -98,7 +98,7 @@ const DownloadedPluginControl = ({
{latest_version_label}
{t("config_page.plugins.using_latest_version")}
-
+ <_SwitchBox variable={option} toggleFunction={togglePlugin} />
);
} else if (plugin_status.is_latest_version_available) {
@@ -107,14 +107,14 @@ const DownloadedPluginControl = ({
{latest_version_label}
{t("config_page.plugins.available_latest_version")}
<_DownloadButton option={option} downloadStartFunction={downloadStartFunction} />
-
+ <_SwitchBox variable={option} toggleFunction={togglePlugin} />
);
} else {
return (
{t("config_page.plugins.available_latest_version")}
-
+ <_SwitchBox variable={option} toggleFunction={togglePlugin} />
);
}
diff --git a/src-ui/views/app/config_page/setting_section/setting_box/transcription/Transcription.jsx b/src-ui/views/app/config_page/setting_section/setting_box/transcription/Transcription.jsx
index 255183a8..3731dbad 100644
--- a/src-ui/views/app/config_page/setting_section/setting_box/transcription/Transcription.jsx
+++ b/src-ui/views/app/config_page/setting_section/setting_box/transcription/Transcription.jsx
@@ -11,6 +11,7 @@ import {
import {
WordFilterContainer,
DownloadModelsContainer,
+ MultiDropdownMenuContainer,
RadioButtonContainer,
DropdownMenuContainer,
SliderContainer,
@@ -20,6 +21,7 @@ import {
import {
DropdownMenu,
+ MultiDropdownMenu,
LabelComponent,
SectionLabelComponent,
} from "../_components";
@@ -281,8 +283,6 @@ const TranscriptionComputeDevice_Box = () => {
currentSelectedTranscriptionComputeType,
setSelectedTranscriptionComputeType,
} = useTranscription();
- const { onMouseLeaveFunction } = useOnMouseLeaveDropdownMenu();
- const { currentIsBreakPoint } = useStore_IsBreakPoint();
const list_for_ui = transformDeviceArray(currentSelectableTranscriptionComputeDeviceList.data);
@@ -364,50 +364,34 @@ const TranscriptionComputeDevice_Box = () => {
setSelectedTranscriptionComputeType(selected_data.selected_id);
};
- const device_container_class = clsx(styles.device_container, {
- [styles.is_break_point]: currentIsBreakPoint.data,
- });
-
const is_disabled_selector = currentSelectedTranscriptionComputeDevice.state === "pending" || currentSelectedTranscriptionComputeType.state === "pending";
return (
-
-
-
-
-
-
-
-
{t("config_page.common.compute_device.label_device")}
-
-
-
-
-
{t("config_page.common.compute_device.label_type")}
-
-
-
-
-
-
+
);
};
diff --git a/src-ui/views/app/config_page/setting_section/setting_box/transcription/Transcription.module.scss b/src-ui/views/app/config_page/setting_section/setting_box/transcription/Transcription.module.scss
index 8eed1df9..1170a41c 100644
--- a/src-ui/views/app/config_page/setting_section/setting_box/transcription/Transcription.module.scss
+++ b/src-ui/views/app/config_page/setting_section/setting_box/transcription/Transcription.module.scss
@@ -2,120 +2,4 @@
display: flex;
flex-direction: column;
gap: 6.4rem;
-}
-
-
-
-
-
-
-
-
-
-
-// [Fix me] Need refactor.
-.mic_container {
- display: flex;
- flex-direction: column;
- border-bottom: solid 0.1rem var(--dark_800_color);
- padding-bottom: 1rem;
-}
-
-.speaker_container {
- padding-top: 0rem;
-}
-
-.device_container {
- display: flex;
- width: 100%;
- justify-content: space-between;
- align-items: center;
- padding: 2rem;
- margin-bottom: 0rem;
- &.is_break_point {
- flex-direction: column;
- gap: 2rem;
- align-items: start;
- & .device_contents {
- display: flex;
- width: 100%;
- justify-content: space-between;
- padding-left: 0rem;
- }
- }
-}
-
-.threshold_container {
- padding: 2rem;
-}
-
-
-
-.threshold_container {
- display: flex;
- width: 100%;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
- gap: 2rem;
-}
-
-.threshold_switch_section {
- display: flex;
- width: 100%;
- justify-content: space-between;
- align-items: center;
- flex-shrink: 0;
-}
-
-.threshold_section {
- width: 100%;
-}
-
-
-
-
-.device_label {
- font-size: 1.8rem;
-}
-
-.device_contents {
- display: flex;
- width: 100%;
- justify-content: end;
- padding-left: 2rem;
- gap: 2rem;
-}
-
-.device_auto_select_wrapper {
- display: flex;
- flex-direction: column;
- gap: 1.2rem;
- justify-content: center;
- align-items: center;
-}
-
-.device_dropdown_wrapper {
- display: flex;
- flex-direction: row;
- gap: 2.8rem;
-}
-
-.device_dropdown {
- display: flex;
- flex-direction: column;
- gap: 0.6rem;
- white-space: nowrap;
- max-width: 24rem;
- &.is_disabled {
- pointer-events: none;
- }
-}
-
-.device_secondary_label {
- padding-left: 0.2rem;
- padding-right: 0.4rem;
- font-size: 1.4rem;
- color: var(--dark_500_color);
- white-space: nowrap;
}
\ No newline at end of file
diff --git a/src-ui/views/app/config_page/setting_section/setting_box/translation/Translation.jsx b/src-ui/views/app/config_page/setting_section/setting_box/translation/Translation.jsx
index 459b4e10..cb5ad232 100644
--- a/src-ui/views/app/config_page/setting_section/setting_box/translation/Translation.jsx
+++ b/src-ui/views/app/config_page/setting_section/setting_box/translation/Translation.jsx
@@ -11,12 +11,14 @@ import {
import {
DownloadModelsContainer,
DeeplAuthKeyContainer,
+ MultiDropdownMenuContainer,
useOnMouseLeaveDropdownMenu,
} from "../_templates/Templates";
import {
DropdownMenu,
+ MultiDropdownMenu,
LabelComponent,
} from "../_components";
@@ -89,8 +91,6 @@ const TranslationComputeDevice_Box = () => {
currentSelectedTranslationComputeType,
setSelectedTranslationComputeType,
} = useTranslation();
- const { onMouseLeaveFunction } = useOnMouseLeaveDropdownMenu();
- const { currentIsBreakPoint } = useStore_IsBreakPoint();
const list_for_ui = transformDeviceArray(currentSelectableTranslationComputeDeviceList.data);
@@ -172,50 +172,34 @@ const TranslationComputeDevice_Box = () => {
setSelectedTranslationComputeType(selected_data.selected_id);
};
- const device_container_class = clsx(styles.device_container, {
- [styles.is_break_point]: currentIsBreakPoint.data,
- });
-
const is_disabled_selector = currentSelectedTranslationComputeDevice.state === "pending" || currentSelectedTranslationComputeType.state === "pending";
return (
-
-
-
-
-
-
-
-
{t("config_page.common.compute_device.label_device")}
-
-
-
-
-
{t("config_page.common.compute_device.label_type")}
-
-
-
-
-
-
+
);
};
diff --git a/src-ui/views/app/config_page/setting_section/setting_box/translation/Translation.module.scss b/src-ui/views/app/config_page/setting_section/setting_box/translation/Translation.module.scss
index 7486c466..e69de29b 100644
--- a/src-ui/views/app/config_page/setting_section/setting_box/translation/Translation.module.scss
+++ b/src-ui/views/app/config_page/setting_section/setting_box/translation/Translation.module.scss
@@ -1,106 +0,0 @@
-// [Fix me] Need refactor.
-.mic_container {
- display: flex;
- flex-direction: column;
- border-bottom: solid 0.1rem var(--dark_800_color);
- padding-bottom: 1rem;
-}
-
-.speaker_container {
- padding-top: 0rem;
-}
-
-.device_container {
- display: flex;
- width: 100%;
- justify-content: space-between;
- align-items: center;
- padding: 2rem;
- margin-bottom: 0rem;
- &.is_break_point {
- flex-direction: column;
- gap: 2rem;
- align-items: start;
- & .device_contents {
- display: flex;
- width: 100%;
- justify-content: space-between;
- padding-left: 0rem;
- }
- }
-}
-
-.threshold_container {
- padding: 2rem;
-}
-
-
-
-.threshold_container {
- display: flex;
- width: 100%;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
- gap: 2rem;
-}
-
-.threshold_switch_section {
- display: flex;
- width: 100%;
- justify-content: space-between;
- align-items: center;
- flex-shrink: 0;
-}
-
-.threshold_section {
- width: 100%;
-}
-
-
-
-
-.device_label {
- font-size: 1.8rem;
-}
-
-.device_contents {
- display: flex;
- width: 100%;
- justify-content: end;
- padding-left: 2rem;
- gap: 2rem;
-}
-
-.device_auto_select_wrapper {
- display: flex;
- flex-direction: column;
- gap: 1.2rem;
- justify-content: center;
- align-items: center;
-}
-
-.device_dropdown_wrapper {
- display: flex;
- flex-direction: row;
- gap: 2.8rem;
-}
-
-.device_dropdown {
- display: flex;
- flex-direction: column;
- gap: 0.6rem;
- white-space: nowrap;
- max-width: 24rem;
- &.is_disabled {
- pointer-events: none;
- }
-}
-
-.device_secondary_label {
- padding-left: 0.2rem;
- padding-right: 0.4rem;
- font-size: 1.4rem;
- color: var(--dark_500_color);
- white-space: nowrap;
-}
\ No newline at end of file