mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-01 15:10:44 +00:00
Quick basic wallet interface implementation
This commit is contained in:
@@ -5,6 +5,7 @@ angular.module('myApp', [
|
||||
'ngRoute',
|
||||
'ui-notification',
|
||||
'myApp.home',
|
||||
'myApp.wallets',
|
||||
'myApp.about',
|
||||
'myApp.settings',
|
||||
'myApp.version'
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="#!/">Dashboard</a></li>
|
||||
<li><a href="#!/wallets">Wallets</a></li>
|
||||
<li><a href="#!/about">About</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
|
||||
@@ -1,28 +1,17 @@
|
||||
<h2>Dashboard</h2>
|
||||
<h3>Your current standings</h3>
|
||||
<div ng-repeat="exchange in exchanges">
|
||||
<h4>{{exchange.exchangeName}}</h4>
|
||||
<h2>Wallets</h2>
|
||||
<h3>All your currency, all in one place</h3>
|
||||
<div ng-repeat="wallet in wallets">
|
||||
<h4>{{wallet.ExchangeName}}</h4>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Currency</th>
|
||||
<th>Last</th>
|
||||
<th>High</th>
|
||||
<th>Low</th>
|
||||
<th>Volume</th>
|
||||
<th>Bid</th>
|
||||
<th>Ask</th>
|
||||
<th>Currency Name</th>
|
||||
<th>Total</th>
|
||||
<th>Hold</th>
|
||||
</tr>
|
||||
<tr ng-repeat="value in exchange.exchangeValues">
|
||||
<td>{{value.CryptoCurrency}}</td>
|
||||
<td>{{value.Last}}</td>
|
||||
<td>{{value.High}}</td>
|
||||
<td>{{value.Low}}</td>
|
||||
<td>{{value.Volume}}</td>
|
||||
<td>{{value.Bid}}</td>
|
||||
<td>{{value.Ask}}</td>
|
||||
<tr ng-repeat="value in wallet.Currencies">
|
||||
<td>{{value.CurrencyName}}</td>
|
||||
<td>{{value.TotalValue}}</td>
|
||||
<td>{{value.Hold}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div ng-repeat="value in exchange.exchangeValues">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,23 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('myApp.home', ['ngRoute'])
|
||||
angular.module('myApp.wallets', ['ngRoute'])
|
||||
|
||||
.config(['$routeProvider', function($routeProvider) {
|
||||
$routeProvider.when('/', {
|
||||
templateUrl: '/views/home/home.html',
|
||||
controller: 'HomeController'
|
||||
templateUrl: '/views/wallets/wallets.html',
|
||||
controller: 'WalletsController'
|
||||
});
|
||||
}])
|
||||
|
||||
.controller('HomeController', function ($scope, $http, Notification) {
|
||||
.controller('WalletsController', function ($scope, $http, Notification) {
|
||||
$scope.getDashboardData = function() {
|
||||
$http({
|
||||
method: 'GET',
|
||||
url: '/data/all-enabled-currencies'
|
||||
url: '/data/all-enabled-exchange-account-info'
|
||||
}).
|
||||
success(function (data, status, headers, config) {
|
||||
$scope.exchanges = data.data;
|
||||
Notification.info("Retrieved latest data");
|
||||
$scope.wallets = data.data;
|
||||
Notification.info("Got your wallet!");
|
||||
}).
|
||||
error(function (data, status, headers, config) {
|
||||
console.log('error');
|
||||
|
||||
Reference in New Issue
Block a user