fix import + walletHome + copayers
This commit is contained in:
parent
fa04610a10
commit
06c80ceaae
5 changed files with 16 additions and 21 deletions
|
|
@ -4,6 +4,8 @@ angular.module('copayApp.controllers').controller('copayersController',
|
||||||
function($scope, $rootScope, $timeout, $log, $modal, profileService, go, notification, platformInfo, gettext, gettextCatalog, animationService) {
|
function($scope, $rootScope, $timeout, $log, $modal, profileService, go, notification, platformInfo, gettext, gettextCatalog, animationService) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var isCordova = platformInfo.isCordova;
|
var isCordova = platformInfo.isCordova;
|
||||||
|
var isWP = platformInfo.isWP;
|
||||||
|
var isAndroid = platformInfo.isAndroid;
|
||||||
|
|
||||||
var delete_msg = gettextCatalog.getString('Are you sure you want to delete this wallet?');
|
var delete_msg = gettextCatalog.getString('Are you sure you want to delete this wallet?');
|
||||||
var accept_msg = gettextCatalog.getString('Accept');
|
var accept_msg = gettextCatalog.getString('Accept');
|
||||||
|
|
@ -104,7 +106,7 @@ angular.module('copayApp.controllers').controller('copayersController',
|
||||||
|
|
||||||
self.shareSecret = function(secret) {
|
self.shareSecret = function(secret) {
|
||||||
if (isCordova) {
|
if (isCordova) {
|
||||||
if (isMobile.Android() || isMobile.Windows()) {
|
if (isAndroid || isWP) {
|
||||||
window.ignoreMobilePause = true;
|
window.ignoreMobilePause = true;
|
||||||
}
|
}
|
||||||
var message = gettextCatalog.getString('Join my Copay wallet. Here is the invitation code: {{secret}} You can download Copay for your phone or desktop at https://copay.io', {secret: secret});
|
var message = gettextCatalog.getString('Join my Copay wallet. Here is the invitation code: {{secret}} You can download Copay for your phone or desktop at https://copay.io', {secret: secret});
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('exportController',
|
angular.module('copayApp.controllers').controller('exportController',
|
||||||
function($rootScope, $scope, $timeout, $log, backupService, storageService, profileService, isMobile, notification, go, gettext, gettextCatalog) {
|
function($rootScope, $scope, $timeout, $log, backupService, storageService, profileService, platformInfo, notification, go, gettext, gettextCatalog) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
var isWP = platformInfo.isWP;
|
||||||
|
var isAndroid = platformInfo.isAndroid;
|
||||||
|
|
||||||
self.error = null;
|
self.error = null;
|
||||||
self.success = null;
|
self.success = null;
|
||||||
|
|
@ -125,7 +127,7 @@ angular.module('copayApp.controllers').controller('exportController',
|
||||||
|
|
||||||
self.sendWalletBackup = function() {
|
self.sendWalletBackup = function() {
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
if (isMobile.Android() || isMobile.Windows()) {
|
if (isAndroid || isWP) {
|
||||||
window.ignoreMobilePause = true;
|
window.ignoreMobilePause = true;
|
||||||
}
|
}
|
||||||
window.plugins.toast.showShortCenter(gettextCatalog.getString('Preparing backup...'));
|
window.plugins.toast.showShortCenter(gettextCatalog.getString('Preparing backup...'));
|
||||||
|
|
|
||||||
|
|
@ -742,7 +742,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
$log.info('CSV generation not available in mobile');
|
$log.info('CSV generation not available in mobile');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var isNode = isNW;
|
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
var c = fc.credentials;
|
var c = fc.credentials;
|
||||||
if (!fc.isComplete()) return;
|
if (!fc.isComplete()) return;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $interval, $timeout, $filter, $modal, $log, notification, txStatus, profileService, lodash, configService, rateService, storageService, bitcore, gettext, gettextCatalog, platformInfo, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, walletService, fingerprintService) {
|
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $interval, $timeout, $filter, $modal, $log, notification, txStatus, profileService, lodash, configService, rateService, storageService, bitcore, gettext, gettextCatalog, platformInfo, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService, walletService, fingerprintService, nodeWebkit) {
|
||||||
|
|
||||||
var isCordova = platformInfo.isCordova;
|
var isCordova = platformInfo.isCordova;
|
||||||
var isWP = platformInfo.isWP;
|
var isWP = platformInfo.isWP;
|
||||||
|
|
|
||||||
|
|
@ -23,24 +23,16 @@ angular.module('copayApp.services').factory('platformInfo', function($window) {
|
||||||
|
|
||||||
// Detect mobile devices
|
// Detect mobile devices
|
||||||
var ret = {
|
var ret = {
|
||||||
isAndroid: function() {
|
isAndroid: !!ua.match(/Android/i),
|
||||||
return !!ua.match(/Android/i);
|
isIOS: /iPad|iPhone|iPod/.test(ua) && !$window.MSStream,
|
||||||
},
|
isWP: !!ua.match(/IEMobile/i),
|
||||||
isIOS: function() {
|
isSafari: Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0,
|
||||||
return /iPad|iPhone|iPod/.test(ua) && !$window.MSStream;
|
ua: ua,
|
||||||
},
|
isCordova: !!$window.cordova,
|
||||||
isWP: function() {
|
isNW: isNodeWebkit(),
|
||||||
return !!ua.match(/IEMobile/i);
|
|
||||||
},
|
|
||||||
isSafari: function() {
|
|
||||||
return Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ret.ua = ua;
|
ret.isMobile = ret.isAndroid || ret.isIOS || ret.isWP;
|
||||||
ret.isMobile = ret.isAndroid() || ret.isIOS() || ret.isWP();
|
|
||||||
ret.isCordova = !!$window.cordova;
|
|
||||||
ret.isNW = isNodeWebkit();
|
|
||||||
ret.isChromeApp = $window.chrome && chrome.runtime && chrome.runtime.id && !ret.isNW;
|
ret.isChromeApp = $window.chrome && chrome.runtime && chrome.runtime.id && !ret.isNW;
|
||||||
ret.isDevel = !ret.isMobile && !ret.isChromeApp && !ret.isNW;
|
ret.isDevel = !ret.isMobile && !ret.isChromeApp && !ret.isNW;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue