using app name properly
This commit is contained in:
parent
fdc25da720
commit
6a4b351154
3 changed files with 21 additions and 10 deletions
|
|
@ -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);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,14 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
||||||
$scope.openExternalLink = function() {
|
$scope.openExternalLink = function() {
|
||||||
var url = 'https://help.bitpay.com/bitpay-app';
|
var url = 'https://help.bitpay.com/bitpay-app';
|
||||||
var optIn = true;
|
var optIn = true;
|
||||||
var title = gettextCatalog.getString('BitPay Help Center');
|
var appName = appConfigService.name;
|
||||||
var message = gettextCatalog.getString('Help and support information is available at the BitPay Help Center website.');
|
var title = gettextCatalog.getString('{{msg}}', {
|
||||||
var okText = gettextCatalog.getString('Open Help Center');
|
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');
|
var cancelText = gettextCatalog.getString('Go Back');
|
||||||
externalLinkService.open(url, optIn, title, message, okText, cancelText);
|
externalLinkService.open(url, optIn, title, message, okText, cancelText);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue