Converting Tests back to C# but still with Playwright
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
@if (Entity!.IdPyreSpells().Count > 0)
|
||||
{
|
||||
@if (StyleType.Equals("Plain"))
|
||||
{
|
||||
@foreach (var pyreSpell in Entity.IdPyreSpells())
|
||||
{
|
||||
var spell = EntityModel.Get(pyreSpell.Id);
|
||||
|
||||
var info = spell.Info();
|
||||
var production = spell.Production();
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<b>Spell Name:</b> @spell.Info().Name
|
||||
</div>
|
||||
<div>
|
||||
<b>- Description:</b> @((MarkupString)info.Description)
|
||||
</div>
|
||||
<div>
|
||||
@if (production != null)
|
||||
{
|
||||
if (production.Pyre != 0)
|
||||
{
|
||||
<b>- Pyre: </b>
|
||||
@production.Pyre
|
||||
}
|
||||
|
||||
if (production.BuildTime != 0)
|
||||
{
|
||||
<b>- BuildTime: </b>
|
||||
@production.BuildTime
|
||||
}
|
||||
|
||||
if (production.Cooldown != 0)
|
||||
{
|
||||
<b>- Cooldown: </b>
|
||||
@production.Cooldown
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<EntityDisplayComponent Title="Pyre Spells">
|
||||
@foreach (var pyreSpell in Entity.IdPyreSpells())
|
||||
{
|
||||
var spell = EntityModel.Get(pyreSpell.Id);
|
||||
|
||||
var info = spell.Info();
|
||||
var production = spell.Production();
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<b>Name:</b>
|
||||
<EntityLabelComponent EntityId="@spell.DataType"/>
|
||||
</div>
|
||||
<div>
|
||||
<b>Description:</b> @((MarkupString)info.Description)
|
||||
</div>
|
||||
<div>
|
||||
@if (production != null)
|
||||
{
|
||||
if (production.Pyre != 0)
|
||||
{
|
||||
<b> Pyre: </b>
|
||||
@production.Pyre
|
||||
}
|
||||
|
||||
if (production.BuildTime != 0)
|
||||
{
|
||||
<b> BuildTime: </b>
|
||||
@production.BuildTime
|
||||
}
|
||||
|
||||
if (production.Cooldown != 0)
|
||||
{
|
||||
<b> Cooldown: </b>
|
||||
@production.Cooldown
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</EntityDisplayComponent>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
[CascadingParameter] public EntityModel? Entity { get; set; }
|
||||
|
||||
|
||||
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user