feat(glidera): clearer expectations on glidera integration setup

This commit is contained in:
Jason Dreyzehner 2017-02-01 16:58:24 -05:00
commit 905b0f8c8d
6 changed files with 101 additions and 58 deletions

View file

@ -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();
});

View file

@ -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;

View file

@ -2,6 +2,12 @@
@import "glidera";
@import "amazon";
#coinbase, #glidera {
.button-small {
font-size: 13px;
}
}
.integration-onboarding {
height: 100%;
display: flex;