mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-13 12:43:42 +08:00
fix: #336
This commit is contained in:
@@ -1186,7 +1186,7 @@ function _Chat() {
|
||||
}
|
||||
setIsLoading(true);
|
||||
chatStore
|
||||
.onUserInput(userInput, attachImages)
|
||||
.onUserInput(userInput, attachImages, attachFiles)
|
||||
.then(() => setIsLoading(false));
|
||||
setAttachImages([]);
|
||||
setAttachFiles([]);
|
||||
@@ -2192,7 +2192,7 @@ function _Chat() {
|
||||
<label
|
||||
className={clsx(styles["chat-input-panel-inner"], {
|
||||
[styles["chat-input-panel-inner-attach"]]:
|
||||
attachImages.length !== 0,
|
||||
attachImages.length !== 0 || attachFiles.length != 0,
|
||||
})}
|
||||
htmlFor="chat-input"
|
||||
>
|
||||
@@ -2237,6 +2237,32 @@ function _Chat() {
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
{attachFiles.length != 0 && (
|
||||
<div className={styles["attach-files"]}>
|
||||
{attachFiles.map((file, index) => {
|
||||
return (
|
||||
<div
|
||||
key={index}
|
||||
className={styles["attach-file"]}
|
||||
title={file.originalFilename}
|
||||
>
|
||||
<div className={styles["attach-file-info"]}>
|
||||
{file.originalFilename}
|
||||
</div>
|
||||
<div className={styles["attach-file-mask"]}>
|
||||
<DeleteFileButton
|
||||
deleteFile={() => {
|
||||
setAttachFiles(
|
||||
attachFiles.filter((_, i) => i !== index),
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
<IconButton
|
||||
icon={<SendWhiteIcon />}
|
||||
text={Locale.Chat.Send}
|
||||
|
||||
Reference in New Issue
Block a user