From 3e832cc4169651ba2a510030a93959057bc45cdf Mon Sep 17 00:00:00 2001 From: Roger Far Date: Sun, 18 Jul 2021 14:22:12 -0600 Subject: [PATCH] Fixed enter button press on the login and setup pages. --- client/src/app/login/login.component.html | 60 ++++++++++--------- client/src/app/setup/setup.component.html | 59 +++++++++--------- .../Services/Authentication.cs | 5 ++ 3 files changed, 66 insertions(+), 58 deletions(-) diff --git a/client/src/app/login/login.component.html b/client/src/app/login/login.component.html index 0e0ce26..cdfdb93 100644 --- a/client/src/app/login/login.component.html +++ b/client/src/app/login/login.component.html @@ -5,37 +5,39 @@
-
- -
- - - - +
+
+ +
+ + + + +
-
-
- -
- - - - +
+ +
+ + + + +
-
-
- -
-
- {{ error }} -
+
+ +
+
+ {{ error }} +
+
diff --git a/client/src/app/setup/setup.component.html b/client/src/app/setup/setup.component.html index e8f27eb..5f53e35 100644 --- a/client/src/app/setup/setup.component.html +++ b/client/src/app/setup/setup.component.html @@ -8,37 +8,38 @@
Welcome to RealDebrid Client. Please create your account by entering a username and password.
-
- -
- - - - +
+
+ +
+ + + + +
-
-
- -
- - - - +
+ +
+ + + + +
-
-
- -
-
- {{ error }} -
+
+ +
+
+ {{ error }} +
+
diff --git a/server/RdtClient.Service/Services/Authentication.cs b/server/RdtClient.Service/Services/Authentication.cs index acc059f..ada92a7 100644 --- a/server/RdtClient.Service/Services/Authentication.cs +++ b/server/RdtClient.Service/Services/Authentication.cs @@ -37,6 +37,11 @@ namespace RdtClient.Service.Services public async Task Login(String userName, String password) { + if (String.IsNullOrWhiteSpace(userName) || String.IsNullOrWhiteSpace(password)) + { + return SignInResult.Failed; + } + var result = await _signInManager.PasswordSignInAsync(userName, password, true, false); return result;