Skip to content

Commit

Permalink
add version number to header (#788)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Hand authored May 25, 2017
1 parent 5fadb68 commit 62db9d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ui/archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ var networkUI = require('./components/network')
var sourcesUI = require('./components/sources')
var keyEl = require('./elements/key')
var pluralize = require('./elements/pluralize')
var version = require('./elements/version')
var pkg = require('../../package.json')

module.exports = archiveUI

Expand Down Expand Up @@ -40,6 +42,7 @@ function archiveUI (state) {
}

return output`
${version(pkg.version)}
${title}
${state.joinNetwork ? '\n' + networkUI(state) : ''}
Expand Down
5 changes: 5 additions & 0 deletions src/ui/elements/version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var chalk = require('chalk')

module.exports = function (version) {
return `${chalk.green(`dat v${version}`)}`
}

0 comments on commit 62db9d4

Please sign in to comment.