From 9cbd2ebb0806a44852c64cd9f5c0b8d5990eaa17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Thu, 8 Jun 2017 11:41:30 -0300 Subject: [PATCH] fix success modal for wp --- src/js/directives/slideToAcceptSuccess.js | 9 ++++++--- src/sass/views/includes/slideToAcceptSuccess.scss | 6 ++++++ www/views/includes/slideToAcceptSuccess.html | 4 ++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/js/directives/slideToAcceptSuccess.js b/src/js/directives/slideToAcceptSuccess.js index b5e9b20bc..fbd588bfe 100644 --- a/src/js/directives/slideToAcceptSuccess.js +++ b/src/js/directives/slideToAcceptSuccess.js @@ -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'; } diff --git a/src/sass/views/includes/slideToAcceptSuccess.scss b/src/sass/views/includes/slideToAcceptSuccess.scss index faeefc7c9..bf6c5e269 100644 --- a/src/sass/views/includes/slideToAcceptSuccess.scss +++ b/src/sass/views/includes/slideToAcceptSuccess.scss @@ -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; diff --git a/www/views/includes/slideToAcceptSuccess.html b/www/views/includes/slideToAcceptSuccess.html index 37f0381f1..a37a8cb3c 100644 --- a/www/views/includes/slideToAcceptSuccess.html +++ b/www/views/includes/slideToAcceptSuccess.html @@ -1,6 +1,6 @@
+ class="slide-success__background slide-success__windows-background" + ng-class="{'fill-screen': fillScreen, 'slide-success__windows-background': isWindowsPhoneApp}">