mirror of https://github.com/BTCPrivate/copay.git
fix success modal for wp
This commit is contained in:
parent
34fa643ff8
commit
9cbd2ebb08
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.directives')
|
angular.module('copayApp.directives')
|
||||||
.directive('slideToAcceptSuccess', function($timeout) {
|
.directive('slideToAcceptSuccess', function($timeout, platformInfo) {
|
||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
templateUrl: 'views/includes/slideToAcceptSuccess.html',
|
templateUrl: 'views/includes/slideToAcceptSuccess.html',
|
||||||
|
@ -12,10 +12,13 @@ angular.module('copayApp.directives')
|
||||||
hideOnConfirm: '=slideSuccessHideOnConfirm'
|
hideOnConfirm: '=slideSuccessHideOnConfirm'
|
||||||
},
|
},
|
||||||
link: function(scope, element, attrs) {
|
link: function(scope, element, attrs) {
|
||||||
|
|
||||||
|
scope.isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP;
|
||||||
|
|
||||||
var elm = element[0];
|
var elm = element[0];
|
||||||
elm.style.display = 'none';
|
elm.style.display = 'none';
|
||||||
scope.$watch('isShown', function() {
|
scope.$watch('isShown', function() {
|
||||||
if(scope.isShown) {
|
if (scope.isShown) {
|
||||||
elm.style.display = 'flex';
|
elm.style.display = 'flex';
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
scope.fillScreen = true;
|
scope.fillScreen = true;
|
||||||
|
@ -24,7 +27,7 @@ angular.module('copayApp.directives')
|
||||||
});
|
});
|
||||||
scope.onConfirmButtonClick = function() {
|
scope.onConfirmButtonClick = function() {
|
||||||
scope.onConfirm();
|
scope.onConfirm();
|
||||||
if(scope.hideOnConfirm) {
|
if (scope.hideOnConfirm) {
|
||||||
scope.fillScreen = false;
|
scope.fillScreen = false;
|
||||||
elm.style.display = 'none';
|
elm.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,12 @@ slide-to-accept-success {
|
||||||
|
|
||||||
.slide-success {
|
.slide-success {
|
||||||
$duration: 400ms;
|
$duration: 400ms;
|
||||||
|
&__windows-background {
|
||||||
|
background: $v-success-bg-color;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
&__background {
|
&__background {
|
||||||
$start-radius: 5;
|
$start-radius: 5;
|
||||||
$scale-factor: 20;
|
$scale-factor: 20;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div
|
<div
|
||||||
class="slide-success__background"
|
class="slide-success__background slide-success__windows-background"
|
||||||
ng-class="{'fill-screen': fillScreen}">
|
ng-class="{'fill-screen': fillScreen, 'slide-success__windows-background': isWindowsPhoneApp}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-disabled="wallet" class="slide-success__content">
|
<div ng-disabled="wallet" class="slide-success__content">
|
||||||
|
|
Loading…
Reference in New Issue