1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-17 15:53:28 +00:00

non-display last update time, if mtime == 0 (#4068)

This commit is contained in:
Leo
2019-09-09 11:34:12 +08:00
committed by Daniel Pan
parent bce32fb11d
commit 0a6f724a96

View File

@@ -8,7 +8,11 @@ class Dirent {
this.name = json.name; this.name = json.name;
this.type = json.type; this.type = json.type;
this.mtime = json.mtime; this.mtime = json.mtime;
this.mtime_relative = moment.unix(json.mtime).fromNow(); if (json.mtime == 0) {
this.mtime_relative = '';
} else {
this.mtime_relative = moment.unix(json.mtime).fromNow();
}
this.permission = json.permission || 'rw'; this.permission = json.permission || 'rw';
this.isSelected = false; // is check or not this.isSelected = false; // is check or not
this.starred = json.starred || false; this.starred = json.starred || false;