added the settings page

This commit is contained in:
Mario Colque 2014-05-13 14:19:37 -03:00
commit 9027243052
5 changed files with 101 additions and 4 deletions

View file

@ -0,0 +1,29 @@
'use strict';
angular.module('copay.settings').controller('SettingsController',
function($scope, $rootScope, $window) {
$scope.title = 'Settings';
$scope.networkName = config.networkName;
$scope.blockchainHost = config.blockchain.host;
$scope.blockchainPort = config.blockchain.port;
$scope.socketHost = config.socket.host;
$scope.socketPort = config.socket.port;
$scope.save = function() {
localStorage.setItem('config', JSON.stringify({
networkName: $scope.networkName,
blockchain: {
host: $scope.blockchainHost,
port: $scope.blockchainPort
},
socket: {
host: $scope.socketHost,
port: $scope.socketPort
}
})
);
$window.location.reload();
};
});