mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
disable form if too long
This commit is contained in:
1 parent
596f4b6436
commit
53f554d0be
1 file changed
+3
-3
@@ -179,9 +179,6 @@ function TtsModelListPage(props: Props) {
|
||||
listTtsCategories();
|
||||
}, [listModels, listTtsCategories]);
|
||||
|
||||
// TODO: I never did anything with this.
|
||||
let remainingCharactersButtonDisabled = false;
|
||||
|
||||
const handleChangeText = (ev: React.FormEvent<HTMLTextAreaElement>) => {
|
||||
const textValue = (ev.target as HTMLTextAreaElement).value;
|
||||
props.setTextBuffer(textValue);
|
||||
@@ -353,6 +350,9 @@ function TtsModelListPage(props: Props) {
|
||||
}
|
||||
}
|
||||
|
||||
// NB: If the text is too long, don't allow submission
|
||||
let remainingCharactersButtonDisabled = props.textBuffer.trim().length > 1024;
|
||||
|
||||
return (
|
||||
<motion.div initial="hidden" animate="visible" variants={container}>
|
||||
{bootstrapLanguageNotice}
|
||||
|
||||
Reference in new issue
Block a user