Simplify public key verification screen

This commit is contained in:
Tankred Hase 2015-04-01 17:42:45 +02:00
parent c30fbe8b6b
commit 8295806b1f
2 changed files with 7 additions and 29 deletions

View File

@ -1,6 +1,6 @@
'use strict'; 'use strict';
var RETRY_INTERVAL = 10000; var RETRY_INTERVAL = 5000;
var PublicKeyVerifierCtrl = function($scope, $location, $q, $timeout, $interval, auth, publickeyVerifier, publicKey) { var PublicKeyVerifierCtrl = function($scope, $location, $q, $timeout, $interval, auth, publickeyVerifier, publicKey) {
$scope.retries = 0; $scope.retries = 0;
@ -9,11 +9,6 @@ var PublicKeyVerifierCtrl = function($scope, $location, $q, $timeout, $interval,
* Runs a verification attempt * Runs a verification attempt
*/ */
$scope.verify = function() { $scope.verify = function() {
if ($scope.busy) {
return;
}
$scope.busy = true;
disarmTimeouts(); disarmTimeouts();
return $q(function(resolve) { return $q(function(resolve) {
@ -34,7 +29,6 @@ var PublicKeyVerifierCtrl = function($scope, $location, $q, $timeout, $interval,
return success(); return success();
}).catch(function(error) { }).catch(function(error) {
$scope.busy = false;
$scope.errMsg = error.message; // display error $scope.errMsg = error.message; // display error
scheduleVerification(); // schedule next verification attempt scheduleVerification(); // schedule next verification attempt

View File

@ -1,4 +1,4 @@
<section class="page" ng-class="{'u-waiting-cursor': busy}"> <section class="page u-waiting-cursor">
<div class="page__canvas"> <div class="page__canvas">
<header class="page__header"> <header class="page__header">
<img src="img/whiteout_logo.svg" alt="whiteout.io"> <img src="img/whiteout_logo.svg" alt="whiteout.io">
@ -6,30 +6,14 @@
<main class="page__main"> <main class="page__main">
<h2 class="typo-title">Email address verification</h2> <h2 class="typo-title">Email address verification</h2>
<p class="typo-paragraph"> <p class="typo-paragraph">
We will now automatically verify your email address with a confirmation message we've sent you. We will now automatically verify your email address with a confirmation message.
</p> </p>
<div ng-show="!busy">
<p class="typo-paragraph">
Verifying your email address in {{countdown}} seconds.
</p>
<form class="form" name="form"> <p class="form__error-message" ng-show="errMsg">{{errMsg}}</p>
<p class="form__error-message" ng-show="errMsg">{{errMsg}}</p>
<div class="form__row"> <div class="spinner-block spinner-block--standalone">
<button type="submit" ng-click="verify()" class="btn" tabindex="1">Verify now</button> <span class="spinner spinner--big"></span>
</div>
</form>
</div> </div>
<div ng-show="busy">
<p class="typo-paragraph">
This could take a moment. Please be patient, you'll be forwarded to your inbox when verification is successful.
</p>
<div class="spinner-block spinner-block--standalone">
<span class="spinner spinner--big"></span>
</div>
</div>
</main> </main>
<div ng-include="'tpl/page-footer.html'"></div> <div ng-include="'tpl/page-footer.html'"></div>
</div> </div>