Adds btc values. Adds disclosure. Fix modals. Removes sandbox

This commit is contained in:
Gustavo Maximiliano Cortez 2015-10-05 12:20:00 -03:00
commit 20bb8680be
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
6 changed files with 30 additions and 24 deletions

View file

@ -58,11 +58,21 @@
<div class="text-center m20v">
<img src="img/glidera-logo.png" ng-click="index.updateGlidera(index.glideraToken, index.glideraPermissions)" width="200">
</div>
<div class="text-center small-10 small-centered columns" ng-show="!showOauthForm">
<div class="text-center small-10 small-centered columns" ng-show="!showOauthForm">
<p class="m10b">You can buy and sell Bitcoin with a US bank account directly in Copay.</p>
<p class="text-gray size-12">Connect your Glidera account to get started</p>
<a class="button m20t light-gray outline round small"
<p class="m20t text-gray size-12 text-left">
DISCLOSURE.<br>
Glidera Inc. (Glidera) is providing the service of buying or selling bitcoins to Copay users. To enable this
service, Glidera has registered with US Treasury Departments FinCEN as a Money Service Business
(#31000042625755). Users of Copay must agree to the service agreement presented by Glidera prior to obtaining
Glideras service of buying or selling bitcoins. Service available in U.S. only; (buy & sell) CA, GA, IL, KS,
MA, MD, MO, MT, MN, SC, TX; (buy only) AZ, CO, DE, ME, NJ, PA, TN, UT.
</p>
<p class="m20t text-gray size-12">Connect your Glidera account to get started</p>
<a class="button light-gray outline round small"
ng-click="$root.openExternalLink(glidera.getAuthenticateUrl(), '_system'); showOauthForm = true">
Connect to Glidera
</a>
@ -175,6 +185,11 @@
</div>
<div class="large-4 medium-4 small-4 columns">
<div class="size-14">
<span ng-show="tx.type == 'BUY'">Bought</span>
<span ng-show="tx.type == 'SELL'">Sold</span>
<b>{{tx.qty}}</b> BTC
</div>
<span class="size-14 text-bold">
{{tx.subtotal|currency:'':2}} {{tx.currency}}
</span>

View file

@ -26,7 +26,6 @@
<div translate>Create, join or import</div>
</a>
</li>
<!-- // DISABLED
<li ng-show="index.glideraEnabled">
<a ng-click="$root.go('glidera')" class="oh">
<i class="icon-arrow-right3 size-18 right m10t"></i>
@ -37,6 +36,5 @@
<div>Glidera</div>
</a>
</li>
-->
</ul>
</nav>

View file

@ -22,6 +22,7 @@
</div>
<span ng-show="tx.type == 'BUY'">Bought</span>
<span ng-show="tx.type == 'SELL'">Sold</span>
<b>{{tx.qty}}</b> BTC
<div class="size-36 m20b">
{{tx.subtotal|currency:'':2}} {{tx.currency}}
</div>

View file

@ -105,11 +105,11 @@
</span>
</li>
<!-- // DISABLED
<li class="line-b p20" ng-show="!index.noFocusedWallet">
<span>Enable Glidera Service</span>
<switch id="glidera-enabled" name="glideraEnabled" ng-model="glideraEnabled" class="green right"></switch>
</li>
<!-- Disabled for testnet
<li class="line-b p20" ng-show="!index.noFocusedWallet && glideraEnabled">
<span>Glidera Sandbox</span>
<switch id="glidera-testnet" name="glideraTestnet" ng-model="glideraTestnet" class="green right"></switch>

View file

@ -1,9 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('glideraController',
function($scope, $timeout, $modal, profileService, configService, storageService, glideraService, isChromeApp) {
var config = configService.getSync().wallet.settings;
function($scope, $timeout, $modal, profileService, configService, storageService, glideraService, isChromeApp, animationService) {
this.getAuthenticateUrl = function() {
return glideraService.getOauthCodeUrl();
@ -35,16 +33,9 @@ angular.module('copayApp.controllers').controller('glideraController',
}, 100);
};
// DISABLE ANIMATION ON CHROMEAPP
if (isChromeApp) {
var animatedSlideRight = 'full';
}
else {
var animatedSlideRight = 'full animated slideInRight';
}
this.openTxModal = function(token, tx) {
var self = this;
var config = configService.getSync().wallet.settings;
var fc = profileService.focusedClient;
var ModalInstanceCtrl = function($scope, $modalInstance) {
$scope.tx = tx;
@ -63,13 +54,13 @@ angular.module('copayApp.controllers').controller('glideraController',
var modalInstance = $modal.open({
templateUrl: 'views/modals/glidera-tx-details.html',
windowClass: animatedSlideRight,
windowClass: animationService.modalAnimated.slideRight,
controller: ModalInstanceCtrl,
});
modalInstance.result.finally(function() {
var m = angular.element(document.getElementsByClassName('reveal-modal'));
m.addClass('slideOutRight');
m.addClass(animationService.modalAnimated.slideOutRight);
});
};

View file

@ -110,8 +110,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.updateColor();
self.updateAlias();
// DISABLED
//self.initGlidera();
self.initGlidera();
if (fc.isPrivKeyExternal()) {
self.needsBackup = false;
@ -840,8 +839,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.initGlidera = function(accessToken) {
self.glideraEnabled = configService.getSync().glidera.enabled;
self.glideraTestnet = configService.getSync().glidera.testnet;
var network = self.glideraTestnet ? 'testnet' : 'livenet';
// self.glideraTestnet = configService.getSync().glidera.testnet;
// var network = self.glideraTestnet ? 'testnet' : 'livenet';
// Disabled for testnet
var network = 'livenet';
self.glideraToken = null;
self.glideraError = null;
@ -1164,4 +1165,4 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.setFocusedWallet();
});
});
});
});