diff --git a/css/main.css b/css/main.css index 6108e8a29..779713c4f 100644 --- a/css/main.css +++ b/css/main.css @@ -267,9 +267,6 @@ hr { margin: 2.25rem 0;} .lh {line-height: 0;} .oh {overflow:hidden;} .lh {line-height: 0;} -.signin input.ng-dirty.ng-invalid { - border: 2px red solid; -} .video-small { width: 80px; diff --git a/css/tpl-default.css b/css/tpl-default.css index a08c5e5ad..479a19bb5 100644 --- a/css/tpl-default.css +++ b/css/tpl-default.css @@ -168,17 +168,94 @@ button.radius, .button.radius { border-radius: 5px; } -button.primary, button.secondary, button.primary:hover, button.secondary:hover {color: #fff !important;} +/* SECONDARY */ +button.secondary, +.button.secondary { + background-color: #1ABC9C; + color: #fff; +} +button.secondary:hover, +button.secondary:focus, +.button.secondary:hover, +.button.secondary:focus { + background-color: #16A085; + color: #e6e6e6; +} +button.disabled.secondary, +button[disabled].secondary, +.button.disabled.secondary, +.button[disabled].secondary, +button.disabled.secondary:hover, +button.disabled.secondary:focus, +button[disabled].secondary:hover, +button[disabled].secondary:focus, +.button.disabled.secondary:hover, +.button.disabled.secondary:focus, +.button[disabled].secondary:hover, +.button[disabled].secondary:focus { + background-color: #1ABC9C; + color: #E6E6E6; +} -button.primary { background-color: #E67E22; } -button.secondary { background-color: #1ABC9C !important; } -button.warning { background-color: #C0392A; } +/* PRIMARY */ +button.primary, +.button.primary { + background-color: #E67E22; + color: #fff; +} +button.primary:hover, +button.primary:focus, +.button.primary:hover, +.button.primary:focus { + background-color: #D86601; + color: #e6e6e6; +} +button.disabled.primary, +button[disabled].primary, +.button.disabled.primary, +.button[disabled].primary, +button.disabled.primary:hover, +button.disabled.primary:focus, +button[disabled].primary:hover, +button[disabled].primary:focus, +.button.disabled.primary:hover, +.button.disabled.primary:focus, +.button[disabled].primary:hover, +.button[disabled].primary:focus { + background-color: #E67E22; + color: #E6E6E6; +} -button.primary:hover { background-color: #D86601;} -button.secondary:hover { background-color: #16A085 !important;} -button.warning:hover { background-color: #82251A; } +/* WARNING */ +button.warning, +.button.warning { + background-color: #C0392A; + color: #fff; +} +button.warning:hover, +button.warning:focus, +.button.warning:hover, +.button.warning:focus { + background-color: #82251A; + color: #e6e6e6; +} +button.disabled.warning, +button[disabled].warning, +.button.disabled.warning, +.button[disabled].warning, +button.disabled.warning:hover, +button.disabled.warning:focus, +button[disabled].warning:hover, +button[disabled].warning:focus, +.button.disabled.warning:hover, +.button.disabled.warning:focus, +.button[disabled].warning:hover, +.button[disabled].warning:focus { + background-color: #C0392A; + color: #E6E6E6; +} -.text-gray { color: #999 !important;} +.text-gray { color: #999;} #footer { background: #2C3E50; diff --git a/index.html b/index.html index 9994794a6..290761b4b 100644 --- a/index.html +++ b/index.html @@ -143,38 +143,44 @@
-
- -
-
+
+
+ +
@@ -203,6 +209,7 @@ Creating new wallet...
+
@@ -226,27 +233,27 @@
-
Wallet Password
+
Wallet Password Required
-
Wallet name (optional)
+
Wallet name Optional
-
Your name (optional)
+
Your name Optional
- Go back
+
diff --git a/js/controllers/setup.js b/js/controllers/setup.js index 1da4404e4..bd5116dad 100644 --- a/js/controllers/setup.js +++ b/js/controllers/setup.js @@ -32,7 +32,12 @@ angular.module('copay.setup').controller('SetupController', updateRCSelect(tc); }); - $scope.create = function() { + $scope.create = function(form) { + if (form && form.$invalid) { + $rootScope.flashMessage = { message: 'Please, enter required fields', type: 'error'}; + return; + } + $scope.loading = true; var passphrase = Passphrase.getBase64($scope.walletPassword); diff --git a/js/controllers/signin.js b/js/controllers/signin.js index 04eedc1c7..4086e5424 100644 --- a/js/controllers/signin.js +++ b/js/controllers/signin.js @@ -7,25 +7,35 @@ angular.module('copay.signin').controller('SigninController', $scope.selectedWalletId = $scope.wallets.length ? $scope.wallets[0].id : null; $scope.openPassword = ''; - $scope.create = function() { - $scope.loading = true; + $scope.create = function(form) { + if (form && form.$invalid) { + $rootScope.flashMessage = { message: 'Please, enter required fields', type: 'error'}; + return; + } - $rootScope.walletName = $scope.walletName; - $rootScope.walletPassword = $scope.createPassword; + $rootScope.walletName = form.walletName.$modelValue; + $rootScope.walletPassword = form.createPassword.$modelValue; $location.path('setup'); }; - $scope.open = function() { - if ($scope.openPassword != '') { - $scope.loading = true; - - var passphrase = Passphrase.getBase64($scope.openPassword); - var w = walletFactory.open($scope.selectedWalletId, { passphrase: passphrase}); - controllerUtils.startNetwork(w); + $scope.open = function(form) { + if (form && form.$invalid) { + $rootScope.flashMessage = { message: 'Please, enter required fields', type: 'error'}; + return; } + $scope.loading = true; + var password = form.openPassword.$modelValue; + + var passphrase = Passphrase.getBase64(password); + var w = walletFactory.open($scope.selectedWalletId, { passphrase: passphrase}); + controllerUtils.startNetwork(w); }; - $scope.join = function() { + $scope.join = function(form) { + if (form && form.$invalid) { + $rootScope.flashMessage = { message: 'Please, enter required fields', type: 'error'}; + return; + } $scope.loading = true; walletFactory.network.on('badSecret', function() {