Improvement - 205 - Desktop clients should open websites in a browser, not an app webview. (OSX/Win/Linux)

This commit is contained in:
Sebastiaan Pasma 2018-05-14 13:12:41 +02:00
commit 8324b18b81
2 changed files with 11 additions and 3 deletions

View file

@ -29,7 +29,11 @@ angular.module('copayApp.controllers').controller('communityController', functio
}
$scope.open = function(url) {
window.open(url, '_system');
if (platformInfo.isNW) {
require('nw.gui').Shell.openExternal( url );
} else {
window.open(url, '_system');
}
}
});

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('nextStepsController', function($scope, nextStepsService, $ionicScrollDelegate, $timeout, configService) {
angular.module('copayApp.controllers').controller('nextStepsController', function($scope, nextStepsService, $ionicScrollDelegate, $timeout, platformInfo, configService) {
$scope.hide = false;
@ -22,6 +22,10 @@ angular.module('copayApp.controllers').controller('nextStepsController', functio
};
$scope.open = function(url) {
window.open(url, '_system');
if (platformInfo.isNW) {
require('nw.gui').Shell.openExternal( url );
} else {
window.open(url, '_system');
}
}
});