2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 13:47:15 +08:00

feat: 优化压缩解压错误输出

This commit is contained in:
耗子
2024-10-28 02:56:53 +08:00
parent 9ef56f6ede
commit 899ce1fa18
4 changed files with 46 additions and 24 deletions

View File

@@ -32,10 +32,12 @@ const getIconByExt = (ext: string) => {
case 'ape':
return 'bi:file-earmark-music'
case 'zip':
case 'rar':
case '7z':
case 'bz2':
case 'tar':
case 'gz':
case 'tgz':
case 'xz':
case '7z':
return 'bi:file-earmark-zip'
case 'doc':
case 'docx':
@@ -288,7 +290,7 @@ const getFilename = (path: string) => {
const isCompress = (name: string) => {
const ext = getExt(name)
return ['zip', 'rar', '7z', 'tar', 'gz'].includes(ext)
return ['zip', 'bz2', 'tar', 'gz', 'tgz', 'xz', '7z'].includes(ext)
}
const formatPercent = (num: any) => {