Fix animation and text for log out
This commit is contained in:
parent
03262de5a6
commit
fc7a87f83a
2 changed files with 17 additions and 3 deletions
|
|
@ -257,7 +257,7 @@
|
||||||
|
|
||||||
<li class="line-b p20" ng-click="glidera.revokeToken()">
|
<li class="line-b p20" ng-click="glidera.revokeToken()">
|
||||||
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
<i class="icon-arrow-right3 size-24 right text-gray"></i>
|
||||||
<span class="text-warning" translate>Revoke Token</span>
|
<span class="text-warning" translate>Log out</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('preferencesGlideraController',
|
angular.module('copayApp.controllers').controller('preferencesGlideraController',
|
||||||
function($scope, $modal, $timeout, profileService, applicationService, glideraService, storageService) {
|
function($scope, $modal, $timeout, profileService, applicationService, glideraService, storageService, isChromeApp) {
|
||||||
|
|
||||||
this.getEmail = function(token) {
|
this.getEmail = function(token) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
@ -31,6 +31,14 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// DISABLE ANIMATION ON CHROMEAPP
|
||||||
|
if (isChromeApp) {
|
||||||
|
var animatedSlideRight = 'full';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var animatedSlideRight = 'full animated slideInRight';
|
||||||
|
}
|
||||||
|
|
||||||
this.revokeToken = function() {
|
this.revokeToken = function() {
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
||||||
|
|
@ -44,9 +52,10 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController'
|
||||||
|
|
||||||
var modalInstance = $modal.open({
|
var modalInstance = $modal.open({
|
||||||
templateUrl: 'views/modals/glidera-confirmation.html',
|
templateUrl: 'views/modals/glidera-confirmation.html',
|
||||||
windowClass: 'full',
|
windowClass: animatedSlideRight,
|
||||||
controller: ModalInstanceCtrl
|
controller: ModalInstanceCtrl
|
||||||
});
|
});
|
||||||
|
|
||||||
modalInstance.result.then(function(ok) {
|
modalInstance.result.then(function(ok) {
|
||||||
if (ok) {
|
if (ok) {
|
||||||
storageService.removeGlideraToken(fc.credentials.network, function() {
|
storageService.removeGlideraToken(fc.credentials.network, function() {
|
||||||
|
|
@ -56,6 +65,11 @@ angular.module('copayApp.controllers').controller('preferencesGlideraController'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modalInstance.result.finally(function() {
|
||||||
|
var m = angular.element(document.getElementsByClassName('reveal-modal'));
|
||||||
|
m.addClass('slideOutRight');
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue