diff --git a/public/views/add.html b/public/views/add.html index 86c7505d4..d42824a7b 100644 --- a/public/views/add.html +++ b/public/views/add.html @@ -29,13 +29,6 @@ Import wallet -
  • - - - - Import from Copay Beta 0.9 - -
  • diff --git a/public/views/import.html b/public/views/import.html index 2edf34ff3..937436502 100644 --- a/public/views/import.html +++ b/public/views/import.html @@ -49,11 +49,21 @@ - + +
    +

    Have a Backup from Copay v0.9?

    + + + +
    + diff --git a/public/views/importLegacy.html b/public/views/importLegacy.html index 8442f7208..c4410aa78 100644 --- a/public/views/importLegacy.html +++ b/public/views/importLegacy.html @@ -1,19 +1,14 @@
    + ng-init="titleSection='Import legacy wallet'; goBackToState = 'import'; noColor = true">
    -
    -
    - Copay -
    -
    -
    +

    Importing...

      @@ -69,15 +64,16 @@
    - +
    -
    diff --git a/public/views/includes/topbar.html b/public/views/includes/topbar.html index 8ec5880ca..4be35bfbc 100644 --- a/public/views/includes/topbar.html +++ b/public/views/includes/topbar.html @@ -20,7 +20,7 @@
    -

    +

    {{(titleSection|translate) || index.walletName}}

    diff --git a/public/views/preferences.html b/public/views/preferences.html index 8281eb458..d40d26613 100644 --- a/public/views/preferences.html +++ b/public/views/preferences.html @@ -8,14 +8,14 @@
    -
    - Creating Wallet... + Creating Profile...
    +

    Already have a wallet?

    +
    diff --git a/public/views/splash/2.html b/public/views/splash/2.html deleted file mode 100644 index 9d902e76c..000000000 --- a/public/views/splash/2.html +++ /dev/null @@ -1,3 +0,0 @@ -
    - tour1 -
    diff --git a/public/views/splash/3.html b/public/views/splash/3.html deleted file mode 100644 index 53dfcd551..000000000 --- a/public/views/splash/3.html +++ /dev/null @@ -1,3 +0,0 @@ -
    - tour1 -
    diff --git a/public/views/splash/4.html b/public/views/splash/4.html deleted file mode 100644 index 47c02065b..000000000 --- a/public/views/splash/4.html +++ /dev/null @@ -1,3 +0,0 @@ -
    - tour1 -
    diff --git a/public/views/splash/5.html b/public/views/splash/5.html deleted file mode 100644 index 2612f963e..000000000 --- a/public/views/splash/5.html +++ /dev/null @@ -1,15 +0,0 @@ -
    - tour1 -
    -
    -
    - -
    -
    - -
    -
    \ No newline at end of file diff --git a/public/views/walletHome.html b/public/views/walletHome.html index d3317b872..e7973105d 100644 --- a/public/views/walletHome.html +++ b/public/views/walletHome.html @@ -10,6 +10,10 @@ You do not have any wallet + +
    + +
    @@ -465,4 +469,4 @@
    -
    +
    diff --git a/src/css/mobile.css b/src/css/mobile.css index b78c5cdc4..f4fab59a6 100644 --- a/src/css/mobile.css +++ b/src/css/mobile.css @@ -97,7 +97,7 @@ _:-ms-fullscreen, :root .main { } .tab-bar h1 { - color: #1ABC9C; + color: #7A8C9E; font-weight: 500; font-size: 14px; } @@ -404,12 +404,12 @@ to prevent collapsing during animation*/ left: 0; right: 0; - animation-timing-function: linear; + animation-timing-function: ease-in-out; animation-duration: .3s; animation-iteration-count: 1; animation-fill-mode: both; - -webkit-animation-timing-function: linear; + -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: .3s; -webkit-animation-iteration-count: 1; -webkit-animation-fill-mode: both; diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index 2b24e300c..e3b4388d2 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -721,7 +721,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r self.noFocusedWallet = true; self.isComplete = null; self.walletName = null; - go.addWallet(); + go.path('import'); }); }); diff --git a/src/js/controllers/preferences.js b/src/js/controllers/preferences.js index ba63e4225..742db5a84 100644 --- a/src/js/controllers/preferences.js +++ b/src/js/controllers/preferences.js @@ -10,10 +10,13 @@ angular.module('copayApp.controllers').controller('preferencesController', isoCode: config.wallet.settings.alternativeIsoCode }; var fc = profileService.focusedClient; - $scope.encrypt = fc.hasPrivKeyEncrypted(); + if (fc) + $scope.encrypt = fc.hasPrivKeyEncrypted(); var unwatch = $scope.$watch('encrypt', function(val) { var fc = profileService.focusedClient; + if (!fc) return; + if (val && !fc.hasPrivKeyEncrypted()) { $rootScope.$emit('Local/NeedsPassword', true, function(err, password) { if (err || !password) { diff --git a/src/js/controllers/preferencesColor.js b/src/js/controllers/preferencesColor.js index d6e7fe823..d01a878fb 100644 --- a/src/js/controllers/preferencesColor.js +++ b/src/js/controllers/preferencesColor.js @@ -4,6 +4,7 @@ angular.module('copayApp.controllers').controller('preferencesColorController', function($scope, configService, profileService, go) { var config = configService.getSync(); this.colorOpts = [ + '#7A8C9E', '#F38F12', '#F4D03F', '#4A90E2', @@ -11,7 +12,6 @@ angular.module('copayApp.controllers').controller('preferencesColorController', '#9B59B6', '#E856EF', '#F883B4', - '#7A8C9E', ]; var fc = profileService.focusedClient; diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js index c6508da75..ad05b33bc 100644 --- a/src/js/controllers/walletHome.js +++ b/src/js/controllers/walletHome.js @@ -357,6 +357,9 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi return; var fc = profileService.focusedClient; + if (!fc) + return; + $timeout(function() { storageService.getLastAddress(fc.credentials.walletId, function(err, addr) { if (addr) { diff --git a/src/js/models/profile.js b/src/js/models/profile.js index c18967ded..b5374c1c1 100644 --- a/src/js/models/profile.js +++ b/src/js/models/profile.js @@ -14,17 +14,20 @@ Profile.create = function(opts) { var x = new Profile(); x.createdOn = Date.now(); - x.credentials = opts.credentials; + x.credentials = opts.credentials || []; return x; }; Profile.fromObj = function(obj) { var x = new Profile(); + x.createdOn = obj.createdOn; x.credentials = obj.credentials; + if (x.credentials[0] && typeof x.credentials[0] != 'object') throw ("credentials should be an object"); + return x; }; diff --git a/src/js/routes.js b/src/js/routes.js index a60dc0796..e0ebe98a3 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -68,23 +68,23 @@ angular needProfile: false, views: { 'main': { - templateUrl: 'views/splash/1.html', + templateUrl: 'views/splash.html', controller: function($scope, $timeout, $log, profileService, go) { if (profileService.profile) { go.walletHome(); } - $scope.create = function() { + $scope.create = function(noWallet) { $scope.creatingProfile = true; - profileService.create(function(err) { + profileService.create({noWallet: noWallet}, function(err) { if (err) { $scope.creatingProfile = false; $log.warn(err); $scope.error = err; $scope.$apply(); $timeout(function() { - $scope.create(); + $scope.create(noWallet); }, 3000); } }); @@ -384,7 +384,7 @@ angular create: 12, join: 12, import: 12, - importLegacy: 12 + importLegacy: 13 }; diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index 80ea5a1f0..e2d85d1ce 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -157,9 +157,13 @@ angular.module('copayApp.services') }); }; - root._createNewProfile = function(cb) { - var walletClient = bwcService.getClient(); + root._createNewProfile = function(opts, cb) { + if (opts.noWallet) { + return cb(null, Profile.create()); + } + + var walletClient = bwcService.getClient(); walletClient.createWallet('Personal Wallet', 'me', 1, 1, { network: 'livenet' }, function(err) { @@ -276,13 +280,11 @@ angular.module('copayApp.services') }); }; - - - root.create = function(cb) { + root.create = function(opts, cb) { $log.info('Creating profile'); configService.get(function(err) { root.applyConfig(); - root._createNewProfile(function(err, p) { + root._createNewProfile(opts, function(err, p) { if (err) return cb(err); root.bindProfile(p, function(err) {