1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 15:19:06 +00:00

add mtime_relative param (#2756)

This commit is contained in:
杨顺强
2019-01-04 13:53:30 +08:00
committed by Daniel Pan
parent e01fd8298a
commit c5c419b915
2 changed files with 3 additions and 2 deletions

View File

@@ -475,7 +475,7 @@ class DirentListItem extends React.Component {
} }
</td> </td>
<td className="file-size">{dirent.size && dirent.size}</td> <td className="file-size">{dirent.size && dirent.size}</td>
<td className="last-update" dangerouslySetInnerHTML={{__html: dirent.mtime}}></td> <td className="last-update">{dirent.mtime_relative}</td>
</tr> </tr>
{this.state.isMoveDialogShow && {this.state.isMoveDialogShow &&
<ModalPortal> <ModalPortal>

View File

@@ -7,7 +7,8 @@ class Dirent {
this.id = json.id; this.id = json.id;
this.name = json.name; this.name = json.name;
this.type = json.type; this.type = json.type;
this.mtime = moment.unix(json.mtime).fromNow(); this.mtime = json.mtime;
this.mtime_relative = moment.unix(json.mtime).fromNow();
this.permission = json.permission; this.permission = json.permission;
this.isSelected = false; // is check or not this.isSelected = false; // is check or not
if (json.type === 'file') { if (json.type === 'file') {