From ce378ef09e4f276fd6e54793adda86dec2ef902a Mon Sep 17 00:00:00 2001 From: ssotomayor Date: Wed, 1 Oct 2014 15:34:24 -0300 Subject: [PATCH 1/3] Hides backup button on mobile devices since the mobile browsers are not supporting downloading files, as they don't have access to the FS of the device. --- js/controllers/more.js | 4 +++- views/more.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/js/controllers/more.js b/js/controllers/more.js index 5f06a84a3..e2936be34 100644 --- a/js/controllers/more.js +++ b/js/controllers/more.js @@ -1,8 +1,9 @@ 'use strict'; angular.module('copayApp.controllers').controller('MoreController', - function($scope, $rootScope, $location, $filter, backupService, walletFactory, controllerUtils, notification, rateService) { + function($scope, $rootScope, $location, $filter, backupService, walletFactory, controllerUtils, notification, rateService, isMobile) { var w = $rootScope.wallet; + $scope.isMobile = isMobile.any(); $scope.unitOpts = [{ name: 'Satoshis (100,000,000 satoshis = 1BTC)', @@ -68,6 +69,7 @@ angular.module('copayApp.controllers').controller('MoreController', $scope.priv = w.privateKey.toObj().extendedPrivateKeyString; $scope.downloadBackup = function() { + console.log(window.mobilecheck()); backupService.download(w); } diff --git a/views/more.html b/views/more.html index 65eafed3b..375eb61cf 100644 --- a/views/more.html +++ b/views/more.html @@ -1,6 +1,6 @@

Settings

-
+

Backup

It's important to backup your wallet so that you can recover it in case of disaster

From 4da28da398b940b07c438cc1a07d88cac3f87579 Mon Sep 17 00:00:00 2001 From: ssotomayor Date: Wed, 1 Oct 2014 15:44:25 -0300 Subject: [PATCH 2/3] Removes unnecesary console.log --- js/controllers/more.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/controllers/more.js b/js/controllers/more.js index e2936be34..991a6a3f6 100644 --- a/js/controllers/more.js +++ b/js/controllers/more.js @@ -69,7 +69,6 @@ angular.module('copayApp.controllers').controller('MoreController', $scope.priv = w.privateKey.toObj().extendedPrivateKeyString; $scope.downloadBackup = function() { - console.log(window.mobilecheck()); backupService.download(w); } From c4914302135eb90a7a91ce21b8e9c63af38f9e3f Mon Sep 17 00:00:00 2001 From: ssotomayor Date: Thu, 2 Oct 2014 12:02:17 -0300 Subject: [PATCH 3/3] Backup will be disabled ONLY for iOS devices, as this ones don't have access to the device's FS. --- js/controllers/more.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/controllers/more.js b/js/controllers/more.js index 991a6a3f6..b47d00296 100644 --- a/js/controllers/more.js +++ b/js/controllers/more.js @@ -3,7 +3,7 @@ angular.module('copayApp.controllers').controller('MoreController', function($scope, $rootScope, $location, $filter, backupService, walletFactory, controllerUtils, notification, rateService, isMobile) { var w = $rootScope.wallet; - $scope.isMobile = isMobile.any(); + $scope.isMobile = isMobile.iOS(); $scope.unitOpts = [{ name: 'Satoshis (100,000,000 satoshis = 1BTC)',