Shapeshift item on home tab now goes to the Shapeshift website.

This commit is contained in:
Brendon Duncan 2018-09-05 12:37:39 +12:00
commit 8c62bc445a
3 changed files with 14 additions and 3 deletions

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('servicesController', function($scope, $ionicScrollDelegate, $timeout, servicesService, configService) { angular.module('copayApp.controllers').controller('servicesController', function(externalLinkService, $scope, $ionicScrollDelegate, $timeout, servicesService, configService) {
$scope.hide = false; $scope.hide = false;
configService.whenAvailable(function(config) { configService.whenAvailable(function(config) {
@ -20,4 +20,8 @@ angular.module('copayApp.controllers').controller('servicesController', function
}, 10); }, 10);
}; };
$scope.open = function(url) {
externalLinkService.open(url, false);
}
}); });

View file

@ -5,7 +5,7 @@ angular.module('copayApp.services').factory('servicesService', function(configSe
name: 'shapeshift', name: 'shapeshift',
title: 'Shapeshift', title: 'Shapeshift',
icon: 'icon-shapeshift', icon: 'icon-shapeshift',
sref: 'tabs.shapeshift', href: 'https://shapeshift.io/'
}]; }];
root.register = function(serviceInfo) { root.register = function(serviceInfo) {

View file

@ -6,7 +6,14 @@
</div> </div>
<div ng-show="!hide"> <div ng-show="!hide">
<div ng-repeat="service in services track by $index"> <div ng-repeat="service in services track by $index">
<a ui-sref="{{service.sref}}" id="home_{{service.name}}" title="{{service.title || service.name}}" class="track_link_click_out item item-sub item-icon-left item-big-icon-left item-icon-right next-step"> <a ng-if="service.sref" ui-sref="{{service.sref}}" id="home_{{service.name}}" title="{{service.title || service.name}}" class="track_link_click_out item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg theme-circle theme-circle-services">
<div class="bg {{service.icon}}"></div>
</i>
<span>{{service.title || service.name}}</span>
<i class="icon bp-arrow-right"></i>
</a>
<a ng-if="!service.sref" ng-click="open('{{service.href}}')" id="home_{{service.name}}" title="{{service.title || service.name}}" class="track_link_click_out item item-sub item-icon-left item-big-icon-left item-icon-right next-step">
<i class="icon big-icon-svg theme-circle theme-circle-services"> <i class="icon big-icon-svg theme-circle theme-circle-services">
<div class="bg {{service.icon}}"></div> <div class="bg {{service.icon}}"></div>
</i> </i>