diff --git a/src/js/controllers/amazon.js b/src/js/controllers/amazon.js index 954c35c24..453cced4e 100644 --- a/src/js/controllers/amazon.js +++ b/src/js/controllers/amazon.js @@ -5,8 +5,8 @@ angular.module('copayApp.controllers').controller('amazonController', $scope.network = amazonService.getEnvironment(); - $scope.openExternalLink = function(url, target) { - externalLinkService.open(url, target); + $scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) { + externalLinkService.open(url, optIn, title, message, okText, cancelText); }; var initAmazon = function() { @@ -83,7 +83,7 @@ angular.module('copayApp.controllers').controller('amazonController', }); }; - $scope.$on("$ionicView.beforeEnter", function(event, data){ + $scope.$on("$ionicView.beforeEnter", function(event, data) { initAmazon(); }); }); diff --git a/src/js/controllers/buyAmazon.js b/src/js/controllers/buyAmazon.js index 903e2a682..ca2aede91 100644 --- a/src/js/controllers/buyAmazon.js +++ b/src/js/controllers/buyAmazon.js @@ -16,12 +16,14 @@ angular.module('copayApp.controllers').controller('buyAmazonController', $log.debug('Wallet changed: ' + w.name); }); - $scope.openExternalLink = function(url, target) { - externalLinkService.open(url, target); + $scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) { + externalLinkService.open(url, optIn, title, message, okText, cancelText); }; this.confirm = function() { - var message = gettextCatalog.getString('Amazon.com Gift Card purchase for ${{amount}} USD', {amount: $scope.formData.fiat}); + var message = gettextCatalog.getString('Amazon.com Gift Card purchase for ${{amount}} USD', { + amount: $scope.formData.fiat + }); var ok = gettextCatalog.getString('Buy'); popupService.showConfirm(null, message, ok, null, function(res) { if (res) self.createTx(); @@ -209,8 +211,10 @@ angular.module('copayApp.controllers').controller('buyAmazonController', }); }; - $scope.$on("$ionicView.enter", function(event, data){ - $scope.formData = { fiat: null }; + $scope.$on("$ionicView.enter", function(event, data) { + $scope.formData = { + fiat: null + }; $scope.wallets = profileService.getWallets({ network: network, onlyComplete: true diff --git a/src/js/controllers/glidera.js b/src/js/controllers/glidera.js index 9250de9f1..c3b9380c9 100644 --- a/src/js/controllers/glidera.js +++ b/src/js/controllers/glidera.js @@ -5,8 +5,8 @@ angular.module('copayApp.controllers').controller('glideraController', $scope.network = glideraService.getEnvironment(); - $scope.openExternalLink = function(url, target) { - externalLinkService.open(url); + $scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) { + externalLinkService.open(url, optIn, title, message, okText, cancelText); }; var initGlidera = function(accessToken) { diff --git a/src/js/controllers/modals/amazonCardDetails.js b/src/js/controllers/modals/amazonCardDetails.js index 9cadccb10..ffe54b713 100644 --- a/src/js/controllers/modals/amazonCardDetails.js +++ b/src/js/controllers/modals/amazonCardDetails.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('amazonCardDetailsController', function($scope, $log, $timeout, bwcError, amazonService, lodash, ongoingProcess, popupService, gettextCatalog) { +angular.module('copayApp.controllers').controller('amazonCardDetailsController', function($scope, $log, $timeout, bwcError, amazonService, lodash, ongoingProcess, popupService, gettextCatalog, externalLinkService) { $scope.cancelGiftCard = function() { ongoingProcess.set('Canceling gift card...', true); @@ -62,4 +62,8 @@ angular.module('copayApp.controllers').controller('amazonCardDetailsController', $scope.amazonCardDetailsModal.hide(); }; + $scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) { + externalLinkService.open(url, optIn, title, message, okText, cancelText); + }; + }); diff --git a/src/js/controllers/modals/txDetails.js b/src/js/controllers/modals/txDetails.js index adb7ddda6..7f3dacf10 100644 --- a/src/js/controllers/modals/txDetails.js +++ b/src/js/controllers/modals/txDetails.js @@ -139,8 +139,8 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio }); }; - $scope.openExternalLink = function(url, target) { - externalLinkService.open(url, target); + $scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) { + externalLinkService.open(url, optIn, title, message, okText, cancelText); }; $scope.getShortNetworkName = function() { diff --git a/src/js/controllers/onboarding/terms.js b/src/js/controllers/onboarding/terms.js index 0c4773c04..f06b8ca20 100644 --- a/src/js/controllers/onboarding/terms.js +++ b/src/js/controllers/onboarding/terms.js @@ -15,8 +15,8 @@ angular.module('copayApp.controllers').controller('termsController', function($s }); }; - $scope.openExternalLink = function(url, target) { - externalLinkService.open(url, target); + $scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) { + externalLinkService.open(url, optIn, title, message, okText, cancelText); }; }); diff --git a/src/js/controllers/preferencesAbout.js b/src/js/controllers/preferencesAbout.js index 64f10de54..e8369abd7 100644 --- a/src/js/controllers/preferencesAbout.js +++ b/src/js/controllers/preferencesAbout.js @@ -8,7 +8,7 @@ angular.module('copayApp.controllers').controller('preferencesAbout', $scope.commitHash = $window.commitHash; $scope.name = $window.appConfig.gitHubRepoName; - $scope.openExternalLink = function(url, target) { - externalLinkService.open(url, target); + $scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) { + externalLinkService.open(url, optIn, title, message, okText, cancelText); }; }); diff --git a/src/js/controllers/tab-settings.js b/src/js/controllers/tab-settings.js index 2981745ca..773a6a5f3 100644 --- a/src/js/controllers/tab-settings.js +++ b/src/js/controllers/tab-settings.js @@ -24,8 +24,8 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct $scope.wallets = profileService.getWallets(); }; - $scope.openExternalLink = function(url, target) { - externalLinkService.open(url, target); + $scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) { + externalLinkService.open(url, optIn, title, message, okText, cancelText); }; $scope.$on("$ionicView.beforeEnter", function(event, data) { diff --git a/src/js/services/externalLinkService.js b/src/js/services/externalLinkService.js index cc0a447fe..8154601d0 100644 --- a/src/js/services/externalLinkService.js +++ b/src/js/services/externalLinkService.js @@ -1,8 +1,8 @@ 'use strict'; -angular.module('copayApp.services').service('externalLinkService', function(platformInfo, nodeWebkitService, popupService, gettextCatalog) { +angular.module('copayApp.services').service('externalLinkService', function(platformInfo, nodeWebkitService, popupService, gettextCatalog, $window, $log, $timeout) { - this.open = function(url, optIn, title, desc, okText, cancelText) { + this.open = function(url, optIn, title, message, okText, cancelText) { var old = $window.handleOpenURL; $window.handleOpenURL = function(url) { @@ -17,12 +17,16 @@ angular.module('copayApp.services').service('externalLinkService', function(plat if (platformInfo.isNW) { nodeWebkitService.openExternalLink(url); } else { - var message = gettextCatalog.getString(desc), - title = gettextCatalog.getString(title), - openBrowser = function(res) { - if (res) window.open(url, '_system'); - }; - popupService.showConfirm(title, message, 'Open', 'Cancel', openBrowser); + if (optIn) { + var message = gettextCatalog.getString(message), + title = gettextCatalog.getString(title), + okText = gettextCatalog.getString(okText), + cancelText = gettextCatalog.getString(cancelText), + openBrowser = function(res) { + if (res) window.open(url, '_system'); + }; + popupService.showConfirm(title, message, okText, cancelText, openBrowser); + } else window.open(url, '_system'); } }; diff --git a/www/views/amazon.html b/www/views/amazon.html index 543ac2a1a..31701b4d6 100644 --- a/www/views/amazon.html +++ b/www/views/amazon.html @@ -24,7 +24,7 @@
Amazon.com Gift Cards never expire and can be redeemed towards millions of items at - www.amazon.com + www.amazon.com
diff --git a/www/views/buyAmazon.html b/www/views/buyAmazon.html index 495292aa0..f382490c0 100644 --- a/www/views/buyAmazon.html +++ b/www/views/buyAmazon.html @@ -17,7 +17,7 @@ BitPay Invoice ID: {{buy.errorInfo.invoiceId}}.
- Open invoice + Open invoice
@@ -88,7 +88,7 @@
Thank you for participating in the BitPay offer. It is our pleasure to send you this Amazon.com Gift Card* that can be redeemed towards millions of items at - www.amazon.com. + www.amazon.com. You may want to print this screen for easy reference later you will need the gift card claim code below.
@@ -105,19 +105,19 @@
- See invoice + See invoice
To redeem your gift card, follow these steps:
    -
  1. 1. Visit www.amazon.com/gc +
  2. 1. Visit www.amazon.com/gc
  3. 2. Click Apply to Account and enter the Claim Code when prompted.
  4. 3. Gift card funds will be applied automatically to eligible orders during the checkout process.
  5. 4. You must pay for any remaining balance on your order with another payment method. @@ -130,7 +130,7 @@

    If you have questions about redeeming your gift card, please visit - www.amazon.com/gc-redeem. + www.amazon.com/gc-redeem. If you have questions regarding the BitPay Introductory offer, please contact BitPay.

    @@ -139,14 +139,14 @@
- * Amazon.com is not a sponsor of this promotion. - Except as required by law, Amazon.com + * Amazon.com is not a sponsor of this promotion. + Except as required by law, Amazon.com Gift Cards ("GCs") cannot be transferred for value or redeemed for cash. GCs may be used only for purchases of - eligible goods at Amazon.com or certain of its + eligible goods at Amazon.com or certain of its affiliated websites. For complete terms and conditions, see - www.amazon.com/gc-legal. + www.amazon.com/gc-legal. GCs are issued by ACI Gift Cards, Inc., a Washington corporation. All Amazon ®, ™ & © are IP - of Amazon.com, Inc. or its affiliates. + of Amazon.com, Inc. or its affiliates. No expiration date or service fees.
diff --git a/www/views/glidera.html b/www/views/glidera.html index 314297c05..4fe56cb16 100644 --- a/www/views/glidera.html +++ b/www/views/glidera.html @@ -36,7 +36,7 @@

Connect your Glidera account to get started

@@ -96,7 +96,7 @@
Your Glidera account is not ready to transact. Please, verify it at Glidera.io
+ ng-click="openExternalLink(glideraUrl, false)"> Go to Glidera
diff --git a/www/views/modals/amazon-card-details.html b/www/views/modals/amazon-card-details.html index 95cee6b29..d9c2813e0 100644 --- a/www/views/modals/amazon-card-details.html +++ b/www/views/modals/amazon-card-details.html @@ -23,7 +23,7 @@
@@ -48,7 +48,7 @@
- See invoice + See invoice
@@ -60,7 +60,7 @@ To redeem your gift card, follow these steps:
    -
  1. 1. Visit www.amazon.com/gc +
  2. 1. Visit www.amazon.com/gc
  3. 2. Click Apply to Account and enter the Claim Code when prompted.
  4. 3. Gift card funds will be applied automatically to eligible orders during the checkout process.
  5. 4. You must pay for any remaining balance on your order with another payment method. @@ -73,7 +73,7 @@

    If you have questions about redeeming your gift card, please visit - www.amazon.com/gc-redeem. + www.amazon.com/gc-redeem. If you have questions regarding the BitPay Introductory offer, please contact BitPay.

    @@ -81,13 +81,13 @@
    * Amazon.com is not a sponsor of this promotion. - Except as required by law, Amazon.com + Except as required by law, Amazon.com Gift Cards ("GCs") cannot be transferred for value or redeemed for cash. GCs may be used only for purchases of - eligible goods at Amazon.com or certain of its + eligible goods at Amazon.com or certain of its affiliated websites. For complete terms and conditions, see - www.amazon.com/gc-legal. + www.amazon.com/gc-legal. GCs are issued by ACI Gift Cards, Inc., a Washington corporation. All Amazon ®, ™ & © are IP - of Amazon.com, Inc. or its affiliates. + of Amazon.com, Inc. or its affiliates. No expiration date or service fees.
    diff --git a/www/views/modals/terms.html b/www/views/modals/terms.html index d2872f95b..d5bf23609 100644 --- a/www/views/modals/terms.html +++ b/www/views/modals/terms.html @@ -10,7 +10,7 @@
    - Official English Disclaimer + Official English Disclaimer

    I have read, understood, and agree with the Terms of use.

    diff --git a/www/views/modals/tx-details.html b/www/views/modals/tx-details.html index 47f9911e1..af5272235 100644 --- a/www/views/modals/tx-details.html +++ b/www/views/modals/tx-details.html @@ -70,7 +70,7 @@
    + ng-click="openExternalLink('https://' + (getShortNetworkName() == 'test' ? 'test-' : '', 'blockchain transaction') + 'insight.bitpay.com/tx/' + btx.txid, yes, 'View Transaction on Insight', 'Would you like to view this transaction on the Insight blockchain explorer?
', 'Open Insight', 'Go back')"> View transaction on the blockchain
    diff --git a/www/views/preferencesAbout.html b/www/views/preferencesAbout.html index 356dc74c4..72ff490e6 100644 --- a/www/views/preferencesAbout.html +++ b/www/views/preferencesAbout.html @@ -16,7 +16,7 @@ v{{version}} -
    +
    Commit hash diff --git a/www/views/preferencesLanguage.html b/www/views/preferencesLanguage.html index 9ad77f72a..2c01d7d61 100644 --- a/www/views/preferencesLanguage.html +++ b/www/views/preferencesLanguage.html @@ -13,8 +13,10 @@
    - All contributions to Copay's translation are welcome. Sign up at crowdin.com and join the Copay project at - https://crowdin.com/project/copay. + We’re always looking for translation contributions! You can make corrections or help to make this app available in your native language by joining our community on Crowdin. + Don't see your language on Crowdin? Contact the Owner on Crowdin! We'd love to support your language. diff --git a/www/views/tab-settings.html b/www/views/tab-settings.html index 80cf2af3b..2c94c426c 100644 --- a/www/views/tab-settings.html +++ b/www/views/tab-settings.html @@ -123,7 +123,7 @@
    - + diff --git a/www/views/translators.html b/www/views/translators.html index 961a46e26..e2a97d9cb 100644 --- a/www/views/translators.html +++ b/www/views/translators.html @@ -21,8 +21,10 @@

    - All contributions to Copay's translation are welcome. Sign up at crowdin.com and join the Copay project at - https://crowdin.com/project/copay. + We’re always looking for translation contributions! You can make corrections or help to make this app available in your native language by joining our community on Crowdin. +

    Don't see your language on Crowdin? Contact the Owner on Crowdin! We'd love to support your language.