Skip to content

Commit

Permalink
fix nullability warning and improve margin for search box
Browse files Browse the repository at this point in the history
Co-authored-by: iTTou <13366390+ittou@users.noreply.github.com>
  • Loading branch information
floribe2000 and iTTou committed Oct 2, 2023
1 parent 7871549 commit 92ef6ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
@for (int i = TiersRange.First(); i <= TiersRange.Last(); i++)
{
int tier = i;
bool isSelected = ViewModel.SelectedTiers.Contains(tier);
bool isSelected = ViewModel!.SelectedTiers.Contains(tier);
<MudButton DisableElevation="true" Variant="GetVariantFromBool(isSelected)" Color="GetColorFromBool(isSelected)" @onmouseup="@(args => ToggleTierSelection(tier, args))" oncontextmenu="return false;">
@tier.ToTierString()
</MudButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@

@if (ViewModel is not null)
{
<MudTextField AutoFocus T="string" Margin="Margin.Normal" Adornment="Adornment.Start" Placeholder="@Localizer.SimpleAppLocalization(nameof(Translation.ShipComparison_TypeName))" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Variant="Variant.Outlined" Label="@Localizer.SimpleAppLocalization(nameof(Translation.ShipComparison_SearchAndPin))" @bind-Text="@ViewModel.ResearchedShip" Immediate="true" DebounceInterval="150"/>
<div style="margin: 8px 0;"></div>
<MudTextField AutoFocus T="string" Margin="Margin.Dense" Adornment="Adornment.Start" Placeholder="@Localizer.SimpleAppLocalization(nameof(Translation.ShipComparison_TypeName))" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Variant="Variant.Outlined" Label="@Localizer.SimpleAppLocalization(nameof(Translation.ShipComparison_SearchAndPin))" @bind-Text="@ViewModel.ResearchedShip" Immediate DebounceInterval="150"/>
if (!string.IsNullOrEmpty(ViewModel.ResearchedShip))
{
<MudPaper Style="max-height: 300px; overflow:auto; margin-top: -9px" Outlined="true">
Expand All @@ -65,7 +66,7 @@
<MudStack Row Justify="Justify.Center" AlignItems="AlignItems.Center">
<MudImage Src="@($"{CdnOptions.Value.Host}{CdnOptions.Value.ShipImagePath}/{ship.Index}.png")" Height="35" ObjectPosition="ObjectPosition.Center"/>
<MudText Color="Color.Secondary" Class="mt-3">
@(LocalizeShipName(ship.Index))
@LocalizeShipName(ship.Index)
</MudText>
</MudStack>
</MudListItem>
Expand Down

0 comments on commit 92ef6ec

Please sign in to comment.