38 lines
1.0 KiB
Plaintext
38 lines
1.0 KiB
Plaintext
@inject IImmortalSelectionService FilterService
|
|
@using Model.Entity.Data
|
|
@implements IDisposable
|
|
|
|
<FormLayoutComponent>
|
|
<div style="@GetBorderStyle()">
|
|
@ChildContent
|
|
</div>
|
|
</FormLayoutComponent>
|
|
|
|
@code {
|
|
|
|
[Parameter] public RenderFragment? ChildContent { get; set; }
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
base.OnInitialized();
|
|
FilterService.Subscribe(StateHasChanged);
|
|
}
|
|
|
|
void IDisposable.Dispose()
|
|
{
|
|
FilterService.Unsubscribe(StateHasChanged);
|
|
}
|
|
|
|
string GetBorderStyle()
|
|
{
|
|
var immortal = FilterService.GetImmortal();
|
|
var color = "#666666";
|
|
if (immortal == DataType.IMMORTAL_Orzum) color = "#4A6B8A";
|
|
else if (immortal == DataType.IMMORTAL_Ajari) color = "#A3B8CC";
|
|
else if (immortal == DataType.IMMORTAL_Atzlan) color = "#8B7355";
|
|
else if (immortal == DataType.IMMORTAL_Mala) color = "#6B8E23";
|
|
else if (immortal == DataType.IMMORTAL_Xol) color = "#9CA89C";
|
|
return $"border-top: 4px solid {color}; padding-top: 4px;";
|
|
}
|
|
}
|