Use External Link Service
This commit is contained in:
parent
a0462a1e1e
commit
7643ea02cb
3 changed files with 5 additions and 13 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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;
|
$scope.hide = false;
|
||||||
|
|
||||||
|
|
@ -29,11 +29,7 @@ angular.module('copayApp.controllers').controller('communityController', functio
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.open = function(url) {
|
$scope.open = function(url) {
|
||||||
if (platformInfo.isNW) {
|
externalLinkService.open(url, false);
|
||||||
require('nw.gui').Shell.openExternal( url );
|
|
||||||
} else {
|
|
||||||
window.open(url, '_system');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'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;
|
$scope.hide = false;
|
||||||
|
|
||||||
|
|
@ -22,10 +22,6 @@ angular.module('copayApp.controllers').controller('nextStepsController', functio
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.open = function(url) {
|
$scope.open = function(url) {
|
||||||
if (platformInfo.isNW) {
|
externalLinkService.open(url, false)
|
||||||
require('nw.gui').Shell.openExternal( url );
|
|
||||||
} else {
|
|
||||||
window.open(url, '_system');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
||||||
$scope.viewOnBlockchain = function() {
|
$scope.viewOnBlockchain = function() {
|
||||||
var btx = $scope.btx;
|
var btx = $scope.btx;
|
||||||
var url = 'https://' + ($scope.getShortNetworkName() == 'test' ? 'test-' : '') + blockexplorerUrl + '/tx/' + btx.txid;
|
var url = 'https://' + ($scope.getShortNetworkName() == 'test' ? 'test-' : '') + blockexplorerUrl + '/tx/' + btx.txid;
|
||||||
window.open(url, '_system');
|
externalLinkService.open(url, false);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.getShortNetworkName = function() {
|
$scope.getShortNetworkName = function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue