This repository has been archived by the owner on Dec 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add placeholder for last modified time on archive page #521 * Add modified time
- Loading branch information
Showing
4 changed files
with
31 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,6 @@ | ||
var path = require('path') | ||
var yofs = require('yo-fs') | ||
|
||
module.exports = function ui (root, entries, onclick) { | ||
var lookup = {} | ||
for (var i in entries) { | ||
var entry = entries[i] | ||
if (entry.name[0] === '/') entry.name = entry.name.substring(1, entry.name.length) | ||
lookup[entry.name] = entry | ||
var dir = path.dirname(entry.name) | ||
if (!lookup[dir]) { | ||
lookup[dir] = { | ||
type: 'directory', | ||
name: dir, | ||
length: 0 | ||
} | ||
} | ||
} | ||
var vals = Object.keys(lookup).map(key => lookup[key]) | ||
var tree = yofs(root, vals, onclick) | ||
var tree = yofs(root, entries, onclick) | ||
return tree.widget | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters