Merge pull request #144 from cmgustavo/feature/03no-hashbang-url
fix conflicts. Removed hashbang route for html5mode. Changed all urls an...
This commit is contained in:
commit
f289b57dd0
|
@ -1,4 +1,4 @@
|
|||
#footer(data-ng-include="'views/footer.html'", role='navigation')
|
||||
#footer(data-ng-include="'/views/footer.html'", role='navigation')
|
||||
|
||||
//script(type='text/javascript', src='/lib/jquery/jquery.min.js')
|
||||
//script(type='text/javascript', src='/lib/bootstrap/dist/js/bootstrap.min.js')
|
||||
|
|
|
@ -2,6 +2,7 @@ head
|
|||
meta(charset='utf-8')
|
||||
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
|
||||
meta(name='viewport', content='width=device-width,initial-scale=1.0')
|
||||
meta(name="fragment", content="!")
|
||||
|
||||
title= appName+' - '+title
|
||||
meta(http-equiv='Content-type', content='text/html;charset=UTF-8')
|
||||
|
|
|
@ -1 +1 @@
|
|||
.navbar.navbar-default.navbar-fixed-top(data-ng-include="'views/header.html'", role='navigation')
|
||||
.navbar.navbar-default.navbar-fixed-top(data-ng-include="'/views/header.html'", role='navigation')
|
||||
|
|
|
@ -52,7 +52,6 @@ module.exports = function(app, historicSync) {
|
|||
//routes should be at the last
|
||||
app.use(app.router);
|
||||
|
||||
|
||||
//Setting the fav icon and static folder
|
||||
app.use(express.favicon());
|
||||
app.use(express.static(config.root + '/public'));
|
||||
|
|
|
@ -4,7 +4,14 @@ module.exports = function(app, historicSync) {
|
|||
|
||||
//Home route
|
||||
var index = require('../app/controllers/index');
|
||||
|
||||
app.get('/', index.render);
|
||||
app.get('/blocks', index.render);
|
||||
app.get('/blocks-date/*', index.render);
|
||||
app.get('/block/*', index.render);
|
||||
app.get('/tx/*', index.render);
|
||||
app.get('/address/*', index.render);
|
||||
|
||||
app.get('/api/version', index.version);
|
||||
|
||||
//Block routes
|
||||
|
@ -34,5 +41,5 @@ module.exports = function(app, historicSync) {
|
|||
app.get('/api/status', st.show);
|
||||
|
||||
app.get('/api/sync', st.sync);
|
||||
|
||||
|
||||
};
|
||||
|
|
|
@ -5,32 +5,32 @@ angular.module('insight').config(['$routeProvider',
|
|||
function($routeProvider) {
|
||||
$routeProvider.
|
||||
when('/block/:blockHash', {
|
||||
templateUrl: 'views/block.html'
|
||||
templateUrl: '/views/block.html'
|
||||
}).
|
||||
when('/block-index/:blockHeight', {
|
||||
controller: 'BlocksController',
|
||||
template: 'Redirecting...'
|
||||
}).
|
||||
when('/tx/:txId', {
|
||||
templateUrl: 'views/transaction.html'
|
||||
templateUrl: '/views/transaction.html'
|
||||
}).
|
||||
when('/', {
|
||||
templateUrl: 'views/index.html'
|
||||
templateUrl: '/views/index.html'
|
||||
}).
|
||||
when('/blocks', {
|
||||
templateUrl: 'views/blocks/list.html'
|
||||
templateUrl: '/views/blocks/list.html'
|
||||
}).
|
||||
when('/blocks-date/:blockDate', {
|
||||
templateUrl: 'views/blocks/list.html'
|
||||
templateUrl: '/views/blocks/list.html'
|
||||
}).
|
||||
when('/address/:addrStr', {
|
||||
templateUrl: 'views/address.html'
|
||||
templateUrl: '/views/address.html'
|
||||
}).
|
||||
when('/status', {
|
||||
templateUrl: 'views/status.html'
|
||||
templateUrl: '/views/status.html'
|
||||
}).
|
||||
otherwise({
|
||||
templateUrl: 'views/404.html'
|
||||
templateUrl: '/views/404.html'
|
||||
});
|
||||
}
|
||||
]);
|
||||
|
@ -38,6 +38,7 @@ angular.module('insight').config(['$routeProvider',
|
|||
//Setting HTML5 Location Mode
|
||||
angular.module('insight').config(['$locationProvider',
|
||||
function($locationProvider) {
|
||||
$locationProvider.html5Mode(true);
|
||||
$locationProvider.hashPrefix('!');
|
||||
}
|
||||
]);
|
||||
|
|
|
@ -29,7 +29,7 @@ angular.module('insight')
|
|||
}])
|
||||
.directive('clipCopy', [function() {
|
||||
ZeroClipboard.config({
|
||||
moviePath: '../lib/zeroclipboard/ZeroClipboard.swf',
|
||||
moviePath: '/lib/zeroclipboard/ZeroClipboard.swf',
|
||||
trustedDomains: ['*'],
|
||||
allowScriptAccess: 'always',
|
||||
forceHandCursor: true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.element(document).ready(function() {
|
||||
//Then init the app
|
||||
// Init the app
|
||||
angular.bootstrap(document, ['insight']);
|
||||
});
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<qrcode size="160" data="{{address.addrStr}}"></qrcode>
|
||||
<div class="m10v">
|
||||
<button class="pull-right btn-copy" clip-copy="address.addrStr"><span class="glyphicon glyphicon-paperclip"></span></button>
|
||||
<a class="ellipsis" href="/#!/address/{{address.addrStr}}">{{address.addrStr}}</a>
|
||||
<a class="ellipsis" href="/address/{{address.addrStr}}">{{address.addrStr}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="m20v">
|
||||
|
|
|
@ -14,15 +14,15 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td class="small"> Hash </td>
|
||||
<td><a class="address ellipsis" href="/#!/block/{{block.hash}}">{{block.hash}}</a></td>
|
||||
<td><a class="address ellipsis" href="/block/{{block.hash}}">{{block.hash}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="small"> Previous Block</td>
|
||||
<td><a class="address ellipsis" href="/#!/block/{{block.previousblockhash}}">{{block.previousblockhash}}</a></td>
|
||||
<td><a class="address ellipsis" href="/block/{{block.previousblockhash}}">{{block.previousblockhash}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="small"> Next Block</td>
|
||||
<td><a class="address ellipsis" href="/#!/block/{{block.nextblockhash}}">{{block.nextblockhash}}</a></td>
|
||||
<td><a class="address ellipsis" href="/block/{{block.nextblockhash}}">{{block.nextblockhash}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="small">Merkle Root</td>
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
</div>
|
||||
<p class="lead text-center m20v">{{pagination.current}}</p>
|
||||
<div class="m50v">
|
||||
<a class="btn btn-primary" href="#!/blocks-date/{{pagination.prev}}"><small>← {{pagination.prev}}</small></a>
|
||||
<a class="btn btn-primary" href="#!/blocks-date/{{pagination.next}}"><small>{{pagination.next}} →</small></a>
|
||||
<a class="btn btn-primary" href="/blocks-date/{{pagination.prev}}"><small>← {{pagination.prev}}</small></a>
|
||||
<a class="btn btn-primary" href="/blocks-date/{{pagination.next}}"><small>{{pagination.next}} →</small></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -37,7 +37,7 @@
|
|||
<td colspan="5">Waiting for blocks...</td>
|
||||
</tr>
|
||||
<tr class="fader" data-ng-repeat='b in blocks'>
|
||||
<td><a href="/#!/block/{{b.hash}}">{{b.height}}</a></td>
|
||||
<td><a href="/block/{{b.hash}}">{{b.height}}</a></td>
|
||||
<td>{{b.time * 1000 | date:'medium'}}</td>
|
||||
<td>{{b.tx.length}}</td>
|
||||
<td>{{b.size}}</td>
|
||||
|
@ -45,6 +45,11 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<ul class="pager" data-ng-show="blocks.length">
|
||||
<li class="previous"><a href="/blocks-date/{{pagination.prev}}">← {{pagination.prev}}</a></li>
|
||||
<li class="disabled"><a href="#">{{pagination.current}}</a></li>
|
||||
<li class="next"><a href="/blocks-date/{{pagination.next}}">{{pagination.next}} →</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="text-center text-muted" data-ng-show="!blocks.length">No blocks yet.</h2>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class="container">
|
||||
<div data-ng-controller="HeaderController">
|
||||
<div class="navbar-header">
|
||||
<a class="insight navbar-brand" href="#!">Insight</a>
|
||||
<a class="insight navbar-brand" href="/">Insight</a>
|
||||
</div>
|
||||
<ul class="nav navbar-nav">
|
||||
<li data-ng-repeat="item in menu" ui-route="/{{item.link}}" data-ng-class="{active: $uiRoute}">
|
||||
<a href="#!/{{item.link}}">{{item.title}}</a>
|
||||
<a href="/{{item.link}}">{{item.title}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div data-ng-controller="SearchController">
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<tr data-ng-show="!blocks.length"><td colspan="5">Waiting for blocks...</td></tr>
|
||||
<tr class="fader" data-ng-repeat='b in blocks'>
|
||||
<td>
|
||||
<a href="/#!/block/{{b.hash}}">{{b.height}}</a>
|
||||
<a href="/block/{{b.hash}}">{{b.height}}</a>
|
||||
</td>
|
||||
<td>{{humanSince(b.time)}}</td>
|
||||
<td>{{b.tx.length}}</td>
|
||||
|
@ -51,7 +51,7 @@
|
|||
<tr data-ng-show="!txs.length"><td colspan="5">Waiting for transactions...</td></tr>
|
||||
<tr class="fader" data-ng-repeat='tx in txs'>
|
||||
<td>
|
||||
<a class="ellipsis" href="/#!/tx/{{tx.txid}}">{{tx.txid}}</a>
|
||||
<a class="ellipsis" href="/tx/{{tx.txid}}">{{tx.txid}}</a>
|
||||
</td>
|
||||
<td><span class="ellipsis">{{humanSince(tx.time)}}</span></td>
|
||||
<td>{{tx.valueOut}}</td>
|
||||
|
|
|
@ -46,11 +46,11 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>Height</td>
|
||||
<td class="text-right"><a href="/#!/block-index/{{txoutsetinfo.height}}">{{txoutsetinfo.height}}</a></td>
|
||||
<td class="text-right"><a href="/block-index/{{txoutsetinfo.height}}">{{txoutsetinfo.height}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Best Block</td>
|
||||
<td class="text-right"><a href="/#!/block/{{txoutsetinfo.bestblock}}">{{txoutsetinfo.bestblock}}</a></td>
|
||||
<td class="text-right"><a href="/block/{{txoutsetinfo.bestblock}}">{{txoutsetinfo.bestblock}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Transactions</td>
|
||||
|
@ -80,7 +80,7 @@
|
|||
<thead data-ng-include src="'/views/infoStatus.html'"> </thead>
|
||||
<tr>
|
||||
<td>Last Block Hash</td>
|
||||
<td class="text-right"><a href="/#!/block/{{lastblockhash}}">{{lastblockhash}}</a></td>
|
||||
<td class="text-right"><a href="/block/{{lastblockhash}}">{{lastblockhash}}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -102,7 +102,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>Blocks</td>
|
||||
<td class="text-right"><a href="/#!/block-index/{{info.blocks}}">{{info.blocks}}</a></td>
|
||||
<td class="text-right"><a href="/block-index/{{info.blocks}}">{{info.blocks}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Time Offset</td>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<td><strong>Block </strong>
|
||||
<td class="text-right">
|
||||
|
||||
<a href="/#!/block/{{tx.blockhash}}" class=" ellipsis">{{tx.blockhash}}</a>
|
||||
<a href="/block/{{tx.blockhash}}" class=" ellipsis">{{tx.blockhash}}</a>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="line-bot">
|
||||
<time class="pull-right">{{tx.time * 1000 | date:'medium'}}</time>
|
||||
<button class="btn-expand" data-ng-click="itemsExpanded = !itemsExpanded"><span class="glyphicon glyphicon-plus" data-ng-class="{'glyphicon-minus': itemsExpanded}" tooltip="Show/Hide items details" tooltip-placement="right"></span></button>
|
||||
<a href="/#!/tx/{{tx.txid}}">{{tx.txid}}</a>
|
||||
<a href="/tx/{{tx.txid}}">{{tx.txid}}</a>
|
||||
<button class="btn-copy" clip-copy="tx.txid"><span class="glyphicon glyphicon-paperclip"></span></button>
|
||||
</div>
|
||||
<div class="row line-mid">
|
||||
|
@ -20,7 +20,7 @@
|
|||
<div class="text-muted pull-right btc-value"><small>{{vin.value}} BTC</small></div>
|
||||
<div class="ellipsis">
|
||||
<span data-ng-show="vin.notAddr">{{vin.addr}}</span>
|
||||
<a href="/#!/address/{{vin.addr}}" data-ng-show="!vin.notAddr">{{vin.addr}}</a>
|
||||
<a href="/address/{{vin.addr}}" data-ng-show="!vin.notAddr">{{vin.addr}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<div class="ellipsis">
|
||||
<a class="glyphicon glyphicon-chevron-right" href="/#!/tx/{{vin.txid}}" title="Outpoint: {{vin.txid}},{{vin.vout}}"></a>
|
||||
<span data-ng-show="vin.notAddr">{{vin.addr}}</span>
|
||||
<a href="/#!/address/{{vin.addr}}" data-ng-show="!vin.notAddr">{{vin.addr}}</a>
|
||||
<a href="/address/{{vin.addr}}" data-ng-show="!vin.notAddr">{{vin.addr}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
|
@ -56,7 +56,7 @@
|
|||
<div class="text-muted pull-right btc-value"><small>{{vout.value}} BTC</small></div>
|
||||
<div class="ellipsis">
|
||||
<span data-ng-show="vout.notAddr">{{vout.addr}}</span>
|
||||
<a href="/#!/address/{{address}}" data-ng-show="!vout.notAddr" data-ng-repeat="address in vout.addr.split(',')">{{address}}</a>
|
||||
<a href="/address/{{address}}" data-ng-show="!vout.notAddr" data-ng-repeat="address in vout.addr.split(',')">{{address}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -64,7 +64,7 @@
|
|||
<div class="col-md-12 transaction-vin-vout">
|
||||
<div class="text-muted pull-right btc-value"><small>{{vout.value}} BTC</small></div>
|
||||
<div class="ellipsis">
|
||||
<a href="/#!/address/{{address}}" data-ng-repeat="address in vout.scriptPubKey.addresses">{{address}}</a>
|
||||
<a href="/address/{{address}}" data-ng-repeat="address in vout.scriptPubKey.addresses">{{address}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
|
|
Loading…
Reference in New Issue