fix success modal for wp

This commit is contained in:
Gabriel Bazán 2017-06-08 11:41:30 -03:00
parent 34fa643ff8
commit 9cbd2ebb08
3 changed files with 14 additions and 5 deletions

View File

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.directives')
.directive('slideToAcceptSuccess', function($timeout) {
.directive('slideToAcceptSuccess', function($timeout, platformInfo) {
return {
restrict: 'E',
templateUrl: 'views/includes/slideToAcceptSuccess.html',
@ -12,10 +12,13 @@ angular.module('copayApp.directives')
hideOnConfirm: '=slideSuccessHideOnConfirm'
},
link: function(scope, element, attrs) {
scope.isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP;
var elm = element[0];
elm.style.display = 'none';
scope.$watch('isShown', function() {
if(scope.isShown) {
if (scope.isShown) {
elm.style.display = 'flex';
$timeout(function() {
scope.fillScreen = true;
@ -24,7 +27,7 @@ angular.module('copayApp.directives')
});
scope.onConfirmButtonClick = function() {
scope.onConfirm();
if(scope.hideOnConfirm) {
if (scope.hideOnConfirm) {
scope.fillScreen = false;
elm.style.display = 'none';
}

View File

@ -12,6 +12,12 @@ slide-to-accept-success {
.slide-success {
$duration: 400ms;
&__windows-background {
background: $v-success-bg-color;
height: 100%;
width: 100%;
position: fixed;
}
&__background {
$start-radius: 5;
$scale-factor: 20;

View File

@ -1,6 +1,6 @@
<div
class="slide-success__background"
ng-class="{'fill-screen': fillScreen}">
class="slide-success__background slide-success__windows-background"
ng-class="{'fill-screen': fillScreen, 'slide-success__windows-background': isWindowsPhoneApp}">
</div>
<div ng-disabled="wallet" class="slide-success__content">