Merge pull request #5748 from gabrielbazan7/feat/copaystrings

using app name properly
This commit is contained in:
Javier Donadío 2017-03-09 17:01:35 -03:00 committed by GitHub
commit c923bc460c
3 changed files with 22 additions and 11 deletions

View file

@ -7,6 +7,7 @@ angular.module('copayApp.controllers').controller('completeController', function
}); });
var defaults = configService.getDefaults(); var defaults = configService.getDefaults();
var downloadUrl = appConfigService.name == 'copay' ? defaults.download.copay.url : defaults.download.bitpay.url;
function quickFeedback(cb) { function quickFeedback(cb) {
window.plugins.spinnerDialog.show(); window.plugins.spinnerDialog.show();
@ -16,37 +17,37 @@ angular.module('copayApp.controllers').controller('completeController', function
$scope.shareFacebook = function() { $scope.shareFacebook = function() {
quickFeedback(function() { quickFeedback(function() {
window.plugins.socialsharing.shareVia($scope.shareFacebookVia, null, null, null, defaults.download.url); window.plugins.socialsharing.shareVia($scope.shareFacebookVia, null, null, null, downloadUrl);
}); });
}; };
$scope.shareTwitter = function() { $scope.shareTwitter = function() {
quickFeedback(function() { quickFeedback(function() {
window.plugins.socialsharing.shareVia($scope.shareTwitterVia, null, null, null, defaults.download.url); window.plugins.socialsharing.shareVia($scope.shareTwitterVia, null, null, null, downloadUrl);
}); });
}; };
$scope.shareGooglePlus = function() { $scope.shareGooglePlus = function() {
quickFeedback(function() { quickFeedback(function() {
window.plugins.socialsharing.shareVia($scope.shareGooglePlusVia, defaults.download.url); window.plugins.socialsharing.shareVia($scope.shareGooglePlusVia, downloadUrl);
}); });
}; };
$scope.shareEmail = function() { $scope.shareEmail = function() {
quickFeedback(function() { quickFeedback(function() {
window.plugins.socialsharing.shareViaEmail(defaults.download.url); window.plugins.socialsharing.shareViaEmail(downloadUrl);
}); });
}; };
$scope.shareWhatsapp = function() { $scope.shareWhatsapp = function() {
quickFeedback(function() { quickFeedback(function() {
window.plugins.socialsharing.shareViaWhatsApp(defaults.download.url); window.plugins.socialsharing.shareViaWhatsApp(downloadUrl);
}); });
}; };
$scope.shareMessage = function() { $scope.shareMessage = function() {
quickFeedback(function() { quickFeedback(function() {
window.plugins.socialsharing.shareViaSMS(defaults.download.url); window.plugins.socialsharing.shareViaSMS(downloadUrl);
}); });
}; };

View file

@ -39,11 +39,16 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
}; };
$scope.openExternalLink = function() { $scope.openExternalLink = function() {
var url = 'https://help.bitpay.com/bitpay-app'; var appName = appConfigService.name;
var url = appName == 'copay' ? 'https://github.com/bitpay/copay/issues' : 'https://help.bitpay.com/bitpay-app';
var optIn = true; var optIn = true;
var title = gettextCatalog.getString('BitPay Help Center'); var title = gettextCatalog.getString('{{msg}}', {
var message = gettextCatalog.getString('Help and support information is available at the BitPay Help Center website.'); msg: appName == 'copay' ? 'Copay Github Issues' : 'BitPay Help Center'
var okText = gettextCatalog.getString('Open Help Center'); });
var message = gettextCatalog.getString('Help and support information is available at the {{msg}} website.', {
msg: appName == 'copay' ? 'Copay Github Issues' : 'BitPay Help Center'
});
var okText = gettextCatalog.getString('Open');
var cancelText = gettextCatalog.getString('Go Back'); var cancelText = gettextCatalog.getString('Go Back');
externalLinkService.open(url, optIn, title, message, okText, cancelText); externalLinkService.open(url, optIn, title, message, okText, cancelText);
}; };

View file

@ -16,7 +16,12 @@ angular.module('copayApp.services').factory('configService', function(storageSer
}, },
download: { download: {
url: 'https://bitpay.com/wallet', bitpay: {
url: 'https://bitpay.com/wallet'
},
copay: {
url: 'https://copay.io/#download'
}
}, },
rateApp: { rateApp: {