added PasswordController

This commit is contained in:
Mario Colque 2014-04-28 16:22:59 -03:00
parent 777ef70d4d
commit bbf9a9c4d5
4 changed files with 55 additions and 1 deletions

View File

@ -254,6 +254,42 @@
</div>
</script>
<script type="text/ng-template" id="password.html">
<div class="" ng-controller="PasswordController">
<h3>Enter your password</h3>
<div class="large-6 columns">
<input type="password" class="form-control" placeholder="Enter your passwor" ng-model="password" autofocus="">
<button type="submit" class="button secondary round text-center" ng-click="getPassphrase()">Send</button>
</div>
</div>
</script>
<script type="text/ng-template" id="peer.html">
<div class="row" ng-if="$root.wallet.requiredCopayers > $root.wallet.network.connectedCopayers().length">
<div class="large-12 columns p70l">
<p class="text-info"> <i class="fi-alert size-28"></i>
{{$root.wallet.requiredCopayers}} copayers needed for signing transactions
</div>
</div>
<div class="row">
<div class="large-4 columns"
ng-repeat="copayer in $root.wallet.getRegisteredPeerIds()">
<video
ng-class="($root.wallet.getOnlinePeerIDs().indexOf(copayer) != -1) ? 'online' : 'offline'"
class="video-small"
autoplay ng-show="$root.videoSrc[copayer]"
ng-src="{{$root.getVideoURL(copayer)}}"
id="{{copayer + '-video'}}" muted="true"
title="{{copayer + (copayer == $root.wallet.network.peerId?' (You)':'')}}" ></video>
<img ng-show="!$root.videoSrc[copayer]"
ng-class="($root.wallet.getOnlinePeerIDs().indexOf(copayer) != -1) ? 'online' : 'offline'"
class="video-small"
src="./img/satoshi.gif"
title="{{copayer + (copayer == $root.wallet.network.peerId?' (You)':'')}}" />
</div>
</div>
</script>
<!-- ADDRESS -->
<script type="text/ng-template" id="addresses.html">
<div class="addresses" data-ng-controller="AddressesController">
@ -561,6 +597,7 @@
<script src="js/controllers/signin.js"></script>
<script src="js/controllers/setup.js"></script>
<script src="js/controllers/import.js"></script>
<script src="js/controllers/password.js"></script>
<script src="js/init.js"></script>
</body>

View File

@ -20,7 +20,8 @@ var copayApp = window.copayApp = angular.module('copay',[
'copay.setup',
'copay.directives',
'copay.video',
'copay.import'
'copay.import',
'copay.password',
]);
angular.module('copay.header', []);
@ -37,4 +38,5 @@ angular.module('copay.socket', []);
angular.module('copay.directives', []);
angular.module('copay.video', []);
angular.module('copay.import', []);
angular.module('copay.password', []);

View File

@ -0,0 +1,11 @@
'use strict';
angular.module('copay.password').controller('PasswordController',
function($scope, $rootScope) {
$scope.title = 'Password';
$scope.getPassphrase = function() {
console.log('######### Password', $scope.password);
};
});

View File

@ -22,6 +22,10 @@ angular
templateUrl: 'setup.html',
validate: false
})
.when('/password', {
templateUrl: 'password.html',
validate: false
})
.when('/addresses', {
templateUrl: 'addresses.html',
validate: true