fix status

This commit is contained in:
Matias Alejo Garcia 2016-08-23 12:10:48 -03:00
parent 8bcb332276
commit 2897aa3e4c
No known key found for this signature in database
GPG Key ID: 02470DB551277AB3
9 changed files with 21 additions and 155 deletions

View File

@ -257,39 +257,4 @@ factory('notification', function($timeout, platformInfo) {
};
}
).directive('notifications', function(notification, $compile) {
/**
*
* It should also parse the arguments passed to it that specify
* its position on the screen like "bottom right" and apply those
* positions as a class to the container element
*
* Finally, the directive should have its own controller for
* handling all of the notifications from the notification service
*/
function link(scope, element, attrs) {
var position = attrs.notifications;
position = position.split(' ');
element.addClass('dr-notification-container');
for (var i = 0; i < position.length; i++) {
element.addClass(position[i]);
}
}
return {
restrict: 'A',
scope: {},
templateUrl: 'views/includes/notifications.html',
link: link,
controller: ['$scope',
function NotificationsCtrl($scope) {
$scope.queue = notification.getQueue();
$scope.removeNotification = function(noti) {
$scope.queue.splice($scope.queue.indexOf(noti), 1);
};
}
]
};
});
);

View File

@ -13,7 +13,6 @@
</head>
<body>
<div notifications="right top"></div>
<ion-nav-view></ion-nav-view>
<script src="lib/ionic.bundle.min.js"></script>

View File

@ -16,5 +16,4 @@ src="img/icon-ledger-white.svg">
<!-- <img style="height:1em" ng&#45;show="wallet.preferences.email" src="img/icon&#45;email.svg"> -->
<img style="height:0.6em; margin-right: 1px;" ng-show="wallet.usingCustomBWS" src="img/icon-bws-white.svg">
<img style="height:0.6em" class="animated flash infinite" ng-show="wallet.loadingWallet ||
index.updatingTxHistory" src="img/icon-sync-white.svg">
<img style="height:0.6em" ng-show="updatingTxHistory" src="img/icon-sync-white.svg">

View File

@ -1,5 +1,5 @@
<ion-modal-view ng-controller="txpDetailsController">
<ion-header-bar align-title="center" class="tab-bar" ng-style="{'background-color':color}">
<ion-header-bar align-title="center" class="tab-bar">
<div class="left-small">
<a ng-click="cancel()" class="p10">
<span class="text-close" translate>Close</span>

View File

@ -130,15 +130,15 @@
translate>No transactions yet {{status.totalBalanceStr}}
</div>
<div ng-show="updatingTxHistory">
<div class="row p20 text-center">
<div class="columns large-12 medium-12 small-12 m10b">
<div ng-show="updatingTxHistory" class="updatingHistory">
<div class="row" >
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
</div>
<div class="size-12 text-gray m20t">
<div translate>{{updatingTxHistoryProgress}} transactions downloaded</div>
<div translate>Updating transaction history. Please stand by.</div>
</div>
</div>
<div class="row" >
<div class="col" translate>Updating transaction history. Please stand by.</div>
</div>
<div class="row" ng-show="updatingTxHistoryProgress>0" >
<div class="col" translate>{{updatingTxHistoryProgress}} transactions downloaded</div>
</div>
</div>
@ -215,11 +215,6 @@
</div>
</div>
<div class="text-center" ng-show="updatingTxHistory && !isSearching">
Updating...
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
</div>
<ion-infinite-scroll
ng-if="txHistoryShowMore"
on-infinite="showMore()"

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.services')
.factory('profileService', function profileServiceFactory($rootScope, $timeout, $filter, $log, sjcl, lodash, storageService, bwcService, configService, notificationService, pushNotificationsService, gettext, gettextCatalog, bwcError, uxLanguage, bitcore, platformInfo, $ionicHistory) {
.factory('profileService', function profileServiceFactory($rootScope, $timeout, $filter, $log, sjcl, lodash, storageService, bwcService, configService, pushNotificationsService, gettext, gettextCatalog, bwcError, uxLanguage, bitcore, platformInfo, $ionicHistory) {
var isChromeApp = platformInfo.isChromeApp;
@ -67,9 +67,7 @@ angular.module('copayApp.services')
wallet.on('notification', function(n) {
$log.debug('BWC Notification:', n);
notificationService.newBWCNotification(n,
walletId, wallet.credentials.walletName);
// notification?
// TODO (put this in wallet ViewModel)
if (wallet.cachedStatus)

View File

@ -433,107 +433,17 @@ ul.wallet-selection.wallets {
}
}
/* notifications */
.dr-notification-container {
position: absolute;
z-index: 10000;
width: 100%;
&.bottom {
bottom: 20px;
// History
.updatingHistory {
div {
text-align: center;
}
&.right {
right: 0;
}
&.left {
left: 20px;
}
&.top {
top: 45px;
}
&.center {
left: 50%;
margin-left: -190px;
}
}
.dr-notification-wrapper {
position: relative;
width: 100%;
margin: 0;
&.offline {
position: absolute;
top: 0px;
z-index: 2000;
opacity: 1.0 !important;
background-color: #2C3E50;
.spinner {
margin: auto;
height: 2em;
text-align: center;
}
&.client-error {
position: absolute;
top: 45px;
z-index: 11;
}
}
.dr-notification-close-btn {
color: #A5B2BF;
border: 1px solid #A5B2BF;
border-radius: 100%;
display: inline-block;
padding: 0px 8px;
position: absolute;
right: 5px;
cursor: pointer;
z-index: 10;
margin: 14px 8px 0;
font-size: 20px;
}
.dr-notification-image {
float: left;
color: #fff;
text-align: center;
background-color: #213140;
width: 40px;
height: 40px;
font-size: 1.5rem;
border-radius: 100%;
margin: 0.6rem;
img {
margin: 15px;
max-width: 70px;
min-width: 48px;
}
}
.dr-notification-content {
line-height: 90%;
padding: 10px 50px 5px 60px;
}
.dr-notification-title {
color: #fff;
font-size: 12px;
margin-bottom: 0;
font-weight: 700;
}
.dr-notification {
background: rgba(44, 62, 80, 0.9);
box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.2);
width: 100%;
clear: both;
overflow: hidden;
border-radius: 0;
height: 60px;
}
.dr-notification-text {
font-size: 11px;
color: #fff;
}