fix error notifications

This commit is contained in:
Matias Alejo Garcia 2015-04-23 19:05:44 -03:00
parent 30eb9bf0c5
commit 816901378e
5 changed files with 48 additions and 45 deletions

View File

@ -26,7 +26,6 @@
<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.isOffline"></div>
<div ng-include="'views/includes/password.html'" ng-if="index.askPassword"
></div>

View File

@ -1,11 +0,0 @@
<div class="offline dr-notification-wrapper">
<div class="dr-notification">
<div class="dr-notification-image">
<i class="fi-alert"></i>
</div>
<div class="dr-notification-content">
<h3 class="dr-notification-title">{{'Could not connect to Wallet Service'|translate}}</h3>
<div class="dr-notification-text ellipsis animated infinite flash">{{'Trying to reconnnect...'|translate}}</div>
</div>
</div>
</div>

View File

@ -1,6 +1,43 @@
<div ng-controller="walletHomeController as home">
<div class="row columns m20tp" ng-show="index.noFocusedWallet">
<div class="text-center text-warning m20b">
<i class="fi-alert"></i> <span translate>You do not have any wallet</span>
</div>
<button class="button black expand" ng-click="$root.go('add')" translate>Create</button>
</div>
<div class="onGoingProcess" ng-show="index.isOffline" style="background-color:#222">
<div class="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
<span translate>Reconnecting to Wallet Server...</span>
</div>
<div class="onGoingProcess" ng-show="index.anyOnGoingProcess && !index.isOffline" ng-style="{'background-color':index.backgroundColor}">
<div class="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
<span translate ng-show="
index.onGoingProcessName == 'openingWallet'
|| index.onGoingProcessName == 'updatingStatus'
|| index.onGoingProcessName == 'updatingBalance'
"> Updating Wallet... </span>
<span translate ng-show="index.onGoingProcessName == 'scanning'">Scanning Wallet funds...</span>
<span translate ng-show="index.onGoingProcessName == 'recreating'">Recreating Wallet...</span>
</div>
<div class="oh" ng-show="!index.noFocusedWallet">
<div id="walletHome" class="walletHome tab-view tab-in">
<div class="oh" ng-show="!index.noFocusedWallet">
<div class="amount" ng-style="{'background-color':index.backgroundColor}">
<div ng-if="!index.anyOnGoingProcess && !index.notAuthorized">
<div ng-show="index.updateError" ng-click='index.openWallet()'>
@ -27,7 +64,7 @@
<strong>...</strong>
</div>
</div>
</div>
</div> <!-- amount -->
<div class="pr columns line-b">
<div class="avatar-wallet left"
ng-style="{'background-color':index.backgroundColor}">{{index.walletName | limitTo: 1}}</div>
@ -50,24 +87,8 @@
</div>
</div>
<div class="onGoingProcess" ng-show="index.anyOnGoingProcess" ng-style="{'background-color':index.backgroundColor}">
<div class="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
<span translate ng-show="
index.onGoingProcessName == 'openingWallet'
|| index.onGoingProcessName == 'updatingStatus'
|| index.onGoingProcessName == 'updatingBalance'
"> Updating Wallet... </span>
<span translate ng-show="index.onGoingProcessName == 'scanning'">Scanning Wallet funds...</span>
<span translate ng-show="index.onGoingProcessName == 'recreating'">Recreating Wallet...</span>
</div>
<div class="m20t" ng-show="index.notAuthorized">
<div class="m20t" ng-show="index.notAuthorized && ! index.anyOnGoingProcess">
<div class="text-center text-warning">
<i class="fi-alert"></i>
<span translate>
@ -175,7 +196,7 @@ index.onGoingProcessName == 'openingWallet'
<div class="row m20t" ng-if="home.addr">
<div class="large-12 columns">
<button class="button black expand radius" ng-click="home.newAddress()"
ng-style="{'background-color':index.backgroundColor}" ng-disabled="home.generatingAddress" translate>
ng-style="{'background-color':index.backgroundColor}" ng-disabled="home.generatingAddress || index.isOffline" translate>
Generate new address
</button>
</div>
@ -318,7 +339,7 @@ index.onGoingProcessName == 'openingWallet'
<a ng-click="home.resetForm(sendForm)" class="button expand outline dark-gray" translate>Cancel</a>
</div>
<div class="columns" ng-class="{'small-6 medium-6 large-6':(home._paypro || home.lockAddress)}">
<button type="submit" class="button black radius expand" ng-disabled="sendForm.$invalid || home.blockUx"
<button type="submit" class="button black radius expand" ng-disabled="sendForm.$invalid || home.blockUx || index.isOffline"
ng-style="{'background-color':index.backgroundColor}" translate>
Send
</button>
@ -402,15 +423,5 @@ history
</div>
<!-- END -->
<div class="row columns m20tp" ng-show="index.noFocusedWallet">
<div class="text-center text-warning m20b">
<i class="fi-alert"></i> <span translate>You do not have any wallet</span>
</div>
<button class="button black expand" ng-click="$root.go('add')" translate>Create</button>
</div>
</div>
<div class="extra-margin-bottom"></div>

View File

@ -1110,12 +1110,12 @@ input.ng-invalid-match, input.ng-invalid-match:focus {
.onGoingProcess {
background: #213140;
text-align: center;
max-width: 14.5rem;
max-width: 16.5rem;
max-height: 3.5rem;
top:auto;
left:0;
right:0;
bottom:200px;
bottom:170px;
margin: auto;
border-radius: 3px;
color: #fff;
@ -1123,6 +1123,7 @@ input.ng-invalid-match, input.ng-invalid-match:focus {
font-size: 13px;
position: absolute;
opacity: 0.8;
z-index: 1000;
}

View File

@ -539,6 +539,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
$rootScope.$on('Local/Offline', function(event) {
$log.debug('Offline event');
self.isOffline = true;
$timeout(function(){
$rootScope.$apply();
});
});
$rootScope.$on('Local/BackupDone', function(event) {