Merge branch 'master' of github.com:bitpay/mystery into feature/human-readable-times
Conflicts: package.json
This commit is contained in:
commit
237bb81e19
@ -3,7 +3,7 @@
|
|||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
|
|
||||||
// Load app configuration
|
// Load app configuration
|
||||||
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
||||||
module.exports = _.extend(
|
module.exports = _.extend(
|
||||||
require(__dirname + '/../config/env/all.js'),
|
require(__dirname + '/../config/env/all.js'),
|
||||||
require(__dirname + '/../config/env/' + process.env.NODE_ENV + '.js') || {});
|
require(__dirname + '/../config/env/' + process.env.NODE_ENV + '.js') || {});
|
||||||
|
|||||||
@ -61,7 +61,8 @@
|
|||||||
"should": "~2.1.1",
|
"should": "~2.1.1",
|
||||||
"view-helpers": "latest",
|
"view-helpers": "latest",
|
||||||
"socket.io": "~0.9.16",
|
"socket.io": "~0.9.16",
|
||||||
"moment": "~2.5.0"
|
"moment": "~2.5.0",
|
||||||
|
"sinon": "~1.7.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"grunt-contrib-watch": "latest",
|
"grunt-contrib-watch": "latest",
|
||||||
|
|||||||
@ -118,3 +118,54 @@ body {
|
|||||||
.fader.ng-enter-active {
|
.fader.ng-enter-active {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
padding: 1px 9px 2px;
|
||||||
|
font-size: 12.025px;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #999999;
|
||||||
|
-webkit-border-radius: 9px;
|
||||||
|
-moz-border-radius: 9px;
|
||||||
|
border-radius: 9px;
|
||||||
|
}
|
||||||
|
.badge:hover {
|
||||||
|
color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.badge-error {
|
||||||
|
background-color: #b94a48;
|
||||||
|
}
|
||||||
|
.badge-error:hover {
|
||||||
|
background-color: #953b39;
|
||||||
|
}
|
||||||
|
.badge-warning {
|
||||||
|
background-color: #f89406;
|
||||||
|
}
|
||||||
|
.badge-warning:hover {
|
||||||
|
background-color: #c67605;
|
||||||
|
}
|
||||||
|
.badge-success {
|
||||||
|
background-color: #468847;
|
||||||
|
}
|
||||||
|
.badge-success:hover {
|
||||||
|
background-color: #356635;
|
||||||
|
}
|
||||||
|
.badge-info {
|
||||||
|
background-color: #3a87ad;
|
||||||
|
}
|
||||||
|
.badge-info:hover {
|
||||||
|
background-color: #2d6987;
|
||||||
|
}
|
||||||
|
.badge-inverse {
|
||||||
|
background-color: #333333;
|
||||||
|
}
|
||||||
|
.badge-inverse:hover {
|
||||||
|
background-color: #1a1a1a;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,11 @@ angular.module('mystery.system').controller('IndexController', ['$scope', 'Globa
|
|||||||
$scope.blocks.unshift(block);
|
$scope.blocks.unshift(block);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.human_since = function(time) {
|
||||||
|
var m = moment.unix(time);
|
||||||
|
return m.max().fromNow();
|
||||||
|
}
|
||||||
|
|
||||||
$scope.index = function() {
|
$scope.index = function() {
|
||||||
Blocks.get({
|
Blocks.get({
|
||||||
limit: BLOCKS_DISPLAYED
|
limit: BLOCKS_DISPLAYED
|
||||||
|
|||||||
@ -3,14 +3,18 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3> New transactions </h3>
|
<h3> New transactions </h3>
|
||||||
<div class="alert alert-info fader" ng-repeat='tx in txs'>
|
<div class="panel fader" ng-repeat='tx in txs'>
|
||||||
<a href="#!/tx/{{tx.txid}}">{{tx.txid}}</a>
|
<a class="abreviate" href="#!/tx/{{tx.txid}}">{{tx.txid}}
|
||||||
|
<span class="badge badge-success">{{human_since(tx.time)}}</span>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3> New blocks </h3>
|
<h3> New blocks </h3>
|
||||||
<div class="alert alert-success fader" ng-repeat='b in blocks'>
|
<div class="panel fader" ng-repeat='b in blocks'>
|
||||||
<a href="#!/block/{{b.hash}}">{{b.hash}}</a>
|
<a href="#!/block/{{b.hash}}">{{b.hash}}
|
||||||
|
<span class="badge badge-success">{{human_since(b.time)}}</span>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
14
test/lib/PeerSync.js
Normal file
14
test/lib/PeerSync.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
'use strict';
|
||||||
|
var assert = require('assert');
|
||||||
|
var PeerSync = require('../../lib/PeerSync.js').class();
|
||||||
|
describe('Unit testing PeerSync', function() {
|
||||||
|
var ps = new PeerSync();
|
||||||
|
describe('#init()', function() {
|
||||||
|
it('should return with no errors', function() {
|
||||||
|
assert.doesNotThrow(function(){
|
||||||
|
ps.init();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user