From 905b0f8c8d358292f993fefdcd9c0448341d83ca Mon Sep 17 00:00:00 2001 From: Jason Dreyzehner Date: Wed, 1 Feb 2017 16:58:24 -0500 Subject: [PATCH] feat(glidera): clearer expectations on glidera integration setup --- src/js/controllers/glidera.js | 33 ++++++ src/js/services/glideraService.js | 8 ++ src/sass/views/integrations/integrations.scss | 6 + www/views/buyandsell.html | 4 +- www/views/coinbase.html | 4 +- www/views/glidera.html | 104 +++++++++--------- 6 files changed, 101 insertions(+), 58 deletions(-) diff --git a/src/js/controllers/glidera.js b/src/js/controllers/glidera.js index bb746274f..d47721c67 100644 --- a/src/js/controllers/glidera.js +++ b/src/js/controllers/glidera.js @@ -114,7 +114,40 @@ angular.module('copayApp.controllers').controller('glideraController', }); }; + $scope.openAuthenticateWindow = function() { + $scope.openExternalLink($scope.getAuthenticateUrl()); + $scope.showOauthForm = true + } + + $scope.openLoginWindow = function() { + var glideraUrl = ($scope.network === 'testnet') ? 'https://sandbox.glidera.io/login' : 'https://glidera.io/login'; + $scope.openExternalLink(glideraUrl); + } + + $scope.openSupportWindow = function() { + var url = glideraService.getSupportUrl(); + var optIn = true; + var title = gettextCatalog.getString('Glidera Support'); + var message = gettextCatalog.getString('You can email glidera at support@glidera.io for direct support, or you can contact Glidera on Twitter.'); + var okText = gettextCatalog.getString('Tweet @GlideraInc'); + var cancelText = gettextCatalog.getString('Go Back'); + externalLinkService.open(url, optIn, title, message, okText, cancelText); + } + + $scope.retry = function() { + $scope.connectingGlidera = true; + $scope.update({'fullUpdate': true}); + $timeout(function(){ + $scope.connectingGlidera = false; + }, 300); + } + + $scope.toggleOauthForm = function() { + $scope.showOauthForm = !$scope.showOauthForm; + } + $scope.$on("$ionicView.beforeEnter", function(event, data) { + $scope.showOauthForm = false; initGlidera(); }); diff --git a/src/js/services/glideraService.js b/src/js/services/glideraService.js index 06e30cf14..94efde61a 100644 --- a/src/js/services/glideraService.js +++ b/src/js/services/glideraService.js @@ -48,6 +48,14 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l return credentials.NETWORK; }; + root.getSignupUrl = function() { + return credentials.HOST + '/register'; + } + + root.getSupportUrl = function() { + return 'https://twitter.com/GlideraInc'; + } + root.getOauthCodeUrl = function() { _setCredentials(); return credentials.HOST + '/oauth2/auth?response_type=code&client_id=' + credentials.CLIENT_ID + '&redirect_uri=' + credentials.REDIRECT_URI; diff --git a/src/sass/views/integrations/integrations.scss b/src/sass/views/integrations/integrations.scss index 24c6dc4f1..4f0c0aaba 100644 --- a/src/sass/views/integrations/integrations.scss +++ b/src/sass/views/integrations/integrations.scss @@ -2,6 +2,12 @@ @import "glidera"; @import "amazon"; +#coinbase, #glidera { + .button-small { + font-size: 13px; + } +} + .integration-onboarding { height: 100%; display: flex; diff --git a/www/views/buyandsell.html b/www/views/buyandsell.html index bd2a32466..7bd442f9e 100644 --- a/www/views/buyandsell.html +++ b/www/views/buyandsell.html @@ -11,13 +11,13 @@
Connect an Exchange
-
Buy and sell bitcoin directly from your wallet by connecting an exchange account.
+
Buy and sell bitcoin directly from your wallet by connecting your exchange accounts.
- International + 33 Countries diff --git a/www/views/coinbase.html b/www/views/coinbase.html index 615f64713..e7ad4f4db 100644 --- a/www/views/coinbase.html +++ b/www/views/coinbase.html @@ -5,7 +5,7 @@ Coinbase - @@ -35,7 +35,7 @@ - + diff --git a/www/views/glidera.html b/www/views/glidera.html index 645a6df1e..8f6ee3698 100644 --- a/www/views/glidera.html +++ b/www/views/glidera.html @@ -3,72 +3,68 @@ Glidera - - - - -
- Glidera is disabled for this application -
- -
- Testnet wallets only work with Glidera Sandbox Accounts -
- -
- -
-
- + + + + + +
+ The Glidera integration is currently disabled. +
+
+ Testnet wallets only work with Glidera Sandbox Accounts. +
+
+ -
-

You can buy and sell Bitcoin with a US bank account directly in this app.

- -

Connect your Glidera account to get started.

- - -
-
-

Glidera Inc. (Glidera) is providing the service of buying or selling bitcoin to BitPay users. To enable this service, Glidera has registered with US Treasury Department’s FinCEN as a Money Service Business (#31000042625755). Users of BitPay must agree to the service agreement presented by Glidera prior to obtaining Glidera’s service of buying or selling bitcoin.

-

Service is available in the U.S. and Canada.

-
+
Glidera's service is available in the United States, and can take 1-2 weeks to buy or sell bitcoin.
+
If you have trouble, contact Glidera support for direct assistance.
+
+ +
-
-
-
-
-
+ -
-
- + +
+ +
Please complete your account verification on Glidera's website. If you have trouble, contact Glidera's support for direct assistance.
+
+ + +
-
-

Complete Setup

-
Your Glidera account is not ready to transact. Please, verify it at Glidera.io
- - Go to Glidera - + + + +
+