.
This commit is contained in:
commit
6743243bab
24 changed files with 1177 additions and 968 deletions
|
|
@ -1,26 +1,89 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('buyGlideraController',
|
||||
function($scope, $timeout, $ionicModal, profileService, addressService, glideraService, bwcError, lodash, ongoingProcess) {
|
||||
function($scope, $timeout, $log, $ionicModal, profileService, walletService, glideraService, bwcError, lodash, ongoingProcess) {
|
||||
|
||||
var wallet;
|
||||
var self = this;
|
||||
this.show2faCodeInput = null;
|
||||
this.error = null;
|
||||
this.success = null;
|
||||
|
||||
this.init = function(testnet) {
|
||||
self.allWallets = profileService.getWallets(testnet ? 'testnet' : 'livenet');
|
||||
$scope.init = function(accessToken) {
|
||||
$scope.network = glideraService.getEnvironment();
|
||||
|
||||
var client = profileService.focusedClient;
|
||||
if (client) {
|
||||
$scope.token = accessToken;
|
||||
$scope.error = null;
|
||||
$scope.permissions = null;
|
||||
$scope.email = null;
|
||||
$scope.personalInfo = null;
|
||||
$scope.txs = null;
|
||||
$scope.status = null;
|
||||
$scope.limits = null;
|
||||
|
||||
ongoingProcess.set('connectingGlidera', true);
|
||||
glideraService.init($scope.token, function(err, glidera) {
|
||||
ongoingProcess.set('connectingGlidera');
|
||||
if (err || !glidera) {
|
||||
$scope.error = err;
|
||||
return;
|
||||
}
|
||||
$scope.token = glidera.token;
|
||||
$scope.permissions = glidera.permissions;
|
||||
$scope.update({fullUpdate: true});
|
||||
});
|
||||
|
||||
self.allWallets = profileService.getWallets({
|
||||
network: $scope.network,
|
||||
n: 1,
|
||||
onlyComplete: true
|
||||
});
|
||||
if (lodash.isEmpty(self.allWallets)) return;
|
||||
|
||||
wallet = self.allWallets[0];
|
||||
if (wallet) {
|
||||
$timeout(function() {
|
||||
self.selectedWalletId = client.credentials.walletId;
|
||||
self.selectedWalletName = client.credentials.walletName;
|
||||
self.selectedWalletId = wallet.credentials.walletId;
|
||||
self.selectedWalletName = wallet.credentials.walletName;
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.update = function(opts) {
|
||||
if (!$scope.token || !$scope.permissions) return;
|
||||
$log.debug('Updating Glidera Account...');
|
||||
var accessToken = $scope.token;
|
||||
var permissions = $scope.permissions;
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
glideraService.getStatus(accessToken, function(err, data) {
|
||||
$scope.status = data;
|
||||
});
|
||||
|
||||
glideraService.getLimits(accessToken, function(err, limits) {
|
||||
$scope.limits = limits;
|
||||
});
|
||||
|
||||
if (permissions.transaction_history) {
|
||||
glideraService.getTransactions(accessToken, function(err, data) {
|
||||
$scope.txs = data;
|
||||
});
|
||||
}
|
||||
|
||||
if (permissions.view_email_address && opts.fullUpdate) {
|
||||
glideraService.getEmail(accessToken, function(err, data) {
|
||||
$scope.email = data.email;
|
||||
});
|
||||
}
|
||||
if (permissions.personal_info && opts.fullUpdate) {
|
||||
glideraService.getPersonalInfo(accessToken, function(err, data) {
|
||||
$scope.personalInfo = data;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.openWalletsModal = function(wallets) {
|
||||
self.error = null;
|
||||
|
||||
|
|
@ -39,9 +102,9 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
|
|||
|
||||
$scope.$on('walletSelected', function(ev, walletId) {
|
||||
$timeout(function() {
|
||||
var client = profileService.getClient(walletId);
|
||||
wallet = profileService.getClient(walletId);
|
||||
self.selectedWalletId = walletId;
|
||||
self.selectedWalletName = client.credentials.walletName;
|
||||
self.selectedWalletName = wallet.credentials.walletName;
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
$scope.walletsModal.hide();
|
||||
|
|
@ -87,7 +150,7 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
|
|||
self.error = null;
|
||||
ongoingProcess.set('Buying Bitcoin...', true);
|
||||
$timeout(function() {
|
||||
addressService.getAddress(self.selectedWalletId, false, function(err, walletAddr) {
|
||||
walletService.getAddress(wallet, false, function(err, walletAddr) {
|
||||
if (err) {
|
||||
ongoingProcess.set('Buying Bitcoin...', false);
|
||||
self.error = bwcError.cb(err, 'Could not create address');
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, txStatus, gettext, txFormatService) {
|
||||
angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, profileService, bitcore, $ionicPopup, txStatus, gettext, txFormatService) {
|
||||
|
||||
var cachedTxp = {};
|
||||
|
||||
// An alert dialog
|
||||
var showAlert = function(title, msg, cb) {
|
||||
$log.warn(title + ":" + msg);
|
||||
$log.warn(title + ": " + msg);
|
||||
var alertPopup = $ionicPopup.alert({
|
||||
title: title,
|
||||
template: msg
|
||||
|
|
@ -17,6 +17,29 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
alertPopup.then(cb);
|
||||
};
|
||||
|
||||
$scope.showDescriptionPopup = function() {
|
||||
var commentPopup = $ionicPopup.show({
|
||||
templateUrl: "views/includes/note.html",
|
||||
title: gettextCatalog.getString('Set description'),
|
||||
scope: $scope,
|
||||
});
|
||||
$scope.commentPopupClose = function() {
|
||||
commentPopup.close();
|
||||
};
|
||||
$scope.commentPopupSave = function() {
|
||||
$log.debug('Saving description: ' + $scope.data.comment);
|
||||
$scope.description = $scope.data.comment;
|
||||
$scope.txp = null;
|
||||
|
||||
createTx($scope.wallet, $scope.toAddress, $scope.toAmount, $scope.data.comment, function(err, txp) {
|
||||
if (err) return;
|
||||
cachedTxp[$scope.wallet.id] = txp;
|
||||
apply(txp);
|
||||
});
|
||||
commentPopup.close();
|
||||
};
|
||||
};
|
||||
|
||||
$scope.init = function() {
|
||||
|
||||
// TODO (URL , etc)
|
||||
|
|
@ -67,17 +90,11 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
stop = null;
|
||||
}
|
||||
|
||||
function apply(txp) {
|
||||
$scope.fee = txFormatService.formatAmountStr(txp.fee);
|
||||
$scope.txp = txp;
|
||||
$scope.$apply();
|
||||
};
|
||||
|
||||
if (cachedTxp[wallet.id]) {
|
||||
apply(cachedTxp[wallet.id]);
|
||||
} else {
|
||||
stop = $timeout(function() {
|
||||
createTx(wallet, $scope.toAddress, $scope.toAmount, $scope.comment, function(err, txp) {
|
||||
createTx(wallet, $scope.toAddress, $scope.toAmount, $scope.description, function(err, txp) {
|
||||
if (err) return;
|
||||
cachedTxp[wallet.id] = txp;
|
||||
apply(txp);
|
||||
|
|
@ -106,7 +123,13 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
showAlert(gettext('Error creating transaction'), msg);
|
||||
};
|
||||
|
||||
var createTx = function(wallet, toAddress, toAmount, comment, cb) {
|
||||
function apply(txp) {
|
||||
$scope.fee = txFormatService.formatAmountStr(txp.fee);
|
||||
$scope.txp = txp;
|
||||
$scope.$apply();
|
||||
};
|
||||
|
||||
var createTx = function(wallet, toAddress, toAmount, description, cb) {
|
||||
var config = configService.getSync().wallet;
|
||||
|
||||
//
|
||||
|
|
@ -117,7 +140,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
var paypro = $scope.paypro;
|
||||
|
||||
// ToDo: use a credential's (or fc's) function for this
|
||||
if (comment && !wallet.credentials.sharedEncryptingKey) {
|
||||
if (description && !wallet.credentials.sharedEncryptingKey) {
|
||||
var msg = 'Could not add message to imported wallet without shared encrypting key';
|
||||
$log.warn(msg);
|
||||
return setSendError(gettext(msg));
|
||||
|
|
@ -132,7 +155,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
outputs.push({
|
||||
'toAddress': toAddress,
|
||||
'amount': toAmount,
|
||||
'message': comment
|
||||
'message': description
|
||||
});
|
||||
|
||||
var txp = {};
|
||||
|
|
@ -145,7 +168,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
}
|
||||
|
||||
txp.outputs = outputs;
|
||||
txp.message = comment;
|
||||
txp.message = description;
|
||||
txp.payProUrl = paypro ? paypro.url : null;
|
||||
txp.excludeUnconfirmedUtxos = config.spendUnconfirmed ? false : true;
|
||||
txp.feeLevel = config.settings.feeLevel || 'normal';
|
||||
|
|
|
|||
|
|
@ -1,33 +1,98 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('glideraController',
|
||||
function($rootScope, $scope, $timeout, $ionicModal, profileService, configService, storageService, glideraService, lodash, ongoingProcess, platformInfo) {
|
||||
function($rootScope, $scope, $timeout, $ionicModal, $log, profileService, storageService, glideraService, lodash, ongoingProcess, platformInfo, nodeWebkit) {
|
||||
|
||||
if (platformInfo.isCordova && StatusBar.isVisible) {
|
||||
StatusBar.backgroundColorByHexString("#4B6178");
|
||||
}
|
||||
|
||||
$scope.openExternalLink = function(url, target) {
|
||||
if (platformInfo.isNW) {
|
||||
nodeWebkit.openExternalLink(url);
|
||||
} else {
|
||||
target = target || '_blank';
|
||||
var ref = window.open(url, target, 'location=no');
|
||||
}
|
||||
};
|
||||
|
||||
$scope.init = function(accessToken) {
|
||||
$scope.network = glideraService.getEnvironment();
|
||||
|
||||
$scope.token = null;
|
||||
$scope.error = null;
|
||||
$scope.permissions = null;
|
||||
$scope.email = null;
|
||||
$scope.personalInfo = null;
|
||||
$scope.txs = null;
|
||||
$scope.status = null;
|
||||
$scope.limits = null;
|
||||
|
||||
ongoingProcess.set('connectingGlidera', true);
|
||||
glideraService.init($scope.token, function(err, glidera) {
|
||||
ongoingProcess.set('connectingGlidera');
|
||||
if (err || !glidera) {
|
||||
$scope.error = err;
|
||||
return;
|
||||
}
|
||||
$scope.token = glidera.token;
|
||||
$scope.permissions = glidera.permissions;
|
||||
$scope.update({fullUpdate: true});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.update = function(opts) {
|
||||
if (!$scope.token || !$scope.permissions) return;
|
||||
$log.debug('Updating Glidera Account...');
|
||||
var accessToken = $scope.token;
|
||||
var permissions = $scope.permissions;
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
glideraService.getStatus(accessToken, function(err, data) {
|
||||
$scope.status = data;
|
||||
});
|
||||
|
||||
glideraService.getLimits(accessToken, function(err, limits) {
|
||||
$scope.limits = limits;
|
||||
});
|
||||
|
||||
if (permissions.transaction_history) {
|
||||
glideraService.getTransactions(accessToken, function(err, data) {
|
||||
$scope.txs = data;
|
||||
});
|
||||
}
|
||||
|
||||
if (permissions.view_email_address && opts.fullUpdate) {
|
||||
glideraService.getEmail(accessToken, function(err, data) {
|
||||
$scope.email = data.email;
|
||||
});
|
||||
}
|
||||
if (permissions.personal_info && opts.fullUpdate) {
|
||||
glideraService.getPersonalInfo(accessToken, function(err, data) {
|
||||
$scope.personalInfo = data;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
this.getAuthenticateUrl = function() {
|
||||
return glideraService.getOauthCodeUrl();
|
||||
};
|
||||
|
||||
this.submitOauthCode = function(code) {
|
||||
var self = this;
|
||||
var glideraTestnet = configService.getSync().glidera.testnet;
|
||||
var network = glideraTestnet ? 'testnet' : 'livenet';
|
||||
ongoingProcess.set('connectingGlidera', true);
|
||||
this.error = null;
|
||||
$scope.error = null;
|
||||
$timeout(function() {
|
||||
glideraService.getToken(code, function(err, data) {
|
||||
ongoingProcess.set('connectingGlidera', false);
|
||||
if (err) {
|
||||
self.error = err;
|
||||
$scope.error = err;
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
} else if (data && data.access_token) {
|
||||
storageService.setGlideraToken(network, data.access_token, function() {
|
||||
$scope.$emit('Local/GlideraUpdated', data.access_token);
|
||||
storageService.setGlideraToken($scope.network, data.access_token, function() {
|
||||
$scope.init(data.access_token);
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('importController',
|
||||
function($scope, $rootScope, $timeout, $log, profileService, configService, notification, sjcl, gettext, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService) {
|
||||
function($scope, $rootScope, $timeout, $log, $state, profileService, configService, sjcl, gettext, ledger, trezor, derivationPathHelper, platformInfo, bwcService, ongoingProcess, walletService) {
|
||||
|
||||
var isChromeApp = platformInfo.isChromeApp;
|
||||
var isDevel = platformInfo.isDevel;
|
||||
|
|
@ -110,7 +110,6 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
});
|
||||
|
||||
$rootScope.$emit('Local/WalletImported', client.credentials.walletId);
|
||||
notification.success(gettext('Success'), gettext('Your wallet has been imported correctly'));
|
||||
$state.go('tabs.home');
|
||||
});
|
||||
}, 100);
|
||||
|
|
@ -138,7 +137,6 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
});
|
||||
|
||||
$rootScope.$emit('Local/WalletImported', client.credentials.walletId);
|
||||
notification.success(gettext('Success'), gettext('Your wallet has been imported correctly'));
|
||||
$state.go('tabs.home');
|
||||
});
|
||||
}, 100);
|
||||
|
|
@ -159,7 +157,6 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
});
|
||||
}
|
||||
$rootScope.$emit('Local/WalletImported', walletId);
|
||||
notification.success(gettext('Success'), gettext('Your wallet has been imported correctly'));
|
||||
$state.go('tabs.home');
|
||||
});
|
||||
}, 100);
|
||||
|
|
@ -189,7 +186,6 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
});
|
||||
|
||||
$rootScope.$emit('Local/WalletImported', client.credentials.walletId);
|
||||
notification.success(gettext('Success'), gettext('Your wallet has been imported correctly'));
|
||||
$state.go('tabs.home');
|
||||
});
|
||||
}, 100);
|
||||
|
|
@ -324,7 +320,6 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
$log.debug('Remote preferences saved for:' + wallet.walletId)
|
||||
});
|
||||
$rootScope.$emit('Local/WalletImported', wallet.walletId);
|
||||
notification.success(gettext('Success'), gettext('Your wallet has been imported correctly'));
|
||||
$state.go('tabs.home');
|
||||
});
|
||||
}, 100);
|
||||
|
|
@ -402,7 +397,6 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
$log.debug('Remote preferences saved for:' + wallet.walletId)
|
||||
});
|
||||
$rootScope.$emit('Local/WalletImported', wallet.walletId);
|
||||
notification.success(gettext('Success'), gettext('Your wallet has been imported correctly'));
|
||||
$state.go('tabs.home');
|
||||
});
|
||||
}, 100);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('joinController',
|
||||
function($scope, $rootScope, $timeout, $state, notification, profileService, configService, storageService, applicationService, gettext, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log) {
|
||||
function($scope, $rootScope, $timeout, $state, profileService, configService, storageService, applicationService, gettext, lodash, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, $log) {
|
||||
|
||||
var isChromeApp = platformInfo.isChromeApp;
|
||||
var isDevel = platformInfo.isDevel;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('glideraConfirmationController', function($scope, $timeout, storageService, applicationService) {
|
||||
angular.module('copayApp.controllers').controller('glideraConfirmationController', function($scope, $timeout, $state, glideraService) {
|
||||
|
||||
$scope.ok = function() {
|
||||
storageService.removeGlideraToken($scope.network, function() {
|
||||
glideraService.removeToken(function() {
|
||||
$timeout(function() {
|
||||
applicationService.restart();
|
||||
$state.go('glidera.main');
|
||||
}, 100);
|
||||
});
|
||||
$scope.cancel();
|
||||
|
|
|
|||
|
|
@ -1,43 +1,70 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('preferencesGlideraController',
|
||||
function($scope, $timeout, $ionicModal, profileService, applicationService, glideraService, storageService) {
|
||||
function($scope, $log, $ionicModal, ongoingProcess, glideraService) {
|
||||
|
||||
this.getEmail = function(token) {
|
||||
var self = this;
|
||||
glideraService.getEmail(token, function(error, data) {
|
||||
self.email = data;
|
||||
$scope.init = function(accessToken) {
|
||||
$scope.network = glideraService.getEnvironment();
|
||||
|
||||
$scope.token = accessToken;
|
||||
$scope.error = null;
|
||||
$scope.permissions = null;
|
||||
$scope.email = null;
|
||||
$scope.personalInfo = null;
|
||||
$scope.txs = null;
|
||||
$scope.status = null;
|
||||
$scope.limits = null;
|
||||
|
||||
ongoingProcess.set('connectingGlidera', true);
|
||||
glideraService.init($scope.token, function(err, glidera) {
|
||||
ongoingProcess.set('connectingGlidera');
|
||||
if (err || !glidera) {
|
||||
$scope.error = err;
|
||||
return;
|
||||
}
|
||||
$scope.token = glidera.token;
|
||||
$scope.permissions = glidera.permissions;
|
||||
$scope.update({fullUpdate: true});
|
||||
});
|
||||
};
|
||||
|
||||
this.getPersonalInfo = function(token) {
|
||||
var self = this;
|
||||
glideraService.getPersonalInfo(token, function(error, info) {
|
||||
self.personalInfo = info;
|
||||
$scope.update = function(opts) {
|
||||
if (!$scope.token || !$scope.permissions) return;
|
||||
$log.debug('Updating Glidera Account...');
|
||||
var accessToken = $scope.token;
|
||||
var permissions = $scope.permissions;
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
glideraService.getStatus(accessToken, function(err, data) {
|
||||
$scope.status = data;
|
||||
});
|
||||
|
||||
glideraService.getLimits(accessToken, function(err, limits) {
|
||||
$scope.limits = limits;
|
||||
});
|
||||
|
||||
if (permissions.transaction_history) {
|
||||
glideraService.getTransactions(accessToken, function(err, data) {
|
||||
$scope.txs = data;
|
||||
});
|
||||
}
|
||||
|
||||
if (permissions.view_email_address && opts.fullUpdate) {
|
||||
glideraService.getEmail(accessToken, function(err, data) {
|
||||
$scope.email = data.email;
|
||||
});
|
||||
}
|
||||
if (permissions.personal_info && opts.fullUpdate) {
|
||||
glideraService.getPersonalInfo(accessToken, function(err, data) {
|
||||
$scope.personalInfo = data;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
this.getStatus = function(token) {
|
||||
var self = this;
|
||||
glideraService.getStatus(token, function(error, data) {
|
||||
self.status = data;
|
||||
});
|
||||
};
|
||||
|
||||
this.getLimits = function(token) {
|
||||
var self = this;
|
||||
glideraService.getLimits(token, function(error, limits) {
|
||||
self.limits = limits;
|
||||
});
|
||||
};
|
||||
|
||||
this.revokeToken = function(testnet) {
|
||||
$scope.network = testnet ? 'testnet' : 'livenet';
|
||||
$scope.loading = false;
|
||||
|
||||
$scope.revokeToken = function() {
|
||||
$ionicModal.fromTemplateUrl('views/modals/glidera-confirmation.html', {
|
||||
scope: $scope,
|
||||
animation: 'slide-in-up'
|
||||
scope: $scope
|
||||
}).then(function(modal) {
|
||||
$scope.glideraConfirmationModal = modal;
|
||||
$scope.glideraConfirmationModal.show();
|
||||
|
|
|
|||
|
|
@ -1,38 +1,97 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('sellGlideraController',
|
||||
function($rootScope, $scope, $timeout, $ionicModal, $log, configService, profileService, addressService, feeService, glideraService, bwcError, lodash, walletService, fingerprintService, ongoingProcess, go) {
|
||||
function($rootScope, $scope, $timeout, $ionicModal, $log, profileService, glideraService, bwcError, lodash, walletService, fingerprintService, configService, ongoingProcess) {
|
||||
|
||||
var self = this;
|
||||
var config = configService.getSync();
|
||||
this.data = {};
|
||||
this.show2faCodeInput = null;
|
||||
this.success = null;
|
||||
this.error = null;
|
||||
var client;
|
||||
var wallet;
|
||||
|
||||
var handleEncryptedWallet = function(client, cb) {
|
||||
if (!walletService.isEncrypted(client)) return cb();
|
||||
var handleEncryptedWallet = function(wallet, cb) {
|
||||
if (!walletService.isEncrypted(wallet)) return cb();
|
||||
$rootScope.$emit('Local/NeedsPassword', false, function(err, password) {
|
||||
if (err) return cb(err);
|
||||
return cb(walletService.unlock(client, password));
|
||||
return cb(walletService.unlock(wallet, password));
|
||||
});
|
||||
};
|
||||
|
||||
this.init = function(testnet) {
|
||||
self.allWallets = profileService.getWallets(testnet ? 'testnet' : 'livenet', 1);
|
||||
$scope.init = function(accessToken) {
|
||||
$scope.network = glideraService.getEnvironment();
|
||||
|
||||
client = profileService.focusedClient;
|
||||
if (client && client.credentials.m == 1) {
|
||||
$scope.token = accessToken;
|
||||
$scope.error = null;
|
||||
$scope.permissions = null;
|
||||
$scope.email = null;
|
||||
$scope.personalInfo = null;
|
||||
$scope.txs = null;
|
||||
$scope.status = null;
|
||||
$scope.limits = null;
|
||||
|
||||
ongoingProcess.set('connectingGlidera', true);
|
||||
glideraService.init($scope.token, function(err, glidera) {
|
||||
ongoingProcess.set('connectingGlidera');
|
||||
if (err || !glidera) {
|
||||
$scope.error = err;
|
||||
return;
|
||||
}
|
||||
$scope.token = glidera.token;
|
||||
$scope.permissions = glidera.permissions;
|
||||
$scope.update({fullUpdate: true});
|
||||
});
|
||||
|
||||
self.allWallets = profileService.getWallets({
|
||||
network: $scope.network,
|
||||
n: 1,
|
||||
onlyComplete: true
|
||||
});
|
||||
if (lodash.isEmpty(self.allWallets)) return;
|
||||
|
||||
wallet = self.allWallets[0];
|
||||
if (wallet) {
|
||||
$timeout(function() {
|
||||
self.selectedWalletId = client.credentials.walletId;
|
||||
self.selectedWalletName = client.credentials.walletName;
|
||||
self.selectedWalletId = wallet.credentials.walletId;
|
||||
self.selectedWalletName = wallet.credentials.walletName;
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.update = function(opts) {
|
||||
if (!$scope.token || !$scope.permissions) return;
|
||||
$log.debug('Updating Glidera Account...');
|
||||
var accessToken = $scope.token;
|
||||
var permissions = $scope.permissions;
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
glideraService.getStatus(accessToken, function(err, data) {
|
||||
$scope.status = data;
|
||||
});
|
||||
|
||||
glideraService.getLimits(accessToken, function(err, limits) {
|
||||
$scope.limits = limits;
|
||||
});
|
||||
|
||||
if (permissions.transaction_history) {
|
||||
glideraService.getTransactions(accessToken, function(err, data) {
|
||||
$scope.txs = data;
|
||||
});
|
||||
}
|
||||
|
||||
if (permissions.view_email_address && opts.fullUpdate) {
|
||||
glideraService.getEmail(accessToken, function(err, data) {
|
||||
$scope.email = data.email;
|
||||
});
|
||||
}
|
||||
if (permissions.personal_info && opts.fullUpdate) {
|
||||
glideraService.getPersonalInfo(accessToken, function(err, data) {
|
||||
$scope.personalInfo = data;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.openWalletsModal = function(wallets) {
|
||||
self.error = null;
|
||||
|
|
@ -52,9 +111,9 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
|
|||
|
||||
$scope.$on('walletSelected', function(ev, walletId) {
|
||||
$timeout(function() {
|
||||
client = profileService.getClient(walletId);
|
||||
wallet = profileService.getClient(walletId);
|
||||
self.selectedWalletId = walletId;
|
||||
self.selectedWalletName = client.credentials.walletName;
|
||||
self.selectedWalletName = wallet.credentials.walletName;
|
||||
$scope.$apply();
|
||||
}, 100);
|
||||
$scope.walletsModal.hide();
|
||||
|
|
@ -98,16 +157,17 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
|
|||
var self = this;
|
||||
self.error = null;
|
||||
var outputs = [];
|
||||
var config = configService.getSync();
|
||||
var configWallet = config.wallet;
|
||||
var walletSettings = configWallet.settings;
|
||||
|
||||
if (!client) {
|
||||
if (!wallet) {
|
||||
self.error = 'No wallet selected';
|
||||
return;
|
||||
}
|
||||
|
||||
ongoingProcess.set('creatingTx', true);
|
||||
addressService.getAddress(client.credentials.walletId, null, function(err, refundAddress) {
|
||||
walletService.getAddress(wallet, null, function(err, refundAddress) {
|
||||
if (!refundAddress) {
|
||||
|
||||
ongoingProcess.clear();
|
||||
|
|
@ -142,71 +202,62 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
|
|||
}
|
||||
};
|
||||
|
||||
walletService.createTx(client, txp, function(err, createdTxp) {
|
||||
walletService.createTx(wallet, txp, function(err, createdTxp) {
|
||||
ongoingProcess.clear();
|
||||
if (err) {
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
return;
|
||||
}
|
||||
$scope.$emit('Local/NeedsConfirmation', createdTxp, function(accept) {
|
||||
if (accept) {
|
||||
fingerprintService.check(client, function(err) {
|
||||
fingerprintService.check(wallet, function(err) {
|
||||
if (err) {
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
return;
|
||||
}
|
||||
|
||||
handleEncryptedWallet(wallet, function(err) {
|
||||
if (err) {
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
return;
|
||||
}
|
||||
|
||||
ongoingProcess.set('signingTx', true);
|
||||
walletService.publishTx(wallet, createdTxp, function(err, publishedTxp) {
|
||||
if (err) {
|
||||
ongoingProcess.clear();
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
return;
|
||||
}
|
||||
|
||||
handleEncryptedWallet(client, function(err) {
|
||||
walletService.signTx(wallet, publishedTxp, function(err, signedTxp) {
|
||||
walletService.lock(wallet);
|
||||
walletService.removeTx(wallet, signedTxp, function(err) {
|
||||
if (err) $log.debug(err);
|
||||
});
|
||||
ongoingProcess.clear();
|
||||
if (err) {
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
return;
|
||||
}
|
||||
|
||||
ongoingProcess.set('signingTx', true);
|
||||
walletService.publishTx(client, createdTxp, function(err, publishedTxp) {
|
||||
var rawTx = signedTxp.raw;
|
||||
var data = {
|
||||
refundAddress: refundAddress,
|
||||
signedTransaction: rawTx,
|
||||
priceUuid: self.sellPrice.priceUuid,
|
||||
useCurrentPrice: self.sellPrice.priceUuid ? false : true,
|
||||
ip: null
|
||||
};
|
||||
ongoingProcess.set('Seling Bitcoin', true);
|
||||
glideraService.sell(token, twoFaCode, data, function(err, data) {
|
||||
ongoingProcess.clear();
|
||||
if (err) {
|
||||
ongoingProcess.clear();
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
return;
|
||||
}
|
||||
|
||||
walletService.signTx(client, publishedTxp, function(err, signedTxp) {
|
||||
walletService.lock(client);
|
||||
walletService.removeTx(client, signedTxp, function(err) {
|
||||
if (err) $log.debug(err);
|
||||
});
|
||||
ongoingProcess.clear();
|
||||
if (err) {
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
return;
|
||||
}
|
||||
var rawTx = signedTxp.raw;
|
||||
var data = {
|
||||
refundAddress: refundAddress,
|
||||
signedTransaction: rawTx,
|
||||
priceUuid: self.sellPrice.priceUuid,
|
||||
useCurrentPrice: self.sellPrice.priceUuid ? false : true,
|
||||
ip: null
|
||||
};
|
||||
ongoingProcess.set('Seling Bitcoin', true);
|
||||
glideraService.sell(token, twoFaCode, data, function(err, data) {
|
||||
ongoingProcess.clear();
|
||||
if (err) {
|
||||
self.error = err.message || bwcError.msg(err);
|
||||
$timeout(function() {
|
||||
$scope.$emit('Local/GlideraError');
|
||||
}, 100);
|
||||
return;
|
||||
}
|
||||
self.success = data;
|
||||
$scope.$emit('Local/GlideraTx');
|
||||
});
|
||||
});
|
||||
self.success = data;
|
||||
$scope.update();
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
go.path('glidera');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -93,10 +93,9 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
|
||||
configService.whenAvailable(function() {
|
||||
var config = configService.getSync();
|
||||
var glideraEnabled = config.glidera.enabled;
|
||||
var coinbaseEnabled = config.coinbase.enabled;
|
||||
var isWindowsPhoneApp = platformInfo.isWP && isCordova;
|
||||
$scope.buyAndSellEnabled = !isWindowsPhoneApp && (glideraEnabled || coinbaseEnabled);
|
||||
$scope.glideraEnabled = config.glidera.enabled && !isWindowsPhoneApp;
|
||||
$scope.coinbaseEnabled = config.coinbase.enabled && !isWindowsPhoneApp;
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
134
src/js/routes.js
134
src/js/routes.js
|
|
@ -85,7 +85,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
*
|
||||
*/
|
||||
|
||||
.state('disclaimer', {
|
||||
.state('disclaimer', {
|
||||
url: '/disclaimer',
|
||||
templateUrl: 'views/disclaimer.html',
|
||||
})
|
||||
|
|
@ -104,22 +104,19 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
|
||||
.state('uri', {
|
||||
url: '/uri/:url',
|
||||
needProfile: true,
|
||||
views: {
|
||||
'main': {
|
||||
templateUrl: 'views/uri.html'
|
||||
}
|
||||
}
|
||||
templateUrl: 'views/uri.html'
|
||||
})
|
||||
.state('uripayment', {
|
||||
url: '/uri-payment/:url',
|
||||
templateUrl: 'views/paymentUri.html',
|
||||
views: {
|
||||
'main': {
|
||||
templateUrl: 'views/paymentUri.html',
|
||||
},
|
||||
},
|
||||
needProfile: true
|
||||
templateUrl: 'views/paymentUri.html'
|
||||
})
|
||||
.state('uriglidera', {
|
||||
url: '/uri-glidera/:url',
|
||||
templateUrl: 'views/glideraUri.html'
|
||||
})
|
||||
.state('uricoinbase', {
|
||||
url: '/uri-coinbase/:url',
|
||||
templateUrl: 'views/coinbaseUri.html'
|
||||
})
|
||||
.state('activity', {
|
||||
url: '/activity',
|
||||
|
|
@ -537,53 +534,43 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
*
|
||||
* Glidera
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
.state('uriglidera', {
|
||||
url: '/uri-glidera/:url',
|
||||
templateUrl: 'views/glideraUri.html'
|
||||
})
|
||||
.state('glidera', {
|
||||
.state('glidera', {
|
||||
url: '/glidera',
|
||||
templateUrl: 'views/glidera.html'
|
||||
})
|
||||
.state('buyGlidera', {
|
||||
url: '/buy',
|
||||
templateUrl: 'views/buyGlidera.html'
|
||||
})
|
||||
.state('sellGlidera', {
|
||||
url: '/sell',
|
||||
templateUrl: 'views/sellGlidera.html'
|
||||
})
|
||||
.state('preferencesGlidera', {
|
||||
url: '/preferencesGlidera',
|
||||
templateUrl: 'views/preferencesGlidera.html'
|
||||
})
|
||||
|
||||
/*
|
||||
*
|
||||
* BitPay Card
|
||||
*
|
||||
*/
|
||||
|
||||
.state('bitpayCard', {
|
||||
url: '/bitpayCard',
|
||||
abstract: true,
|
||||
template: '<ion-nav-view name="bitpayCard"></ion-nav-view>'
|
||||
template: '<ion-nav-view name="glidera"></ion-nav-view>'
|
||||
})
|
||||
.state('bitpayCard.main', {
|
||||
.state('glidera.main', {
|
||||
url: '/main',
|
||||
views: {
|
||||
'bitpayCard': {
|
||||
templateUrl: 'views/bitpayCard.html'
|
||||
'glidera': {
|
||||
templateUrl: 'views/glidera.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('bitpayCard.preferences', {
|
||||
.state('glidera.buy', {
|
||||
url: '/buy',
|
||||
views: {
|
||||
'glidera': {
|
||||
templateUrl: 'views/buyGlidera.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('glidera.sell', {
|
||||
url: '/sell',
|
||||
views: {
|
||||
'glidera': {
|
||||
templateUrl: 'views/sellGlidera.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('glidera.preferences', {
|
||||
url: '/preferences',
|
||||
views: {
|
||||
'bitpayCard': {
|
||||
templateUrl: 'views/preferencesBitpayCard.html'
|
||||
'glidera': {
|
||||
templateUrl: 'views/preferencesGlidera.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -602,10 +589,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
url: '/preferencesCoinbase',
|
||||
templateUrl: 'views/preferencesCoinbase.html'
|
||||
})
|
||||
.state('uricoinbase', {
|
||||
url: '/uri-coinbase/:url',
|
||||
templateUrl: 'views/coinbaseUri.html'
|
||||
})
|
||||
.state('buyCoinbase', {
|
||||
url: '/buycoinbase',
|
||||
templateUrl: 'views/buyCoinbase.html'
|
||||
|
|
@ -614,15 +597,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
url: '/sellcoinbase',
|
||||
templateUrl: 'views/sellCoinbase.html'
|
||||
})
|
||||
.state('buyandsell', {
|
||||
url: '/buyandsell',
|
||||
templateUrl: 'views/buyAndSell.html',
|
||||
controller: function(platformInfo) {
|
||||
if (platformInfo.isCordova && StatusBar.isVisible) {
|
||||
StatusBar.backgroundColorByHexString("#4B6178");
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
|
|
@ -650,6 +625,34 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
templateUrl: 'views/buyAmazon.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
/*
|
||||
*
|
||||
* BitPay Card
|
||||
*
|
||||
*/
|
||||
|
||||
.state('bitpayCard', {
|
||||
url: '/bitpayCard',
|
||||
abstract: true,
|
||||
template: '<ion-nav-view name="bitpayCard"></ion-nav-view>'
|
||||
})
|
||||
.state('bitpayCard.main', {
|
||||
url: '/main',
|
||||
views: {
|
||||
'bitpayCard': {
|
||||
templateUrl: 'views/bitpayCard.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('bitpayCard.preferences', {
|
||||
url: '/preferences',
|
||||
views: {
|
||||
'bitpayCard': {
|
||||
templateUrl: 'views/preferencesBitpayCard.html'
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
.run(function($rootScope, $state, $location, $log, $timeout, $ionicHistory, $ionicPlatform, lodash, platformInfo, profileService, uxLanguage, gettextCatalog) {
|
||||
|
|
@ -707,12 +710,9 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
|
||||
if ($rootScope.backButtonPressedOnceToExit || fromDisclaimer) {
|
||||
ionic.Platform.exitApp();
|
||||
}
|
||||
|
||||
else if ($ionicHistory.backView() && !fromTabs) {
|
||||
} else if ($ionicHistory.backView() && !fromTabs) {
|
||||
$ionicHistory.goBack();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$rootScope.backButtonPressedOnceToExit = true;
|
||||
window.plugins.toast.showShortBottom(gettextCatalog.getString('Press again to exit'));
|
||||
setInterval(function() {
|
||||
|
|
|
|||
|
|
@ -123,11 +123,6 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
configCache.colorFor = configCache.colorFor || {};
|
||||
configCache.aliasFor = configCache.aliasFor || {};
|
||||
|
||||
|
||||
// Glidera
|
||||
// Disabled for testnet
|
||||
configCache.glidera.testnet = false;
|
||||
|
||||
// Coinbase
|
||||
// Disabled for testnet
|
||||
configCache.coinbase.testnet = false;
|
||||
|
|
|
|||
|
|
@ -4,11 +4,15 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l
|
|||
var root = {};
|
||||
var credentials = {};
|
||||
var isCordova = platformInfo.isCordova;
|
||||
//
|
||||
//
|
||||
|
||||
root.setCredentials = function(network) {
|
||||
if (network == 'testnet') {
|
||||
var _setCredentials = function() {
|
||||
/*
|
||||
* Development: 'testnet'
|
||||
* Production: 'livenet'
|
||||
*/
|
||||
credentials.NETWORK = 'livenet';
|
||||
|
||||
if (credentials.NETWORK == 'testnet') {
|
||||
credentials.HOST = 'https://sandbox.glidera.io';
|
||||
if (isCordova) {
|
||||
credentials.REDIRECT_URI = 'copay://glidera';
|
||||
|
|
@ -33,11 +37,25 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l
|
|||
};
|
||||
};
|
||||
|
||||
root.getEnvironment = function() {
|
||||
_setCredentials();
|
||||
return credentials.NETWORK;
|
||||
};
|
||||
|
||||
root.getOauthCodeUrl = function() {
|
||||
_setCredentials();
|
||||
return credentials.HOST + '/oauth2/auth?response_type=code&client_id=' + credentials.CLIENT_ID + '&redirect_uri=' + credentials.REDIRECT_URI;
|
||||
};
|
||||
|
||||
root.removeToken = function(cb) {
|
||||
_setCredentials();
|
||||
storageService.removeGlideraToken(credentials.NETWORK, function() {
|
||||
return cb();
|
||||
});
|
||||
};
|
||||
|
||||
root.getToken = function(code, cb) {
|
||||
_setCredentials();
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: credentials.HOST + '/api/v1/oauth/token',
|
||||
|
|
@ -64,6 +82,7 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l
|
|||
};
|
||||
|
||||
var _get = function(endpoint, token) {
|
||||
_setCredentials();
|
||||
return {
|
||||
method: 'GET',
|
||||
url: credentials.HOST + '/api/v1' + endpoint,
|
||||
|
|
@ -176,6 +195,7 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l
|
|||
};
|
||||
|
||||
var _post = function(endpoint, token, twoFaCode, data) {
|
||||
_setCredentials();
|
||||
return {
|
||||
method: 'POST',
|
||||
url: credentials.HOST + '/api/v1' + endpoint,
|
||||
|
|
@ -251,91 +271,39 @@ angular.module('copayApp.services').factory('glideraService', function($http, $l
|
|||
});
|
||||
};
|
||||
|
||||
root.init = function(accessToken) {
|
||||
root.glideraEnabled = configService.getSync().glidera.enabled;
|
||||
root.glideraTestnet = configService.getSync().glidera.testnet;
|
||||
var network = root.glideraTestnet ? 'testnet' : 'livenet';
|
||||
root.init = function(accessToken, cb) {
|
||||
_setCredentials();
|
||||
$log.debug('Init Glidera...');
|
||||
|
||||
root.glideraToken = null;
|
||||
root.glideraError = null;
|
||||
root.glideraPermissions = null;
|
||||
root.glideraEmail = null;
|
||||
root.glideraPersonalInfo = null;
|
||||
root.glideraTxs = null;
|
||||
root.glideraStatus = null;
|
||||
|
||||
if (!root.glideraEnabled) return;
|
||||
|
||||
root.setCredentials(network);
|
||||
var glidera = {
|
||||
token: null,
|
||||
permissions: null
|
||||
}
|
||||
|
||||
var getToken = function(cb) {
|
||||
if (accessToken) {
|
||||
cb(null, accessToken);
|
||||
} else {
|
||||
storageService.getGlideraToken(network, cb);
|
||||
storageService.getGlideraToken(credentials.NETWORK, cb);
|
||||
}
|
||||
};
|
||||
|
||||
getToken(function(err, accessToken) {
|
||||
if (err || !accessToken) return;
|
||||
if (err || !accessToken) return cb();
|
||||
else {
|
||||
root.getAccessTokenPermissions(accessToken, function(err, p) {
|
||||
if (err) {
|
||||
root.glideraError = err;
|
||||
return cb(err);
|
||||
} else {
|
||||
root.glideraToken = accessToken;
|
||||
root.glideraPermissions = p;
|
||||
root.update({
|
||||
fullUpdate: true
|
||||
});
|
||||
glidera.token = accessToken;
|
||||
glidera.permissions = p;
|
||||
return cb(null, glidera);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
root.update = function(opts) {
|
||||
if (!root.glideraToken || !root.glideraPermissions) return;
|
||||
var accessToken = root.glideraToken;
|
||||
var permissions = root.glideraPermissions;
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
root.getStatus(accessToken, function(err, data) {
|
||||
root.glideraStatus = data;
|
||||
});
|
||||
|
||||
root.getLimits(accessToken, function(err, limits) {
|
||||
root.glideraLimits = limits;
|
||||
});
|
||||
|
||||
if (permissions.transaction_history) {
|
||||
root.getTransactions(accessToken, function(err, data) {
|
||||
root.glideraTxs = data;
|
||||
});
|
||||
}
|
||||
|
||||
if (permissions.view_email_address && opts.fullUpdate) {
|
||||
root.getEmail(accessToken, function(err, data) {
|
||||
root.glideraEmail = data.email;
|
||||
});
|
||||
}
|
||||
if (permissions.personal_info && opts.fullUpdate) {
|
||||
root.getPersonalInfo(accessToken, function(err, data) {
|
||||
root.glideraPersonalInfo = data;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
configService.whenAvailable(function() {
|
||||
$log.debug('Init Glidera Service...');
|
||||
root.init();
|
||||
});
|
||||
|
||||
$rootScope.$on('NewBlock', function() {
|
||||
root.update();
|
||||
});
|
||||
|
||||
return root;
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ angular.module('copayApp.services').factory('ongoingProcess', function($log, $ti
|
|||
window.plugins.spinnerDialog.show(null, showName, true);
|
||||
} else {
|
||||
|
||||
var tmpl = '<ion-spinner class="spinner-stable" icon="lines"></ion-spinner>' + showName;
|
||||
var tmpl = '<div class="item-icon-left">' + showName + '<ion-spinner class="spinner-stable" icon="lines"></ion-spinner></div>';
|
||||
$ionicLoading.show({
|
||||
template: tmpl
|
||||
});
|
||||
|
|
|
|||
|
|
@ -965,3 +965,14 @@ input[type=number] {
|
|||
}
|
||||
}
|
||||
|
||||
/* Spinner */
|
||||
|
||||
.item-icon-left ion-spinner {
|
||||
float: left;
|
||||
margin-left: -3.2em;
|
||||
margin-right: 1em;
|
||||
margin-top: -0.2em;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue