feat: support voice input

This commit is contained in:
Hk-Gosuto
2024-03-13 23:02:28 +08:00
parent e66766f85d
commit bc061fe0f2
13 changed files with 361 additions and 94 deletions

View File

@@ -0,0 +1,28 @@
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>
</>
);
}