fix conflicts

This commit is contained in:
Mario Colque 2014-03-31 18:05:35 -03:00
commit 92f4422841
26 changed files with 1811 additions and 331 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('cosign.backup').controller('BackupController',
angular.module('copay.backup').controller('BackupController',
function($scope, $rootScope, $location) {
$scope.title = 'Backup';
});

View file

@ -1,10 +1,10 @@
'use strict';
angular.module('cosign.header').controller('HeaderController',
function($scope, $rootScope, $location) {
angular.module('copay.header').controller('HeaderController',
function($scope, $rootScope, $location, Network) {
$scope.menu = [{
'title': 'Home',
'link': '#/'
'link': '#/home'
}, {
'title': 'Transactions',
'link': '#/transactions'
@ -16,6 +16,10 @@ angular.module('cosign.header').controller('HeaderController',
'link': '#/backup'
}];
if (!$rootScope.peerId) {
$location.path('signin');
}
$scope.isActive = function(item) {
if (item.link.replace('#','') == $location.path()) {
return true;
@ -29,7 +33,7 @@ angular.module('cosign.header').controller('HeaderController',
$scope.signout = function() {
$rootScope.isLogged = false;
Network.disconnect();
$location.path('signin');
};
});

View file

@ -1,11 +1,15 @@
'use strict';
angular.module('cosign.home').controller('HomeController',
angular.module('copay.home').controller('HomeController',
function($scope, $rootScope, $location) {
$scope.title = 'Home';
$scope.oneAtATime = true;
if (!$rootScope.peerId) {
$location.path('signin');
}
$scope.addrs = [
{ addrStr: 'n3zUqNR7Bbbc4zJhPVj1vG2Lx66K3Xhzvb'},
{ addrStr: 'my9wnLwwUrwpNfEgSrWY62ymEGf1edKf4J'}

View file

@ -1,13 +0,0 @@
'use strict';
angular.module('cosign.join').controller('JoinController',
function($scope, $rootScope, $routeParams, Network) {
$rootScope.masterId = $routeParams.id;
$scope.init = function() {
console.log('-------- init --------');
console.log($rootScope.peerId);
Network.connect($rootScope.masterId);
};
});

11
js/controllers/peer.js Normal file
View file

@ -0,0 +1,11 @@
'use strict';
angular.module('copay.peer').controller('PeerController',
function($scope, $rootScope, $location, $routeParams, Network) {
$scope.init = function() {
console.log('connecting peer init');
//Network.connect($rootScope.masterId);
};
});

View file

@ -1,6 +1,11 @@
'use strict';
angular.module('cosign.send').controller('SendController',
angular.module('copay.send').controller('SendController',
function($scope, $rootScope, $location) {
$scope.title = 'Send';
if (!$rootScope.peerId) {
$location.path('signin');
}
});

View file

@ -1,15 +1,28 @@
'use strict';
angular.module('cosign.signin').controller('SigninController',
angular.module('copay.signin').controller('SigninController',
function($scope, $rootScope, $location, Network) {
$scope.loading = false;
$rootScope.peerId = null;
// Init peer
Network.init();
$scope.create = function() {
$scope.loading = true;
Network.init(function(pid) {
$rootScope.masterId = pid;
$location.path('peer');
});
};
$scope.join = function(cid) {
console.log('------- joining to ' + cid + ' --------');
$scope.loading = true;
Network.init(function() {
Network.connect(cid, function() {
$rootScope.masterId = cid;
$location.path('peer');
});
});
var pid = cid || $rootScope.peerId;
$location.path('join/' + pid);
};
});

View file

@ -1,11 +1,15 @@
'use strict';
angular.module('cosign.transactions').controller('TransactionsController',
angular.module('copay.transactions').controller('TransactionsController',
function($scope, $rootScope, $location) {
$scope.title = 'Transactions';
$scope.oneAtATime = true;
if (!$rootScope.peerId) {
$location.path('signin');
}
$scope.txsinput = [
{
fromAddr: "n3zUqNR7Bbbc4zJhPVj1vG2Lx66K3Xhzvb",