diff --git a/src-ui/views/app/config_page/setting_section/setting_box/_components/dropdown_menu/DropdownMenu.jsx b/src-ui/views/app/config_page/setting_section/setting_box/_components/dropdown_menu/DropdownMenu.jsx index fb4e0d7e..3de43b00 100644 --- a/src-ui/views/app/config_page/setting_section/setting_box/_components/dropdown_menu/DropdownMenu.jsx +++ b/src-ui/views/app/config_page/setting_section/setting_box/_components/dropdown_menu/DropdownMenu.jsx @@ -13,8 +13,8 @@ export const DropdownMenu = (props) => { export const MultiDropdownMenu = (props) => { return (
- {props.settings.map((dropdown_props, index) => ( - + {props.dropdown_settings.map((dropdown_props, index) => ( + ))}
); 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 a8ef6b6c..fc6960d0 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, @@ -42,6 +43,22 @@ export const DropdownMenuContainer = (props) => { ); }; +export const MultiDropdownMenuContainer = (props) => { + const { onMouseLeaveFunction } = useOnMouseLeaveDropdownMenu(); + const { currentIsBreakPoint } = useStore_IsBreakPoint(); + + const container_class = clsx(styles.container, { + [styles.is_break_point]: currentIsBreakPoint.data, + }); + + return ( +
+ + +
+ ); +}; + const TemplatesContainerWrapper = ({ children, add_break_point = true, 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 c0c905cc..c40a2f8e 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 @@ -90,7 +90,7 @@ const Mic_Container = () => { /> { currentSelectedTranscriptionComputeType, setSelectedTranscriptionComputeType, } = useTranscription(); - const { onMouseLeaveFunction } = useOnMouseLeaveDropdownMenu(); - const { currentIsBreakPoint } = useStore_IsBreakPoint(); const list_for_ui = transformDeviceArray(currentSelectableTranscriptionComputeDeviceList.data); @@ -365,46 +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 ( -
-
- -
- -
-
-
+ ); }; 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..be78c8af 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 @@ -85,37 +85,4 @@ 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 fae21999..a612eaba 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,6 +11,7 @@ import { import { DownloadModelsContainer, DeeplAuthKeyContainer, + MultiDropdownMenuContainer, useOnMouseLeaveDropdownMenu, } from "../_templates/Templates"; @@ -180,39 +181,31 @@ const TranslationComputeDevice_Box = () => { const is_disabled_selector = currentSelectedTranslationComputeDevice.state === "pending" || currentSelectedTranslationComputeType.state === "pending"; return ( -
-
- -
- -
-
-
+ ); }; 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..993e5256 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 @@ -55,52 +55,4 @@ .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