Merge pull request #5520 from JDonadio/ref/update-available

Update available - Desktop
This commit is contained in:
Gabriel Edgardo Bazán 2017-01-27 17:47:21 +02:00 committed by GitHub
commit ed45495ae2
4 changed files with 50 additions and 17 deletions

View File

@ -32,8 +32,12 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$log.warn(err);
return;
}
if (newRelease) $scope.newRelease = true;
if (newRelease) {
$scope.newRelease = true;
$scope.updateText = gettextCatalog.getString('There is a new version of {{appName}} available', {
appName: $scope.name
});
}
});
}
@ -213,7 +217,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
walletService.getStatus(wallet, {}, function(err, status) {
if (err) {
wallet.error = (err === 'WALLET_NOT_REGISTERED') ? gettextCatalog.getString('Wallet not registered') : bwcError.msg(err);
wallet.error = (err === 'WALLET_NOT_REGISTERED') ? gettextCatalog.getString('Wallet not registered') : bwcError.msg(err);
$log.error(err);
} else {

View File

@ -121,18 +121,24 @@
}
}
.release {
cursor: pointer;
cursor: hand;
background-color: #E9E9EC;
padding-top: 30px;
padding-bottom: 20px;
text-align: center;
color: #444;
i {
margin-top: 1px;
font-size: 20px;
margin-left: 10px;
position: absolute;
text-align: center;
.item {
width: 100%;
}
.title {
font-weight: 700;
color: #444;
}
.button {
width: 100%;
border: none;
}
.big-icon-svg {
> .bg {
box-shadow: none;
}
padding-top: 2rem;
padding-bottom: 0;
}
}

14
www/img/icon-update.svg Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 46.1 46.1" style="enable-background:new 0 0 46.1 46.1;" xml:space="preserve">
<style type="text/css">
.st0{fill:#647CE8;}
.st1{fill:none;stroke:#FFFEFE;}
</style>
<path id="Oval-87" class="st0" d="M23.1,46.1c12.7,0,23-10.3,23-23s-10.3-23-23-23s-23,10.3-23,23S10.4,46.1,23.1,46.1z"/>
<path id="Shape" class="st1" d="M33.6,17.6h-14c-3.3,0-6,2.7-6,6v1"/>
<path id="Shape_1_" class="st1" d="M13.6,29.6h14c3.3,0,6-2.7,6-6v-1"/>
<polyline id="Shape_2_" class="st1" points="29.6,21.6 33.6,17.6 29.6,13.6 "/>
<polyline id="Shape_3_" class="st1" points="17.6,25.6 13.6,29.6 17.6,33.6 "/>
</svg>

After

Width:  |  Height:  |  Size: 863 B

View File

@ -10,9 +10,18 @@
spinner="ios-small"
on-refresh="onRefresh()">
</ion-refresher>
<div class="release ng-hide" ng-show="newRelease" ng-click="openExternalLink()">
<span translate>An update to this app is available</span><span><i class="icon bp-arrow-right"></i></span>
<div class="list card release ng-hide" ng-show="newRelease">
<i class="item icon big-icon-svg">
<img src="img/icon-update.svg" class="bg"/>
</i>
<div class="item title">{{updateText}}</div>
<div class="button" ng-click="openExternalLink()">
<span translate>Download</span>
</div>
</div>
<div class="ng-hide" ng-show="showRateCard.value" ng-include="'views/feedback/rateCard.html'"></div>
<div class="list card homeTip" ng-if="homeTip">
<div class="item item-icon-right item-heading">