Improves create point of sale view (#2646)

* re-ordering

* adds section header

* updates label on "products"

* changes button to primary

* moves description

* updates partial

* re-ordering + section headers

* more section heads and ordering

* redorders

* Toggle custom amount and tips settings

* Use display name for point of sale app type

* Use switches for enabling options

* Add space before required indicator

* Set and consolidate view model display names

* Move redirects and custom CSS to additional options

* Revert to checkbox for discounts

* adds padding

* removes bs-parent for multiple open elements on accordion

* adds helper text to discount checkbox

* updates "default view" label text

* wording cleanup

* more wording adjustments

* updates

* Add display names for app types

* Extract template editor inline styles

* updates helper text

* Display names for app types

* Typo fix

* Move template back to editor

* Fix selenium test

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
This commit is contained in:
dstrukt
2021-07-23 03:57:19 -07:00
committed by GitHub
parent a7f6bcf36c
commit b7b2f16925
17 changed files with 230 additions and 152 deletions

View File

@@ -19,7 +19,7 @@ namespace BTCPayServer.Models.AppViewModels
public string Currency { get; set; }
public string Template { get; set; }
[Display(Name = "Default view")]
[Display(Name = "Point of Sale Style")]
public PosViewType DefaultView { get; set; }
[Display(Name = "User can input custom amount")]
public bool ShowCustomAmount { get; set; }
@@ -32,20 +32,20 @@ namespace BTCPayServer.Models.AppViewModels
public string ExampleCallback { get; internal set; }
public string InvoiceUrl { get; internal set; }
[Display(Name = "Callback Notification Url")]
[Display(Name = "Callback Notification URL")]
[Uri]
public string NotificationUrl { get; set; }
[Display(Name = "Redirect Url")]
[Display(Name = "Redirect URL")]
[Uri]
public string RedirectUrl { get; set; }
[Required]
[MaxLength(30)]
[Display(Name = "Text to display on each buttons for items with a specific price")]
[Display(Name = "Text to display on each button for items with a specific price")]
public string ButtonText { get; set; }
[Required]
[MaxLength(30)]
[Display(Name = "Text to display on buttons next to the input allowing the user to enter a custom amount")]
[Display(Name = "Text to display on buttons allowing the user to enter a custom amount")]
public string CustomButtonText { get; set; }
[Required]
[MaxLength(30)]
@@ -56,7 +56,7 @@ namespace BTCPayServer.Models.AppViewModels
public string CustomTipPercentages { get; set; }
[MaxLength(500)]
[Display(Name = "Custom bootstrap CSS file")]
[Display(Name = "Custom CSS URL")]
public string CustomCSSLink { get; set; }
public string Id { get; set; }
@@ -87,6 +87,7 @@ namespace BTCPayServer.Models.AppViewModels
}
}, nameof(SelectListItem.Value), nameof(SelectListItem.Text), RedirectAutomatically);
[Display(Name = "Custom CSS Code")]
public string EmbeddedCSS { get; set; }
public string Description { get; set; }
}