Apps: Make app name the default title (#5779)

* Apps: Make app name the default title

Successor of #5762 with a way simpler approach. Allows the user-facing title to be set, but defaults it to the app name instead of "Tea shop".

* Test fixes
This commit is contained in:
d11n
2024-03-11 11:04:41 +01:00
committed by GitHub
parent 3b73d5a5cb
commit 15ce148b99
5 changed files with 43 additions and 12 deletions

View File

@@ -238,7 +238,7 @@ namespace BTCPayServer.Controllers.Greenfield
return new CrowdfundSettings
{
Title = request.Title?.Trim(),
Title = request.Title?.Trim() ?? request.AppName,
Enabled = request.Enabled ?? true,
EnforceTargetAmount = request.EnforceTargetAmount ?? false,
StartDate = request.StartDate?.UtcDateTime,
@@ -272,7 +272,7 @@ namespace BTCPayServer.Controllers.Greenfield
{
return new PointOfSaleSettings
{
Title = request.Title,
Title = request.Title ?? request.AppName,
DefaultView = (PosViewType)request.DefaultView,
ShowCustomAmount = request.ShowCustomAmount,
ShowDiscount = request.ShowDiscount,