added the settings page
This commit is contained in:
parent
be83729223
commit
9027243052
5 changed files with 101 additions and 4 deletions
29
js/controllers/settings.js
Normal file
29
js/controllers/settings.js
Normal 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();
|
||||
};
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue