mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-20 13:34:37 +01:00
Store: Move support URL to Checkout Appearance and improve wording (#5717)
As discussed in the recent design meeting.
This commit is contained in:
parent
5939e19f72
commit
354338180b
6 changed files with 19 additions and 16 deletions
|
@ -39,7 +39,6 @@ namespace BTCPayServer.Tests
|
|||
var supportUrl = "https://support.satoshisteaks.com/{InvoiceId}/";
|
||||
s.GoToStore();
|
||||
s.Driver.FindElement(By.Id("StoreWebsite")).SendKeys(storeUrl);
|
||||
s.Driver.FindElement(By.Id("StoreSupportUrl")).SendKeys(supportUrl);
|
||||
s.Driver.FindElement(By.Id("Save")).Click();
|
||||
Assert.Contains("Store successfully updated", s.FindAlertMessage().Text);
|
||||
|
||||
|
@ -47,6 +46,7 @@ namespace BTCPayServer.Tests
|
|||
s.Driver.WaitForAndClick(By.Id("Presets"));
|
||||
s.Driver.WaitForAndClick(By.Id("Presets_InStore"));
|
||||
Assert.True(s.Driver.SetCheckbox(By.Id("ShowPayInWalletButton"), true));
|
||||
s.Driver.FindElement(By.Id("SupportUrl")).SendKeys(supportUrl);
|
||||
s.Driver.FindElement(By.Id("Save")).SendKeys(Keys.Enter);
|
||||
Assert.Contains("Store successfully updated", s.FindAlertMessage().Text);
|
||||
|
||||
|
|
|
@ -438,6 +438,7 @@ namespace BTCPayServer.Controllers
|
|||
vm.CustomLogo = storeBlob.CustomLogo;
|
||||
vm.SoundFileId = storeBlob.SoundFileId;
|
||||
vm.HtmlTitle = storeBlob.HtmlTitle;
|
||||
vm.SupportUrl = storeBlob.StoreSupportUrl;
|
||||
vm.DisplayExpirationTimer = (int)storeBlob.DisplayExpirationTimer.TotalMinutes;
|
||||
vm.ReceiptOptions = CheckoutAppearanceViewModel.ReceiptOptionsViewModel.Create(storeBlob.ReceiptOptions);
|
||||
vm.AutoDetectLanguage = storeBlob.AutoDetectLanguage;
|
||||
|
@ -613,6 +614,7 @@ namespace BTCPayServer.Controllers
|
|||
blob.CustomLogo = model.CustomLogo;
|
||||
blob.CustomCSS = model.CustomCSS;
|
||||
blob.HtmlTitle = string.IsNullOrWhiteSpace(model.HtmlTitle) ? null : model.HtmlTitle;
|
||||
blob.StoreSupportUrl = string.IsNullOrWhiteSpace(model.SupportUrl) ? null : model.SupportUrl;
|
||||
blob.DisplayExpirationTimer = TimeSpan.FromMinutes(model.DisplayExpirationTimer);
|
||||
blob.AutoDetectLanguage = model.AutoDetectLanguage;
|
||||
blob.DefaultLang = model.DefaultLang;
|
||||
|
@ -704,7 +706,6 @@ namespace BTCPayServer.Controllers
|
|||
Id = store.Id,
|
||||
StoreName = store.StoreName,
|
||||
StoreWebsite = store.StoreWebsite,
|
||||
StoreSupportUrl = storeBlob.StoreSupportUrl,
|
||||
LogoFileId = storeBlob.LogoFileId,
|
||||
CssFileId = storeBlob.CssFileId,
|
||||
BrandColor = storeBlob.BrandColor,
|
||||
|
@ -741,7 +742,6 @@ namespace BTCPayServer.Controllers
|
|||
}
|
||||
|
||||
var blob = CurrentStore.GetStoreBlob();
|
||||
blob.StoreSupportUrl = model.StoreSupportUrl;
|
||||
blob.AnyoneCanInvoice = model.AnyoneCanCreateInvoice;
|
||||
blob.NetworkFeeMode = model.NetworkFeeMode;
|
||||
blob.PaymentTolerance = model.PaymentTolerance;
|
||||
|
|
|
@ -76,6 +76,10 @@ namespace BTCPayServer.Models.StoreViewModels
|
|||
[Display(Name = "Custom HTML title to display on Checkout page")]
|
||||
public string HtmlTitle { get; set; }
|
||||
|
||||
[Display(Name = "Support URL")]
|
||||
[MaxLength(500)]
|
||||
public string SupportUrl { get; set; }
|
||||
|
||||
[Display(Name = "Show a timer … minutes before invoice expiration")]
|
||||
[Range(1, 60 * 24 * 24)]
|
||||
public int DisplayExpirationTimer { get; set; }
|
||||
|
|
|
@ -22,10 +22,6 @@ namespace BTCPayServer.Models.StoreViewModels
|
|||
[MaxLength(500)]
|
||||
public string StoreWebsite { get; set; }
|
||||
|
||||
[Display(Name = "Support URL")]
|
||||
[MaxLength(500)]
|
||||
public string StoreSupportUrl { get; set; }
|
||||
|
||||
[Display(Name = "Brand Color")]
|
||||
public string BrandColor { get; set; }
|
||||
|
||||
|
|
|
@ -238,6 +238,17 @@
|
|||
<input asp-for="HtmlTitle" class="form-control" />
|
||||
<span asp-validation-for="HtmlTitle" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="SupportUrl" class="form-label"></label>
|
||||
<input asp-for="SupportUrl" class="form-control" />
|
||||
<span asp-validation-for="SupportUrl" class="text-danger"></span>
|
||||
<div class="form-text">
|
||||
For support requests related to partially paid invoices.
|
||||
A "Contact Us" button with this link will be shown on the invoice expired page.
|
||||
Can contain the placeholders <code>{OrderId}</code> and <code>{InvoiceId}</code>.
|
||||
Can be any valid URI, such as a website, email, and Nostr.
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-check my-3">
|
||||
<input asp-for="LazyPaymentMethods" type="checkbox" class="form-check-input" />
|
||||
<label asp-for="LazyPaymentMethods" class="form-check-label"></label>
|
||||
|
|
|
@ -33,15 +33,7 @@
|
|||
<input asp-for="StoreWebsite" class="form-control" />
|
||||
<span asp-validation-for="StoreWebsite" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="StoreSupportUrl" class="form-label"></label>
|
||||
<input asp-for="StoreSupportUrl" class="form-control" />
|
||||
<span asp-validation-for="StoreSupportUrl" class="text-danger"></span>
|
||||
<div class="form-text">
|
||||
For support requests, can contain the placeholders <code>{OrderId}</code> and <code>{InvoiceId}</code>. Can be any valid URI, such as a website, email, and nostr.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h3 class="mt-5 mb-3">Branding</h3>
|
||||
<div class="form-group">
|
||||
<label asp-for="BrandColor" class="form-label"></label>
|
||||
|
|
Loading…
Add table
Reference in a new issue