Skip to content

Commit

Permalink
Merge pull request #1807 from pkuehnel/fix/minorIssues
Browse files Browse the repository at this point in the history
Fix/minor issues
  • Loading branch information
pkuehnel authored Feb 4, 2025
2 parents 628f8ab + f3f19a3 commit c07c2bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<MudPaper Class="d-flex justify-end flex-grow-1 gap-4 pr-2 mb-2" Elevation="0">
@if (IsDisabled && !string.IsNullOrEmpty(DisableToolTipText))
@if (IsDisabled && !string.IsNullOrEmpty(DisabledToolTipText))
{
<MudTooltip>
<ChildContent>
<MudButton Color="Color.Primary"
<MudButton Color="@ButtonColor"
Variant="Variant.Filled"
StartIcon="@StartIcon"
Disabled="true"
ButtonType="ButtonType">@ButtonText</MudButton>
</ChildContent>
<TooltipContent>
@DisableToolTipText
@DisabledToolTipText
</TooltipContent>
</MudTooltip>
}
else
{
<MudButton Disabled="IsLoading || IsDisabled"
Color="Color.Primary"
Color="@ButtonColor"
Variant="Variant.Filled"
StartIcon="@StartIcon"
OnClick="AddButtonClicked"
Expand All @@ -44,10 +44,13 @@
[Parameter]
public string StartIcon { get; set; }
[Parameter]
public string? DisableToolTipText { get; set; }
public string? DisabledToolTipText { get; set; }
[Parameter]
public bool IsLoading { get; set; }

[Parameter]
public Color ButtonColor { get; set; } = Color.Primary;

[Parameter]
public ButtonType ButtonType { get; set; } = ButtonType.Button;

Expand Down
2 changes: 1 addition & 1 deletion TeslaSolarCharger/Client/Pages/BaseConfiguration.razor
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ else
<GenericInput For="() => _dtoBaseConfiguration.SendStackTraceToTelegram"></GenericInput>
<RightAlignedButtonComponent ButtonText="Send test message"
IsDisabled="_telegramSettingsChanged"
DisableToolTipText="You need to save the configuration before testing it."
DisabledToolTipText="You need to save the configuration before testing it."
OnButtonClicked="_ => SendTelegramTestMessage()"></RightAlignedButtonComponent>
</div>

Expand Down
2 changes: 1 addition & 1 deletion TeslaSolarCharger/Shared/Dtos/CarBasicConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public CarBasicConfigurationValidator()
RuleFor(x => x.MaximumAmpere).GreaterThan(0);
RuleFor(x => x.MaximumAmpere).LessThanOrEqualTo(64);
RuleFor(x => x)
.Must(config => config.MaximumAmpere > config.MinimumAmpere)
.Must(config => config.MaximumAmpere >= config.MinimumAmpere)
.WithMessage("MaximumAmpere must be greater than MinimumAmpere.");
RuleFor(x => x.UsableEnergy).GreaterThan(5);
RuleFor(x => x.ChargingPriority).GreaterThan(0);
Expand Down

0 comments on commit c07c2bb

Please sign in to comment.