fix status
This commit is contained in:
parent
8bcb332276
commit
2897aa3e4c
9 changed files with 21 additions and 155 deletions
|
|
@ -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);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div notifications="right top"></div>
|
|
||||||
<ion-nav-view></ion-nav-view>
|
<ion-nav-view></ion-nav-view>
|
||||||
|
|
||||||
<script src="lib/ionic.bundle.min.js"></script>
|
<script src="lib/ionic.bundle.min.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -16,5 +16,4 @@ src="img/icon-ledger-white.svg">
|
||||||
<!-- <img style="height:1em" ng-show="wallet.preferences.email" src="img/icon-email.svg"> -->
|
<!-- <img style="height:1em" ng-show="wallet.preferences.email" src="img/icon-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; 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 ||
|
<img style="height:0.6em" ng-show="updatingTxHistory" src="img/icon-sync-white.svg">
|
||||||
index.updatingTxHistory" src="img/icon-sync-white.svg">
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<ion-modal-view ng-controller="txpDetailsController">
|
<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">
|
<div class="left-small">
|
||||||
<a ng-click="cancel()" class="p10">
|
<a ng-click="cancel()" class="p10">
|
||||||
<span class="text-close" translate>Close</span>
|
<span class="text-close" translate>Close</span>
|
||||||
|
|
|
||||||
|
|
@ -130,15 +130,15 @@
|
||||||
translate>No transactions yet {{status.totalBalanceStr}}
|
translate>No transactions yet {{status.totalBalanceStr}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="updatingTxHistory">
|
<div ng-show="updatingTxHistory" class="updatingHistory">
|
||||||
<div class="row p20 text-center">
|
<div class="row" >
|
||||||
<div class="columns large-12 medium-12 small-12 m10b">
|
|
||||||
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
|
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
|
||||||
</div>
|
</div>
|
||||||
<div class="size-12 text-gray m20t">
|
<div class="row" >
|
||||||
<div translate>{{updatingTxHistoryProgress}} transactions downloaded</div>
|
<div class="col" translate>Updating transaction history. Please stand by.</div>
|
||||||
<div translate>Updating transaction history. Please stand by.</div>
|
</div>
|
||||||
</div>
|
<div class="row" ng-show="updatingTxHistoryProgress>0" >
|
||||||
|
<div class="col" translate>{{updatingTxHistoryProgress}} transactions downloaded</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -215,11 +215,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-center" ng-show="updatingTxHistory && !isSearching">
|
|
||||||
Updating...
|
|
||||||
<ion-spinner class="spinner-dark" icon="lines"></ion-spinner>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ion-infinite-scroll
|
<ion-infinite-scroll
|
||||||
ng-if="txHistoryShowMore"
|
ng-if="txHistoryShowMore"
|
||||||
on-infinite="showMore()"
|
on-infinite="showMore()"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
angular.module('copayApp.services')
|
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;
|
var isChromeApp = platformInfo.isChromeApp;
|
||||||
|
|
@ -67,9 +67,7 @@ angular.module('copayApp.services')
|
||||||
wallet.on('notification', function(n) {
|
wallet.on('notification', function(n) {
|
||||||
$log.debug('BWC Notification:', n);
|
$log.debug('BWC Notification:', n);
|
||||||
|
|
||||||
notificationService.newBWCNotification(n,
|
// notification?
|
||||||
walletId, wallet.credentials.walletName);
|
|
||||||
|
|
||||||
|
|
||||||
// TODO (put this in wallet ViewModel)
|
// TODO (put this in wallet ViewModel)
|
||||||
if (wallet.cachedStatus)
|
if (wallet.cachedStatus)
|
||||||
|
|
|
||||||
|
|
@ -433,107 +433,17 @@ ul.wallet-selection.wallets {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// History
|
||||||
/* notifications */
|
.updatingHistory {
|
||||||
|
div {
|
||||||
.dr-notification-container {
|
text-align: center;
|
||||||
position: absolute;
|
|
||||||
z-index: 10000;
|
|
||||||
width: 100%;
|
|
||||||
&.bottom {
|
|
||||||
bottom: 20px;
|
|
||||||
}
|
}
|
||||||
&.right {
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
&.left {
|
|
||||||
left: 20px;
|
|
||||||
}
|
|
||||||
&.top {
|
|
||||||
top: 45px;
|
|
||||||
}
|
|
||||||
&.center {
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -190px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.dr-notification-wrapper {
|
.spinner {
|
||||||
position: relative;
|
margin: auto;
|
||||||
width: 100%;
|
height: 2em;
|
||||||
margin: 0;
|
text-align: center;
|
||||||
&.offline {
|
|
||||||
position: absolute;
|
|
||||||
top: 0px;
|
|
||||||
z-index: 2000;
|
|
||||||
opacity: 1.0 !important;
|
|
||||||
background-color: #2C3E50;
|
|
||||||
}
|
}
|
||||||
&.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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue