[Update] Config Page: Translation, Transcription Tab. Add Select CTranslate2/Whisper Compute Device section.

This commit is contained in:
Sakamoto Shiina
2024-12-03 10:25:53 +09:00
parent e6a7ff03aa
commit 7d8a2cacd0
14 changed files with 297 additions and 9 deletions

View File

@@ -4,12 +4,21 @@ import { Topbar } from "./topbar/Topbar.jsx";
import { SidebarSection } from "./sidebar_section/SidebarSection.jsx";
import { SettingSection } from "./setting_section/SettingSection.jsx";
import { useSoftwareVersion } from "@logics_configs/useSoftwareVersion";
import { useSoftwareVersion } from "@logics_configs";
import { useComputeMode } from "@logics_common";
import { useTranslation } from "react-i18next";
export const ConfigPage = () => {
const { currentSoftwareVersion } = useSoftwareVersion();
const { t } = useTranslation();
const { currentSoftwareVersion } = useSoftwareVersion();
const { currentComputeMode } = useComputeMode();
const version_label = currentComputeMode.data === "cpu"
? t("config_page.version", { version: currentSoftwareVersion.data })
: currentComputeMode.data === "cuda"
? t("config_page.version", { version: currentSoftwareVersion.data }) + " CUDA"
: t("config_page.version", { version: currentSoftwareVersion.data });
return (
<div className={styles.page}>
@@ -19,11 +28,7 @@ export const ConfigPage = () => {
<SidebarSection />
<SettingSection />
</div>
<p className={styles.software_version}>
{
t("config_page.version", {version: currentSoftwareVersion.data})
}
</p>
<p className={styles.software_version}>{version_label}</p>
</div>
</div>
);