From c0aa320f0a5fe9509b4fc3a665a8918d1a3e4416 Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Tue, 23 Feb 2021 10:39:26 +0100 Subject: [PATCH] Improve policies structure and wordings Closes #2307. --- BTCPayServer/Services/PoliciesSettings.cs | 14 +- BTCPayServer/Views/Server/Policies.cshtml | 179 ++++++++++++---------- 2 files changed, 109 insertions(+), 84 deletions(-) diff --git a/BTCPayServer/Services/PoliciesSettings.cs b/BTCPayServer/Services/PoliciesSettings.cs index bafd391ce..a55616cc7 100644 --- a/BTCPayServer/Services/PoliciesSettings.cs +++ b/BTCPayServer/Services/PoliciesSettings.cs @@ -8,11 +8,11 @@ namespace BTCPayServer.Services { public class PoliciesSettings { - [Display(Name = "Requires a confirmation mail for registering")] + [Display(Name = "Require a confirmation email for registering")] public bool RequiresConfirmedEmail { get; set; } [JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)] - [Display(Name = "Disable registration")] + [Display(Name = "Disable new user registration on the server")] public bool LockSubscription { get; set; } [JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)] @@ -22,15 +22,15 @@ namespace BTCPayServer.Services public bool AllowLightningInternalNodeForAll { get; set; } [Display(Name = "Allow non-admins to create hot wallets for their stores")] public bool AllowHotWalletForAll { get; set; } - [Display(Name = "Allow non-admins to import their hot wallets to the node wallet")] + [Display(Name = "Allow non-admins to import hot wallets for their stores")] public bool AllowHotWalletRPCImportForAll { get; set; } - [Display(Name = "Check releases on GitHub and alert when new BTCPayServer version is available")] + [Display(Name = "Check releases on GitHub and notify when new BTCPay Server version is available")] public bool CheckForNewVersions { get; set; } - [Display(Name = "Disable notifications automatically showing (no websockets)")] + [Display(Name = "Disable notifications from automatically showing (no websockets)")] public bool DisableInstantNotifications { get; set; } - [Display(Name = "Disable stores falling back to using the server's email settings")] + [Display(Name = "Disable stores from using the server's email settings as backup")] public bool DisableStoresToUseServerEmailSettings { get; set; } - [Display(Name = "Only allow admins to use the user creation API")] + [Display(Name = "Disable non-admins access to the user creation API endpoint")] public bool DisableNonAdminCreateUserApi { get; set; } [Display(Name = "Display app on website root")] diff --git a/BTCPayServer/Views/Server/Policies.cshtml b/BTCPayServer/Views/Server/Policies.cshtml index 20b1c8c5a..58d8db5c4 100644 --- a/BTCPayServer/Views/Server/Policies.cshtml +++ b/BTCPayServer/Views/Server/Policies.cshtml @@ -1,93 +1,115 @@ @using BTCPayServer.Services @using BTCPayServer.Services.Mails; @model BTCPayServer.Services.PoliciesSettings -@inject BTCPayServer.Services.SettingsRepository _SettingsRepository +@inject SettingsRepository _SettingsRepository @{ ViewData.SetActivePageAndTitle(ServerNavPages.Policies); } - -@if (!this.ViewContext.ModelState.IsValid) + +@if (!ViewContext.ModelState.IsValid) {
}
-
-
- @{ - var emailSettings = (await _SettingsRepository.GetSettingAsync()) ?? new EmailSettings(); - /** - * The "|| Model.RequiresConfirmedEmail" check is for the case when a user had checked - * the checkbox without first configuring the e-mail settings so that they can uncheck it. - **/ - var isEmailConfigured = emailSettings.IsComplete() || Model.RequiresConfirmedEmail; - } - - - - @if (!isEmailConfigured) { -
- Your email server has not been configured. Please configure it first. -
- } -
-
- - - -
-
- - - -
-
+
+
Existing User Settings
+
+
-
+
+
-
+
-
- - - +
+ +
+
New User Settings
+
+ @{ + var emailSettings = (await _SettingsRepository.GetSettingAsync()) ?? new EmailSettings(); + /* The "|| Model.RequiresConfirmedEmail" check is for the case when a user had checked + the checkbox without first configuring the e-mail settings so that they can uncheck it. */ + var isEmailConfigured = emailSettings.IsComplete() || Model.RequiresConfirmedEmail; + } + + + + + @if (!isEmailConfigured) + { +
+ Your email server has not been configured. Please configure it first. +
+ }
-
- - - +
+ + +
-
+ +
+
+ +
+
Notification Settings
+
+ + + + +
+
+ + + + +
+
+ +
+
Maintenance Settings
@if (ViewBag.UpdateUrlPresent) { -
+
} +
+ + + + +
+ +
Customization Settings
+
- + @if (!Model.DomainToAppMapping.Any()) { - + }
@@ -135,40 +157,43 @@
} -
-
- - -
- +
+