[Update] Config Page: Advanced Settings Tab. Add modal and section that is switchable between CPU and CUDA version.

This commit is contained in:
Sakamoto Shiina
2024-12-20 01:28:44 +09:00
parent 0eec985a62
commit 1d615ab97d
12 changed files with 238 additions and 47 deletions

View File

@@ -15,6 +15,7 @@ import {
import OpenFolderSvg from "@images/open_folder.svg?react";
import HelpSvg from "@images/help.svg?react";
export const AdvancedSettings = () => {
return (
@@ -22,6 +23,7 @@ export const AdvancedSettings = () => {
<OscIpAddressContainer />
<OscPortContainer />
<OpenConfigFolderContainer />
<OpenSwitchComputeDeviceModalContainer />
</>
);
};
@@ -92,4 +94,23 @@ const OpenConfigFolderContainer = () => {
/>
</>
);
};
import { useStore_OpenedQuickSetting } from "@store";
const OpenSwitchComputeDeviceModalContainer = () => {
const { t } = useTranslation();
const { updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
const onClickFunction = () => {
updateOpenedQuickSetting("switch_compute_device");
};
return (
<>
<ActionButtonContainer
label={t("config_page.advanced_settings.switch_compute_device.label")}
IconComponent={HelpSvg}
onclickFunction={onClickFunction}
/>
</>
);
};