1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 23:02:26 +00:00

Fix create thumbnail error (#6798)

* fix create thumbnail in dirent grid item

* fix create thumbnail in dirent list item

* optimise codes

* change thumbnail start

* change 2 thumbnail centers
This commit is contained in:
Michael An
2024-09-20 14:29:37 +08:00
committed by GitHub
parent 6746e5ab1d
commit f1a180b23d
8 changed files with 346 additions and 174 deletions

View File

@@ -20,8 +20,8 @@ class Dirent {
this.has_been_shared_out = false;
}
if (json.type === 'file') {
this.size_original = json.size;
this.size = Utils.bytesToSize(json.size);
this.size_original = json.size_original || json.size;
this.size = (typeof json.size === 'number') ? Utils.bytesToSize(json.size) : json.size;
this.is_locked = json.is_locked || false;
this.is_freezed = json.is_freezed || false;
this.lock_time = json.lock_time || '';