mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-25 23:20:19 +09:00
29 lines
677 B
TypeScript
29 lines
677 B
TypeScript
import { STTConfig } from "../store";
|
|
|
|
import Locale from "../locales";
|
|
import { ListItem } from "./ui-lib";
|
|
|
|
export function STTConfigList(props: {
|
|
sttConfig: STTConfig;
|
|
updateConfig: (updater: (config: STTConfig) => void) => void;
|
|
}) {
|
|
return (
|
|
<>
|
|
<ListItem
|
|
title={Locale.Settings.STT.Enable.Title}
|
|
subTitle={Locale.Settings.STT.Enable.SubTitle}
|
|
>
|
|
<input
|
|
type="checkbox"
|
|
checked={props.sttConfig.enable}
|
|
onChange={(e) =>
|
|
props.updateConfig(
|
|
(config) => (config.enable = e.currentTarget.checked),
|
|
)
|
|
}
|
|
></input>
|
|
</ListItem>
|
|
</>
|
|
);
|
|
}
|