Skip to content

Commit 4ea846c

Browse files
committed
feat: v.1.5.7
1 parent 46e670f commit 4ea846c

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# 更新日志
22

3+
## 1.5.7
4+
5+
- 修复:当大文件加载提示超过1G错误展示成1T
6+
- 其他:修改默认权限为管理员可用,防止权限越权
7+
38
## 1.5.6
49

510
- 优化:当 path 为目录时,打开目录

app/app/ui/config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"icon": "images/icon_{0}.png",
66
"type": "iframe",
77
"url": "/cgi/ThirdParty/code.editor/index.cgi/",
8-
"allUsers": true,
8+
"allUsers": false,
99
"noDisplay": false,
1010
"fileTypes": [
1111
"text",

frontend/src/utils/file.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ export const getSize = (byte: number) => {
3838
return `${Number(MB.toFixed(2))} MB`
3939
}
4040

41-
const TB = MB / 1024
41+
const GB = MB / 1024
42+
if (GB < 1024) {
43+
return `${Number(GB.toFixed(2))} GB`
44+
}
45+
46+
const TB = GB / 1024
4247
if (TB < 1024) {
4348
return `${Number(TB.toFixed(2))} TB`
4449
}

0 commit comments

Comments
 (0)