Merge pull request #139 from Bitcoin-com/wallet/task/355
Improvement - 355 - Use External Link Service
This commit is contained in:
commit
f87c43de20
3 changed files with 5 additions and 13 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('communityController', function($scope, communityService, $ionicScrollDelegate, $timeout, platformInfo, configService) {
|
||||
angular.module('copayApp.controllers').controller('communityController', function($scope, communityService, $ionicScrollDelegate, $timeout, platformInfo, configService, externalLinkService) {
|
||||
|
||||
$scope.hide = false;
|
||||
|
||||
|
|
@ -29,11 +29,7 @@ angular.module('copayApp.controllers').controller('communityController', functio
|
|||
}
|
||||
|
||||
$scope.open = function(url) {
|
||||
if (platformInfo.isNW) {
|
||||
require('nw.gui').Shell.openExternal( url );
|
||||
} else {
|
||||
window.open(url, '_system');
|
||||
}
|
||||
externalLinkService.open(url, false);
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('nextStepsController', function($scope, nextStepsService, $ionicScrollDelegate, $timeout, platformInfo, configService) {
|
||||
angular.module('copayApp.controllers').controller('nextStepsController', function($scope, nextStepsService, $ionicScrollDelegate, $timeout, platformInfo, configService, externalLinkService) {
|
||||
|
||||
$scope.hide = false;
|
||||
|
||||
|
|
@ -22,10 +22,6 @@ angular.module('copayApp.controllers').controller('nextStepsController', functio
|
|||
};
|
||||
|
||||
$scope.open = function(url) {
|
||||
if (platformInfo.isNW) {
|
||||
require('nw.gui').Shell.openExternal( url );
|
||||
} else {
|
||||
window.open(url, '_system');
|
||||
}
|
||||
externalLinkService.open(url, false)
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
$scope.viewOnBlockchain = function() {
|
||||
var btx = $scope.btx;
|
||||
var url = 'https://' + ($scope.getShortNetworkName() == 'test' ? 'test-' : '') + blockexplorerUrl + '/tx/' + btx.txid;
|
||||
window.open(url, '_system');
|
||||
externalLinkService.open(url, false);
|
||||
};
|
||||
|
||||
$scope.getShortNetworkName = function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue