feature/apply-filter #18

Merged
Egamorf merged 11 commits from feature/apply-filter into main 2025-04-20 15:43:24 +02:00
2 changed files with 9 additions and 9 deletions
Showing only changes of commit 92c7f6fa38 - Show all commits

View File

@@ -12,8 +12,8 @@ public class GameFilterParams
public List<TagDto>? Tags { get; set; }
public List<PublisherDto>? Publishers { get; set; }
public List<DeveloperDto>? Developers { get; set; }
public int MinInterest { get; set; } = 1;
public int MaxInterest { get; set; } = 5;
public int? MinInterest { get; set; }
public int? MaxInterest { get; set; }
public List<int>? ReleaseYears { get; set; }
public List<StorageSpaceDto>? StorageSpaces { get; set; }
}

View File

@@ -6,10 +6,10 @@ namespace GameIdeas.BlazorApp.Shared.Components.SliderRange;
public partial class SliderRange
{
[Parameter] public SliderRangeParams Params { get; set; } = new();
[Parameter] public int Max { get; set; }
[Parameter] public EventCallback<int> MaxChanged { get; set; }
[Parameter] public int Min { get; set; }
[Parameter] public EventCallback<int> MinChanged { get; set; }
[Parameter] public int? Max { get; set; }
[Parameter] public EventCallback<int?> MaxChanged { get; set; }
[Parameter] public int? Min { get; set; }
[Parameter] public EventCallback<int?> MinChanged { get; set; }
private async Task HandleSlideTwoInput()
{
@@ -33,12 +33,12 @@ public partial class SliderRange
private string FillColor()
{
var percent1 = (double)(Min - Params.Min) / (Params.Max - Params.Min) * 100;
var percent2 = (double)(Max - Params.Min) / (Params.Max - Params.Min) * 100;
var percent1 = (double)(Min! - Params.Min) / (Params.Max - Params.Min) * 100;
var percent2 = (double)(Max! - Params.Min) / (Params.Max - Params.Min) * 100;
return $"background: linear-gradient(to right, var(--line) {percent1}% , var(--violet) {percent1}% , var(--violet) {percent2}%, var(--line) {percent2}%)";
}
private string StatusColor(int value)
private string StatusColor(int? value)
{
string str = "--thumb-color: var({0});";