From 892ea0e9afe5c4d9c386e350a5689cbcd5d8f475 Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Fri, 17 Jul 2020 17:51:25 +0200 Subject: [PATCH 1/3] Login/register view improvements Consistently aligned the texts centered and moved the Tor URL button below the form. --- BTCPayServer/Views/Account/Login.cshtml | 17 ++++++----- BTCPayServer/Views/Account/Register.cshtml | 17 ++++++----- BTCPayServer/Views/Error/404.cshtml | 2 +- BTCPayServer/Views/Error/429.cshtml | 2 +- BTCPayServer/Views/Error/500.cshtml | 2 +- BTCPayServer/Views/Error/Handle.cshtml | 2 +- .../Views/Shared/_LayoutSimple.cshtml | 2 +- .../wwwroot/img/icons/onion-purple.svg | 1 + BTCPayServer/wwwroot/main/site.css | 28 +++++++++++++++---- .../wwwroot/main/themes/default-dark.css | 9 ++++++ 10 files changed, 57 insertions(+), 25 deletions(-) create mode 100644 BTCPayServer/wwwroot/img/icons/onion-purple.svg diff --git a/BTCPayServer/Views/Account/Login.cshtml b/BTCPayServer/Views/Account/Login.cshtml index 5735baa875..1c04ea8233 100644 --- a/BTCPayServer/Views/Account/Login.cshtml +++ b/BTCPayServer/Views/Account/Login.cshtml @@ -29,13 +29,6 @@ + + @if (env.OnionUrl != null) + { +
+ + + Copy Tor URL + +
+ } diff --git a/BTCPayServer/Views/Account/Register.cshtml b/BTCPayServer/Views/Account/Register.cshtml index d3b59fd8b0..9c337d4722 100644 --- a/BTCPayServer/Views/Account/Register.cshtml +++ b/BTCPayServer/Views/Account/Register.cshtml @@ -29,13 +29,6 @@ + + @if (env.OnionUrl != null) + { +
+ + + Copy Tor URL + +
+ } diff --git a/BTCPayServer/Views/Error/404.cshtml b/BTCPayServer/Views/Error/404.cshtml index 0add18d441..0cdfd2fb5b 100644 --- a/BTCPayServer/Views/Error/404.cshtml +++ b/BTCPayServer/Views/Error/404.cshtml @@ -2,7 +2,7 @@ ViewData["Headline"] = "404 - Page not found"; } -

+

This is like searching for a person more beautiful than Nicolas Dorier.

diff --git a/BTCPayServer/Views/Error/429.cshtml b/BTCPayServer/Views/Error/429.cshtml index 891d881483..6d412ce5c4 100644 --- a/BTCPayServer/Views/Error/429.cshtml +++ b/BTCPayServer/Views/Error/429.cshtml @@ -2,7 +2,7 @@ ViewData["Headline"] = "429 - Too Many Requests"; } -

+

Please send requests slower. Or face the wrath of Vin Diesel.

diff --git a/BTCPayServer/Views/Error/500.cshtml b/BTCPayServer/Views/Error/500.cshtml index 1c4297aebd..d00e2a4096 100644 --- a/BTCPayServer/Views/Error/500.cshtml +++ b/BTCPayServer/Views/Error/500.cshtml @@ -2,7 +2,7 @@ ViewData["Headline"] = "500 - Internal Server Error"; } -

+

Whoops, something really went wrong! Mr Kukks is so sorry.

diff --git a/BTCPayServer/Views/Error/Handle.cshtml b/BTCPayServer/Views/Error/Handle.cshtml index 025a25d5f1..7d6759459c 100644 --- a/BTCPayServer/Views/Error/Handle.cshtml +++ b/BTCPayServer/Views/Error/Handle.cshtml @@ -9,7 +9,7 @@ } } -

+

Generic error occurred, HTTP Code: @Model

Consult server log for more details. diff --git a/BTCPayServer/Views/Shared/_LayoutSimple.cshtml b/BTCPayServer/Views/Shared/_LayoutSimple.cshtml index 3236a604ba..dde4b75721 100644 --- a/BTCPayServer/Views/Shared/_LayoutSimple.cshtml +++ b/BTCPayServer/Views/Shared/_LayoutSimple.cshtml @@ -43,6 +43,7 @@ font-size: 16px; line-height: 1.8; letter-spacing: 0.1em; + text-align: center; } @@media screen and (min-width: 768px) { @@ -51,7 +52,6 @@ } .col-head { - text-align: left; flex-direction: row; } diff --git a/BTCPayServer/wwwroot/img/icons/onion-purple.svg b/BTCPayServer/wwwroot/img/icons/onion-purple.svg new file mode 100644 index 0000000000..4fb6cee3da --- /dev/null +++ b/BTCPayServer/wwwroot/img/icons/onion-purple.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/BTCPayServer/wwwroot/main/site.css b/BTCPayServer/wwwroot/main/site.css index 84e9933c50..a947cb9860 100644 --- a/BTCPayServer/wwwroot/main/site.css +++ b/BTCPayServer/wwwroot/main/site.css @@ -195,15 +195,31 @@ pre { background: none; } -.btn-onion { +.btn-outline-onion { + color: #7D4698; + background-image: none; + background-color: transparent; + border-color: #e6d5ee; +} + +.btn-outline-onion:hover { + color: #fff; + background-color: #7D4698; + border-color: #7D4698; +} + +.btn-outline-onion:focus, +.btn-outline-onion.focus { color: #fff; - background-color: #59316B; - border-color: #59316B; + background-color: #7D4698; + border-color: #7D4698; + box-shadow: 0 0 0 0.2rem #e6d5ee; } -.btn-onion:focus, -.btn-onion.focus { - box-shadow: 0 0 0 0.2rem #9065a1; +.btn-outline-onion:hover img, +.btn-outline-onion:focus img, +.btn-outline-onion.focus img { + filter: contrast(0) brightness(200%); } [class*="field-validation"]:not(:empty) { diff --git a/BTCPayServer/wwwroot/main/themes/default-dark.css b/BTCPayServer/wwwroot/main/themes/default-dark.css index d6bf6fb118..a5a49cd909 100644 --- a/BTCPayServer/wwwroot/main/themes/default-dark.css +++ b/BTCPayServer/wwwroot/main/themes/default-dark.css @@ -39,6 +39,15 @@ filter: none; } +.btn-outline-onion { + color: #e6d5ee !important; + border-color: #59316B !important; +} + +.btn-outline-onion img { + filter: contrast(0) brightness(200%) !important; +} + .list-group-item-action, .list-group-item-action:hover { color: var(--btcpay-body-color); From 0e8cd205336530c36e973aa83999f70610690ffe Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Sun, 19 Jul 2020 01:20:12 +0200 Subject: [PATCH 2/3] Login/register/error view updates --- .../ForgotPasswordViewModel.cs | 1 + .../AccountViewModels/LoginViewModel.cs | 1 + BTCPayServer/Views/Account/Login.cshtml | 88 ++++++++--------- BTCPayServer/Views/Account/Register.cshtml | 97 ++++++++----------- BTCPayServer/Views/Error/404.cshtml | 20 +++- BTCPayServer/Views/Error/429.cshtml | 20 +++- BTCPayServer/Views/Error/500.cshtml | 20 +++- BTCPayServer/Views/Error/Handle.cshtml | 22 ++++- .../Views/Shared/_BTCPaySupporters.cshtml | 91 ++++++----------- .../Views/Shared/_LayoutSimple.cshtml | 58 ----------- BTCPayServer/wwwroot/main/site.css | 9 +- .../wwwroot/main/themes/default-dark.css | 5 - 12 files changed, 193 insertions(+), 239 deletions(-) diff --git a/BTCPayServer/Models/AccountViewModels/ForgotPasswordViewModel.cs b/BTCPayServer/Models/AccountViewModels/ForgotPasswordViewModel.cs index 70a8c3b658..93f94f4b96 100644 --- a/BTCPayServer/Models/AccountViewModels/ForgotPasswordViewModel.cs +++ b/BTCPayServer/Models/AccountViewModels/ForgotPasswordViewModel.cs @@ -6,6 +6,7 @@ public class ForgotPasswordViewModel { [Required] [EmailAddress] + [Display(Name = "Email address")] public string Email { get; set; } } } diff --git a/BTCPayServer/Models/AccountViewModels/LoginViewModel.cs b/BTCPayServer/Models/AccountViewModels/LoginViewModel.cs index c5184e02dc..2de453e6bc 100644 --- a/BTCPayServer/Models/AccountViewModels/LoginViewModel.cs +++ b/BTCPayServer/Models/AccountViewModels/LoginViewModel.cs @@ -6,6 +6,7 @@ public class LoginViewModel { [Required] [EmailAddress] + [Display(Name = "Email address")] public string Email { get; set; } [Required] diff --git a/BTCPayServer/Views/Account/Login.cshtml b/BTCPayServer/Views/Account/Login.cshtml index 1c04ea8233..5ca06a74e5 100644 --- a/BTCPayServer/Views/Account/Login.cshtml +++ b/BTCPayServer/Views/Account/Login.cshtml @@ -3,82 +3,74 @@ @inject BTCPayServer.HostedServices.CssThemeManager themeManager @{ ViewData["Title"] = "Log in"; - ViewData["Headline"] = "Welcome to your BTCPay Server"; Layout = "_LayoutSimple"; } - +

+
+ + BTCPay Server + + +

Welcome to your BTCPay Server

-
- +
- - -