diff --git a/web/app/app.js b/web/app/app.js
index f108a0b3..e0d3e438 100644
--- a/web/app/app.js
+++ b/web/app/app.js
@@ -2,28 +2,29 @@
// Declare app level module which depends on views, and components
angular.module('myApp', [
- 'ngRoute',
- 'ui-notification',
- 'myApp.home',
- 'myApp.wallets',
- 'myApp.settings',
- 'myApp.version',
- 'myApp.buy',
- 'myApp.sell',
- 'myApp.stringUtils'
+ 'ngRoute',
+ 'ui-notification',
+ 'myApp.home',
+ 'myApp.wallets',
+ 'myApp.settings',
+ 'myApp.version',
+ 'myApp.buy',
+ 'myApp.sell',
+ 'myApp.enabledExchanges',
+ 'myApp.stringUtils'
]).
-config(['$locationProvider', '$routeProvider' ,'NotificationProvider', function($locationProvider, $routeProvider, NotificationProvider) {
- NotificationProvider.setOptions({
- delay: 5000,
- startTop: 60,
- startRight: 10,
- verticalSpacing: 10,
- horizontalSpacing: 20,
- positionX: 'right',
- positionY: 'top'
- });
-
- $locationProvider.hashPrefix('!');
+config(['$locationProvider', '$routeProvider', 'NotificationProvider', function($locationProvider, $routeProvider, NotificationProvider) {
+ NotificationProvider.setOptions({
+ delay: 5000,
+ startTop: 60,
+ startRight: 10,
+ verticalSpacing: 10,
+ horizontalSpacing: 20,
+ positionX: 'right',
+ positionY: 'top'
+ });
- $routeProvider.otherwise({redirectTo: '/'});
-}]);
+ $locationProvider.hashPrefix('!');
+
+ $routeProvider.otherwise({ redirectTo: '/' });
+}]);
\ No newline at end of file
diff --git a/web/app/components/enabled-exchanges/enabled-exchanges.html b/web/app/components/enabled-exchanges/enabled-exchanges.html
new file mode 100644
index 00000000..95cb784f
--- /dev/null
+++ b/web/app/components/enabled-exchanges/enabled-exchanges.html
@@ -0,0 +1,30 @@
+
+
All enabled currencies
+
+
\ No newline at end of file
diff --git a/web/app/components/enabled-exchanges/enabled-exchanges.js b/web/app/components/enabled-exchanges/enabled-exchanges.js
new file mode 100644
index 00000000..537055b7
--- /dev/null
+++ b/web/app/components/enabled-exchanges/enabled-exchanges.js
@@ -0,0 +1,29 @@
+angular.module('myApp.enabledExchanges', []).component('enabledexchanges', {
+ templateUrl: '/components/enabled-exchanges/enabled-exchanges.html',
+ controller: 'EnabledExchangesController',
+ controller: function($scope, $http, Notification, $rootScope) {
+ $scope.selected = {};
+ $scope.getDashboardData = function() {
+ $http({
+ method: 'GET',
+ url: '/data/all-enabled-currencies'
+ }).
+ success(function(data, status, headers, config) {
+ $scope.exchanges = data.data;
+ $scope.reloadDashboardWithExchangeCurrency($scope.exchanges[0], $scope.exchanges[0].exchangeValues[0]);
+ Notification.info("Retrieved latest data");
+ }).
+ error(function(data, status, headers, config) {
+ console.log('error');
+ });
+ };
+
+ $scope.reloadDashboardWithExchangeCurrency = function(exchange, value) {
+ $scope.selected.Exchange = exchange;
+ $scope.selected.Currency = value;
+ $rootScope.$emit('CurrencyChanged', $scope.selected);
+
+ };
+ $scope.getDashboardData();
+ }
+});
\ No newline at end of file
diff --git a/web/app/index.html b/web/app/index.html
index 7f60ea37..1355de75 100644
--- a/web/app/index.html
+++ b/web/app/index.html
@@ -2,69 +2,75 @@
-
+
+
+
+
-
-
- GoCrypto Trader
-
-
-
-
-
-
-
-
+
+
+ GoCrypto Trader
+
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-