handle network reconnection

This commit is contained in:
Matias Alejo Garcia 2015-04-13 14:58:07 -03:00
commit 9efa2dfe24
16 changed files with 125 additions and 66 deletions

View file

@ -28,9 +28,9 @@
<div ng-include="'views/includes/sidebar.html'" ng-if="index.hasProfile"></div>
<div notifications="right top"></div>
<div ng-include="'views/includes/offline.html'" ng-if="index.hasProfile && index.isOffLine"></div>
<div ng-include="'views/includes/clientError.html'"
ng-if="index.hasProfile && !index.isOffLine && index.clientError"></div>
<div ng-include="'views/includes/offline.html'" ng-if="index.isOffline"></div>
<div ng-include="'views/includes/clientError.html'" ng-if="index.clientError"></div>
<div ng-include="'views/includes/password.html'" ng-if="index.askPassword"
></div>

View file

@ -1,5 +1,5 @@
<div ng-controller="copayersController as copayers" ng-init="copayers.init()"
ng-if="!index.isOffLine && !index.clientError">
ng-if="!index.clientError">
<div ng-show="!index.notAuthorized">
<div class="row m10t text-center">

View file

@ -5,16 +5,11 @@
<img src="img/logo-negative-beta.svg" alt="Copay" width="100">
<div ng-include="'views/includes/version.html'"></div>
</div>
<div ng-if="index.isOffLine" class="row">
<div class="large-12 columns">
<h1 class="text-center text-warning" translate>Warning</h1>
<div class="panel">
<p translate>You dont have an internet connection active. Copay needs connection to create a wallet</p>
</div>
</div>
<div class="text-center size-12 text-warning" ng-show="cp.error">
{{(cp.error)|translate}}. Retrying...
</div>
<!-- <div ng&#45;if="!index.isOffLine &#38;&#38; !cp.creatingProfile" ng&#45;include="'views/includes/pin.html'" ng&#45;init="confirmPin=true"></div> -->
<div class="m20tp text-white text-center animated infinite flash" ng-if="!index.isOffLine && cp.creatingProfile">
<div class="m20tp text-white text-center animated infinite flash" ng-if="cp.creatingProfile">
<span translate>Creating wallet...</span>
</div>
</div>

View file

@ -3,7 +3,15 @@
<div class="large-12 columns">
<div class="oh text-center">
<span ng-if="index.updatingTxHistory" class="text-gray" translate>Getting transactions...</span>
<span ng-if="!index.updatingTxHistory">No transactions yet</span>
<div class="box-notification" ng-show="index.txHistoryError">
<div class="box-icon error">
<i class="fi-x size-24"></i>
</div>
<span class="text-warning size-14" translate> Could not fetch transaction history
</span>
</div>
<span ng-if="!index.updatingTxHistory && !index.txHistoryError">No transactions yet</span>
</div>
</div>
</div>

View file

@ -4,8 +4,8 @@
<i class="fi-alert"></i>
</div>
<div class="dr-notification-content">
<h3 class="dr-notification-title">{{'No internet connection'|translate}}</h3>
<div class="dr-notification-text ellipsis">{{'Copay needs connection to run basic functions'|translate}}</div>
<h3 class="dr-notification-title">{{'Could not connect to Wallet Service'|translate}}</h3>
<div class="dr-notification-text ellipsis">{{'Trying to reconnnect...'|translate}}</div>
</div>
</div>
</div>

View file

@ -15,7 +15,7 @@
<div class="size-12">{{item.m}} of {{item.n}}</div>
</a>
</li>
<li ng-if="!index.isOffLine">
<li>
<a ng-click="$root.go('add')">
<i class="icon-arrow-right3 size-18 right m10t"></i>
<i class="fi-plus size-24 db left m10r"></i>

View file

@ -34,6 +34,15 @@
</div>
</div>
<div ng-show="!receive.generatingAddress">
<div class="box-notification" ng-show="receive.error ">
<div class="box-icon error">
<i class="fi-x size-24"></i>
</div>
<span class="text-warning size-14">
{{receive.error|translate}}
</span>
</div>
<div class="row" ng-show="receive.addr">
<!-- Address-->
<div class="large-12 columns">
@ -56,7 +65,7 @@
</div>
</div>
</div>
<div class="row m20t" ng-show="receive.addr && !index.isOffLine && !index.clientError">
<div class="row m20t" ng-show="receive.addr">
<div class="large-12 columns">
<a class="button black expand radius" ng-click="receive.newAddress()"
ng-style="{'background-color':index.backgroundColor}" translate>

View file

@ -1,4 +1,4 @@
<div class="send" ng-controller="sendController as send" ng-init="send.init()" ng-show="!index.isOffLine">
<div class="send" ng-controller="sendController as send" ng-init="send.init()">
<div ng-show="index.lockedBalance">
<h4 class="title m0">
<div class="left">
@ -152,6 +152,4 @@
</div>
<!-- end of row -->
</div>
<div ng-if="index.isOffLine" class="m20tp text-center" translate>Checking your internet connection...</div>
<div class="extra-margin-bottom"></div>

View file

@ -1,6 +1,7 @@
<div class="home-wallet" ng-controller="walletHomeController as home" ng-init="home.init()">
<div class="row" ng-show="!index.noFocusedWallet">
<div class="amount" ng-style="{'background-color':index.backgroundColor}">
<div class="size-36">
<strong>
<span ng-show="!index.hideBalance">
@ -39,6 +40,15 @@
</div>
</div>
<div ng-show="index.updateError">
<div class="text-center text-warning m10t">
<i class="fi-alert"></i>
<span translate>
Could not update Wallet
</span>
</div>
</div>
</div>
<div ng-show="index.notAuthorized">
<div class="text-center text-warning">