Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/js/controllers/modals/mercadoLibreCardDetails.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

angular.module('copayApp.controllers').controller('mercadoLibreCardDetailsController', function($scope, mercadoLibreService, externalLinkService) {
angular.module('copayApp.controllers').controller('mercadoLibreCardDetailsController', function($scope, mercadoLibreService, externalLinkService, appConfigService, gettextCatalog) {

$scope.remove = function() {
mercadoLibreService.savePendingGiftCard($scope.card, {
Expand All @@ -18,4 +18,15 @@ angular.module('copayApp.controllers').controller('mercadoLibreCardDetailsContro
externalLinkService.open(url);
};

$scope.openSupportWebsite = function() {
var appName = appConfigService.name;
var url = appName == 'copay' ? 'https://github.com/bitpay/copay/issues/new' : 'https://help.bitpay.com/requestHelp';
var optIn = true;
var title = null;
var message = gettextCatalog.getString('Help and support information is available at the website.');
var okText = gettextCatalog.getString('Open');
var cancelText = gettextCatalog.getString('Go Back');
externalLinkService.open(url, optIn, title, message, okText, cancelText);
};

});
7 changes: 6 additions & 1 deletion www/views/modals/mercadolibre-card-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,14 @@ <h1 class="title" translate>Details</h1>
<i class="icon bp-arrow-right"></i>
<span translate>See invoice</span>
</div>

<div ng-show="card.status == 'FAILURE'" class="item item-icon-right" ng-click="openSupportWebsite()">
<i class="icon bp-arrow-right"></i>
<span>{{'Help & Support' | translate }}</span>
</div>
</div>

<div class="card-remove" ng-show="card.status == 'FAILURE' || card.cardStatus == 'inactive' || card.cardStatus == 'expired' || card.status == 'expired'">
<div class="card-remove" ng-show="card.cardStatus == 'inactive' || card.cardStatus == 'expired' || card.status == 'expired'">
<button class="button-remove" ng-click="remove()" translate>
Remove
</button>
Expand Down