From a761b58ab02b676e22b21e34d7ea0cc7e40a8e8a Mon Sep 17 00:00:00 2001 From: magmahindenburg Date: Thu, 22 Jun 2017 17:50:59 +0900 Subject: [PATCH] Restore Buy bitcoin page and add buy.bitcoin.com as a service there --- app-template/bitcoincom/appConfig.json | 2 +- src/js/controllers/buyBitcoindotcom.js | 16 +++++++++++++ src/js/routes.js | 13 +++++++++- src/js/services/buydotbitcoindotcomService.js | 24 +++++++++++++++++++ www/css/main.css | 18 ++++++++------ www/views/buyBitcoindotcom.html | 19 +++++++++++++++ www/views/buyandsell.html | 19 +++++++++------ www/views/pricechart.html | 19 +++++++++++++++ 8 files changed, 114 insertions(+), 16 deletions(-) create mode 100644 src/js/controllers/buyBitcoindotcom.js create mode 100644 src/js/services/buydotbitcoindotcomService.js create mode 100644 www/views/buyBitcoindotcom.html create mode 100644 www/views/pricechart.html diff --git a/app-template/bitcoincom/appConfig.json b/app-template/bitcoincom/appConfig.json index 0d4ae2805..09a579fd6 100644 --- a/app-template/bitcoincom/appConfig.json +++ b/app-template/bitcoincom/appConfig.json @@ -23,7 +23,7 @@ "pushSenderId": "1036948132229", "description": "A Secure Bitcoin Wallet", "version": "3.5.7", - "androidVersion": "350007", + "androidVersion": "350701", "_extraCSS": "", "_enabledExtensions": { "coinbase": false, diff --git a/src/js/controllers/buyBitcoindotcom.js b/src/js/controllers/buyBitcoindotcom.js new file mode 100644 index 000000000..741898c34 --- /dev/null +++ b/src/js/controllers/buyBitcoindotcom.js @@ -0,0 +1,16 @@ +'use strict'; + +angular.module('copayApp.controllers').controller('buyBitcoindotcomController', + function($scope, $timeout, $ionicModal, $log, $state, $ionicHistory, lodash, bitcoincomService, externalLinkService, popupService) { + + $scope.openExternalLink = function(url) { + externalLinkService.open(url); + }; + + var buyBitcoindotcom = function() { + }; + + $scope.$on("$ionicView.beforeEnter", function(event, data) { + buyBitcoindotcom(); + }); + }); diff --git a/src/js/routes.js b/src/js/routes.js index 6e88e4a4e..caf6caf23 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -1026,6 +1026,17 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) + /* buy.Bitcoin.com */ + .state('tabs.buyandsell.bitcoindotcom', { + url: '/buyBitcoindotcom', + views: { + 'tab-home@tabs': { + controller: 'buyBitcoindotcomController', + templateUrl: 'views/buyBitcoindotcom.html' + } + } + }) + /* * * Amazon.com Gift Card @@ -1135,7 +1146,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }); }) - .run(function($rootScope, $state, $location, $log, $timeout, startupService, fingerprintService, $ionicHistory, $ionicPlatform, $window, appConfigService, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService, configService, emailService, /* plugins START HERE => */ coinbaseService, glideraService, amazonService, bitpayCardService, applicationService) { + .run(function($rootScope, $state, $location, $log, $timeout, startupService, fingerprintService, $ionicHistory, $ionicPlatform, $window, appConfigService, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService, configService, emailService, /* plugins START HERE => */ glideraService, buydotbitcoindotcomService, amazonService, bitpayCardService, applicationService) { uxLanguage.init(); diff --git a/src/js/services/buydotbitcoindotcomService.js b/src/js/services/buydotbitcoindotcomService.js new file mode 100644 index 000000000..fee4e5a9a --- /dev/null +++ b/src/js/services/buydotbitcoindotcomService.js @@ -0,0 +1,24 @@ +'use strict'; + +angular.module('copayApp.services').factory('buydotbitcoindotcomService', function($http, $log, $window, $filter, platformInfo, storageService, buyAndSellService, lodash, configService, txFormatService) { + var root = {}; + var credentials = {}; + var isCordova = platformInfo.isCordova; + + root.init = function(cb) { + + }; + + var register = function() { + + buyAndSellService.register({ + name: 'buydotbitcoindotcom', + logo: 'img/bitcoin-com-logo.png', + location: 'Buy Bitcoin With Credit Card', + sref: 'tabs.buyandsell.bitcoindotcom' + }); + }; + + register(); + return root; +}); diff --git a/www/css/main.css b/www/css/main.css index 15ded7ba0..c795d37a7 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -11319,9 +11319,6 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm display: block; align-items: center; justify-content: center; } - @media (max-width: 320px) { - #walletDetails .amount { - padding-top: 60px; } } #walletDetails .amount.collapsible { margin-bottom: 10px; } #walletDetails .amount__balance { @@ -11420,6 +11417,9 @@ a.item { color: #727272; padding: 2px 1rem; background: #f8f8f9; } + #bitpayCard .status-label i { + position: absolute; + padding-left: 5px; } #bitpayCard .comment { padding: 15px; background: #f8f8f9; @@ -11470,10 +11470,14 @@ a.item { padding: 0 0 0 1rem; margin: 0; border: 0; } - #bitpayCard .item.activity.receive .svg #-Transaction-icons { - stroke: #09C286; } - #bitpayCard .item.activity.pending .svg #-Transaction-icons { - stroke: #fab915; } + #bitpayCard .item.activity.receive .svg #-Transaction-icons, + #bitpayCard .item.activity.receive .tx-icon .houston { + stroke: #09C286; + color: #09C286; } + #bitpayCard .item.activity.pending .svg #-Transaction-icons, + #bitpayCard .item.activity.pending .tx-icon .houston { + stroke: #fab915; + color: #fab915; } #bitpayCard .tx-icon { margin-right: 25px; } #bitpayCard .tx-icon .houston { diff --git a/www/views/buyBitcoindotcom.html b/www/views/buyBitcoindotcom.html new file mode 100644 index 000000000..d18090956 --- /dev/null +++ b/www/views/buyBitcoindotcom.html @@ -0,0 +1,19 @@ + + + + + Buy with a credit card + + +
+
+ + + +
Buy bitcoin with credit card using Simplex
+
Click on the link below to go to Buy.Bitcoin.com
+
+
+
+
+
diff --git a/www/views/buyandsell.html b/www/views/buyandsell.html index 4a5c27d48..629e28568 100644 --- a/www/views/buyandsell.html +++ b/www/views/buyandsell.html @@ -2,19 +2,24 @@ - Buy Bitcoin + Buy or Sell Bitcoin
-
Buy Bitcoin
-
Buy bitcoin using a credit card
-
-
- -
+ + + +
Connect an Exchange
+
Buy or sell bitcoin directly from your wallet by connecting your exchange accounts.
+
+
+ + {{service.location}} + +
diff --git a/www/views/pricechart.html b/www/views/pricechart.html new file mode 100644 index 000000000..8970c5b1b --- /dev/null +++ b/www/views/pricechart.html @@ -0,0 +1,19 @@ + + + + + Bitcoin Price Chart + + +
+
+
$2500
+
High:
$2500
+
Low:
$2500
+
+
+
+
+
+
+