diff --git a/public/index.html b/public/index.html index 3d0702dd6..f00b0d837 100644 --- a/public/index.html +++ b/public/index.html @@ -30,8 +30,7 @@
diff --git a/public/views/createProfile.html b/public/views/createProfile.html deleted file mode 100644 index f57bcfd02..000000000 --- a/public/views/createProfile.html +++ /dev/null @@ -1,25 +0,0 @@ -
- -
- Copay -
-
-
- {{(cp.error)|translate}}. Retrying... -
-
-
-
-
-
-
-
-
-
- Creating Wallet... -
-
-
-
- diff --git a/public/views/splash/1.html b/public/views/splash/1.html index f429dbae8..85bc6c244 100644 --- a/public/views/splash/1.html +++ b/public/views/splash/1.html @@ -1,4 +1,4 @@ -
+
@@ -10,7 +10,22 @@
icon
-
- +
+ {{(error)|translate}}. Retrying... +
+
+
+
+
+
+
+
+
+
+ Creating Wallet... +
+
+
+
diff --git a/src/js/controllers/createProfile.js b/src/js/controllers/createProfile.js deleted file mode 100644 index a9dc91307..000000000 --- a/src/js/controllers/createProfile.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('createProfileController', function($rootScope, $scope, $log, $timeout, profileService, go) { - var self = this; - - if (profileService.profile) - go.walletHome(); - - self.creatingProfile = true; - - $timeout(function() { - profileService.create(function(err) { - if (err) { - self.creatingProfile = false; - $log.warn(err); - self.error = err; - $scope.$apply(); - $timeout(function() { - go.reload(); - }, 3000); - } else { - go.walletHome(); - } - }); - }, 100); -}); diff --git a/src/js/routes.js b/src/js/routes.js index 1f681c824..d52bab836 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -68,7 +68,33 @@ angular needProfile: false, views: { 'main': { - templateUrl: 'views/splash/1.html' + templateUrl: 'views/splash/1.html', + controller: function($scope, $timeout, $log, profileService, go) { + if (profileService.profile) { + $scope.hasProfile = true; + go.walletHome(); + } + + $scope.create = function() { + $scope.creatingProfile = true; + + profileService.create(function(err) { + if (err) { + $scope.creatingProfile = false; + $log.warn(err); + $scope.error = err; + $scope.$apply(); + $timeout(function() { + $scope.create(); + }, 3000); + } else { + $timeout(function(){ + go.walletHome(); + }, 100); + } + }); + }; + } } } }) @@ -82,20 +108,6 @@ angular }, } }) - .state('createProfile', { - url: '/createProfile', - needProfile: false, - views: { - 'main': { - templateUrl: 'views/createProfile.html', - controller: function($scope) { - // TODO - // $scope.mainDark = true; - $scope.noColor = true; - } - } - } - }) .state('unsupported', { url: '/unsupported', needProfile: false,