Compare commits

...

2 Commits

Author SHA1 Message Date
CrescentLeaf
be27894f95 todo: sendingFileSnackbar died 2025-11-14 23:59:55 +08:00
CrescentLeaf
9b0d91a615 无意义 2025-11-14 22:35:00 +08:00
2 changed files with 12 additions and 1 deletions

View File

@@ -53,8 +53,8 @@ class Client {
})
}
}
s.open = false
clearTimeout(id)
s.open = false
}
auth()
})

View File

@@ -183,6 +183,17 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC
const cachedFiles = React.useRef({} as { [fileName: string]: ArrayBuffer })
const cachedFileNamesCount = React.useRef({} as { [fileName: string]: number })
async function sendMessage() {
const sendingFilesSnackbar = snackbar({
message: `上传文件到 [${chatInfo.title}]...`,
placement: 'top',
autoCloseDelay: 0,
})
let i = 1
let i2 = 0
const sendingFilesSnackbarId = setInterval(() => {
sendingFilesSnackbar.textContent = `上传第 ${i2}/${Object.keys(cachedFiles.current).length} 文件到 [${chatInfo.title}]... ()`
i++
}, 1000)
try {
let text = inputRef.current!.value
if (text.trim() == '') return