From 6a20d9036cf764139bfe27a00842ca6bc685f5fd Mon Sep 17 00:00:00 2001 From: d11n Date: Fri, 21 Jan 2022 03:10:03 +0100 Subject: [PATCH] Refactor signed out action views (login, register, etc.) (#3333) * Refactor signed out action views (login, register, etc.) Extract common layout and some more cleanups. * Optimize supporters display on mobile * Optimize footer display on mobile --- .../Views/Shared/_BTCPaySupporters.cshtml | 8 +- BTCPayServer/Views/Shared/_Footer.cshtml | 8 +- .../Views/Shared/_LayoutSignedOut.cshtml | 59 ++++++++++ .../Views/UIAccount/ForgotPassword.cshtml | 44 +++---- .../ForgotPasswordConfirmation.cshtml | 14 +-- BTCPayServer/Views/UIAccount/Login.cshtml | 101 ++++++---------- BTCPayServer/Views/UIAccount/Register.cshtml | 108 ++++++------------ .../Views/UIAccount/SetPassword.cshtml | 95 +++++---------- BTCPayServer/wwwroot/main/site.css | 4 - 9 files changed, 191 insertions(+), 250 deletions(-) create mode 100644 BTCPayServer/Views/Shared/_LayoutSignedOut.cshtml diff --git a/BTCPayServer/Views/Shared/_BTCPaySupporters.cshtml b/BTCPayServer/Views/Shared/_BTCPaySupporters.cshtml index a9deb28239..67d7349d35 100644 --- a/BTCPayServer/Views/Shared/_BTCPaySupporters.cshtml +++ b/BTCPayServer/Views/Shared/_BTCPaySupporters.cshtml @@ -19,7 +19,7 @@
-
+ -
+ -
+ -
+
diff --git a/BTCPayServer/Views/Shared/_Footer.cshtml b/BTCPayServer/Views/Shared/_Footer.cshtml index b566ced8bd..ce075e0703 100644 --- a/BTCPayServer/Views/Shared/_Footer.cshtml +++ b/BTCPayServer/Views/Shared/_Footer.cshtml @@ -4,21 +4,21 @@
- + Github - + Mattermost - + Twitter @if (!string.IsNullOrEmpty(_env.OnionUrl) && !Context.Request.IsOnion()) { - + Copy Tor URL diff --git a/BTCPayServer/Views/Shared/_LayoutSignedOut.cshtml b/BTCPayServer/Views/Shared/_LayoutSignedOut.cshtml new file mode 100644 index 0000000000..665a7e326a --- /dev/null +++ b/BTCPayServer/Views/Shared/_LayoutSignedOut.cshtml @@ -0,0 +1,59 @@ +@{ + Layout = "_LayoutSimple"; + ViewBag.ShowLeadText ??= false; +} + +@section PageHeadContent { + + @await RenderSectionAsync("PageHeadContent", false) +} + +@section PageFootContent { + + @await RenderSectionAsync("PageFootContent", false) +} + +
+
+ + BTCPay Server + + +

Welcome to your BTCPay Server

+ @if (ViewBag.ShowLeadText) + { +

+ A self-hosted, open-source cryptocurrency payment processor. + It is secure, private, censorship-resistant and free. +

+ } + + +
+
+ + + +
+
+ +
+
+ + + diff --git a/BTCPayServer/Views/UIAccount/ForgotPassword.cshtml b/BTCPayServer/Views/UIAccount/ForgotPassword.cshtml index d87ac8ad11..ff08e69899 100644 --- a/BTCPayServer/Views/UIAccount/ForgotPassword.cshtml +++ b/BTCPayServer/Views/UIAccount/ForgotPassword.cshtml @@ -1,36 +1,26 @@ @model ForgotPasswordViewModel @{ ViewData["Title"] = "Forgot your password?"; - Layout = "_LayoutSimple"; + Layout = "_LayoutSignedOut"; } - +

+ We all forget passwords every now and then. Just provide email address tied to + your account and we'll start the process of helping you recover your account. +

-
-
-

@ViewData["Title"]

-
+
+
+
+ + +
-
-
-
- -

Start password reset

-

- We all forget passwords every now and then. Just provide email address tied to - your account and we'll start the process of helping you recover your account. -

-
-
- - - -
- - +
+
-
+ -@section PageFootContent { - -} +

+ Log in +

diff --git a/BTCPayServer/Views/UIAccount/ForgotPasswordConfirmation.cshtml b/BTCPayServer/Views/UIAccount/ForgotPasswordConfirmation.cshtml index 7f26551b9d..5441d34c79 100644 --- a/BTCPayServer/Views/UIAccount/ForgotPasswordConfirmation.cshtml +++ b/BTCPayServer/Views/UIAccount/ForgotPasswordConfirmation.cshtml @@ -1,12 +1,10 @@ @{ ViewData["Title"] = "Email sent!"; + Layout = "_LayoutSignedOut"; } -
-
-

@ViewData["Title"]

-

- Please check your email to reset your password. -

-
-
+

Please check your email to reset your password.

+ +

+ Log in +

diff --git a/BTCPayServer/Views/UIAccount/Login.cshtml b/BTCPayServer/Views/UIAccount/Login.cshtml index cea914fc2d..31494cbb56 100644 --- a/BTCPayServer/Views/UIAccount/Login.cshtml +++ b/BTCPayServer/Views/UIAccount/Login.cshtml @@ -1,80 +1,49 @@ @using BTCPayServer.Abstractions.Contracts @model LoginViewModel -@inject BTCPayServer.Services.BTCPayServerEnvironment env @inject ISettingsRepository _settingsRepository @{ - ViewData["Title"] = "Log in"; - Layout = "_LayoutSimple"; + ViewData["Title"] = "Sign in"; + Layout = "_LayoutSignedOut"; } -
-
- - BTCPay Server - - -

Welcome to your BTCPay Server

- - -
-
- -
-