Crowdfund finetuning (#3488)

* Update crowdfund defaults

* Crowdfund: Move sound, animation and discussion into additional options

* Update sound URLs

Fixes #3745.

* Update featured image URL label

* Improve the recurring goal section

* Crowdfund: Goal section finetuning
This commit is contained in:
d11n
2022-06-28 05:03:13 +02:00
committed by GitHub
parent 618666abf1
commit 9428347cb6
8 changed files with 205 additions and 161 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using BTCPayServer.Services.Apps;
using BTCPayServer.Validation;
@@ -28,7 +29,7 @@ namespace BTCPayServer.Models.AppViewModels
[Required]
public string Description { get; set; }
[Display(Name = "Featured Image")]
[Display(Name = "Featured Image URL")]
public string MainImageUrl { get; set; }
[Display(Name = "Callback Notification URL")]
@@ -68,11 +69,15 @@ namespace BTCPayServer.Models.AppViewModels
[Range(0, double.PositiveInfinity)]
public decimal? TargetAmount { get; set; }
public IEnumerable<string> ResetEveryValues = Enum.GetNames(typeof(CrowdfundResetEvery));
public IEnumerable<string> ResetEveryValues = Enum.GetNames(typeof(CrowdfundResetEvery))
.Where(i => i != nameof(CrowdfundResetEvery.Never));
public bool IsRecurring { get; set; }
[Display(Name = "Reset goal every")]
public string ResetEvery { get; set; } = nameof(CrowdfundResetEvery.Never);
[Display(Name = "Reset goal every")]
public int ResetEveryAmount { get; set; } = 1;
[Display(Name = "Do not allow additional contributions after target has been reached")]