Merge pull request #5748 from gabrielbazan7/feat/copaystrings
using app name properly
This commit is contained in:
commit
c923bc460c
3 changed files with 22 additions and 11 deletions
|
|
@ -7,6 +7,7 @@ angular.module('copayApp.controllers').controller('completeController', function
|
|||
});
|
||||
|
||||
var defaults = configService.getDefaults();
|
||||
var downloadUrl = appConfigService.name == 'copay' ? defaults.download.copay.url : defaults.download.bitpay.url;
|
||||
|
||||
function quickFeedback(cb) {
|
||||
window.plugins.spinnerDialog.show();
|
||||
|
|
@ -16,37 +17,37 @@ angular.module('copayApp.controllers').controller('completeController', function
|
|||
|
||||
$scope.shareFacebook = 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() {
|
||||
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() {
|
||||
quickFeedback(function() {
|
||||
window.plugins.socialsharing.shareVia($scope.shareGooglePlusVia, defaults.download.url);
|
||||
window.plugins.socialsharing.shareVia($scope.shareGooglePlusVia, downloadUrl);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.shareEmail = function() {
|
||||
quickFeedback(function() {
|
||||
window.plugins.socialsharing.shareViaEmail(defaults.download.url);
|
||||
window.plugins.socialsharing.shareViaEmail(downloadUrl);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.shareWhatsapp = function() {
|
||||
quickFeedback(function() {
|
||||
window.plugins.socialsharing.shareViaWhatsApp(defaults.download.url);
|
||||
window.plugins.socialsharing.shareViaWhatsApp(downloadUrl);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.shareMessage = function() {
|
||||
quickFeedback(function() {
|
||||
window.plugins.socialsharing.shareViaSMS(defaults.download.url);
|
||||
window.plugins.socialsharing.shareViaSMS(downloadUrl);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -39,11 +39,16 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
|||
};
|
||||
|
||||
$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 title = gettextCatalog.getString('BitPay Help Center');
|
||||
var message = gettextCatalog.getString('Help and support information is available at the BitPay Help Center website.');
|
||||
var okText = gettextCatalog.getString('Open Help Center');
|
||||
var title = gettextCatalog.getString('{{msg}}', {
|
||||
msg: appName == 'copay' ? 'Copay Github Issues' : 'BitPay 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');
|
||||
externalLinkService.open(url, optIn, title, message, okText, cancelText);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,7 +16,12 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
},
|
||||
|
||||
download: {
|
||||
url: 'https://bitpay.com/wallet',
|
||||
bitpay: {
|
||||
url: 'https://bitpay.com/wallet'
|
||||
},
|
||||
copay: {
|
||||
url: 'https://copay.io/#download'
|
||||
}
|
||||
},
|
||||
|
||||
rateApp: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue