Merge pull request #588 from SuanmoSuanyangTechnology/feature/app_features_zy

fix(web): file download
This commit is contained in:
yingzhao
2026-03-17 17:04:29 +08:00
committed by GitHub

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-03 18:32:23
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-03 18:32:23
* @Last Modified time: 2026-03-17 17:02:46
*/
import { type FC, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
@@ -90,10 +90,10 @@ const PerceptualLastInfo: FC<{ type: 'last_visual' | 'last_listen' | 'last_text'
})
}
const handleDownload = () => {
if (!data.file_path) return
window.open(data.file_path, '_blank')
}
// const handleDownload = () => {
// if (!data.file_path) return
// window.open(data.file_path, '_blank')
// }
return (
<RbCard
@@ -121,7 +121,7 @@ const PerceptualLastInfo: FC<{ type: 'last_visual' | 'last_listen' | 'last_text'
<source src={data.file_path} />
</audio>
) : (
<div className="rb:text-[#5B6167] rb:cursor-pointer" onClick={handleDownload}>{data.file_name}</div>
<a className="rb:text-[#5B6167] rb:cursor-pointer" href={data.file_path} target="_blank">{data.file_name}</a>
)
) : (
<div className="rb:text-[#5B6167]">{t('empty.tableEmpty')}</div>