feat(Database) Direct database/Throne links now work in the database. Added a Detailed/Plain view button

This commit is contained in:
2022-04-03 20:09:21 -04:00
parent 8584570a1e
commit 28087b58d9
28 changed files with 1123 additions and 296 deletions
@@ -1,5 +1,7 @@
@if (Entity.IdPyreSpells().Count > 0) {
<EntityDisplayComponent Title="Pyre Spells">
@if (Entity.IdPyreSpells().Count > 0)
{
@if (StyleType.Equals("Plain"))
{
@foreach (var pyreSpell in Entity.IdPyreSpells()) {
var spell = EntityModel.Get(pyreSpell.Id);
@@ -8,30 +10,68 @@
<div>
<div>
<b>Name:</b> <EntityLabelComponent EntityId="@spell.DataType"/>
<b>Spell Name:</b> @spell.Info().Name
</div>
<div>
<b>Description:</b> @((MarkupString)info.Description)
<b>- Description:</b> @((MarkupString)info.Description)
</div>
<div>
@if (production != null) {
if (production.Pyre != 0) {
<b> Pyre: </b>
<b>- Pyre: </b>
@production.Pyre
}
if (production.BuildTime != 0) {
<b> BuildTime: </b>
<b>- BuildTime: </b>
@production.BuildTime
}
if (production.Cooldown != 0) {
<b> Cooldown: </b>
<b>- Cooldown: </b>
@production.Cooldown
}
}
</div>
</div>
}
</EntityDisplayComponent>
}
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>
}
}
@@ -40,4 +80,8 @@
[CascadingParameter]
public EntityModel? Entity { get; set; }
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
}