Skip to content

Commit

Permalink
changed time format to YYYY-MM-DD HH:mm:ss
Browse files Browse the repository at this point in the history
only show directory in Path

Fixes jupyterlab#7352
  • Loading branch information
mwojton committed Nov 10, 2019
1 parent ad4d929 commit 322a872
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions packages/filebrowser/src/listing.ts
Expand Up @@ -1840,17 +1840,23 @@ export namespace DirListing {
hoverText += '\nSize: ' + Private.formatFileSize(model.size, 1, 1024);
}
if (model.path) {
hoverText += '\nPath: ' + model.path.substr(0, 50);
if (model.path.length > 50) {
hoverText += '...';
let dirname = PathExt.dirname(model.path);
if (dirname) {
hoverText += '\nPath: ' + dirname.substr(0, 50);
if (dirname.length > 50) {
hoverText += '...';
}
}
}
if (model.created) {
hoverText += '\nCreated: ' + Time.formatHuman(new Date(model.created));
hoverText +=
'\nCreated: ' +
Time.format(new Date(model.created), 'YYYY-MM-DD HH:mm:ss');
}
if (model.last_modified) {
hoverText +=
'\nModified: ' + Time.formatHuman(new Date(model.last_modified));
'\nModified: ' +
Time.format(new Date(model.last_modified), 'YYYY-MM-DD HH:mm:ss');
}

node.title = hoverText;
Expand Down

0 comments on commit 322a872

Please sign in to comment.