feat(Database) Adding entity dialog
This commit is contained in:
@@ -170,7 +170,7 @@
|
||||
}
|
||||
else {
|
||||
immortals = (from entity in factions
|
||||
where entity.Vanguard() == null || entity.Vanguard().Immortal == selectedImmortalType
|
||||
where entity.VanguardAdded() == null || entity.VanguardAdded().ImmortalId == selectedImmortalType
|
||||
select entity).ToList();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@if (Entity != null) {
|
||||
var isVanguard = Entity.Vanguard() != null ? " vanguard" : "";
|
||||
var isVanguard = Entity.VanguardAdded() != null ? " vanguard" : "";
|
||||
|
||||
<div class="enititiesContainer @isVanguard">
|
||||
<EntityHeaderComponent Entity=Entity></EntityHeaderComponent>
|
||||
|
||||
<div class="entityPartsContainer">
|
||||
<EntityVanguardComponent Entity=Entity></EntityVanguardComponent>
|
||||
<div>
|
||||
<EntityVanguardAddedComponent Entity=Entity></EntityVanguardAddedComponent>
|
||||
<EntityInfoComponent Entity=Entity></EntityInfoComponent>
|
||||
<EntityVanguardsComponent Entity=Entity></EntityVanguardsComponent>
|
||||
<EntityProductionComponent Entity=Entity></EntityProductionComponent>
|
||||
@@ -30,28 +30,11 @@
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.vanguard {
|
||||
border: 4px solid var(--accent);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.entityPartsContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@media only screen and (max-width: 1025px) {
|
||||
.enititiesContainer {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.entityPartsContainer {
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<b>Name:</b> @info.Name
|
||||
<b>Name:</b> <EntityLabelComponent EntityId="@spell.DataType"/>
|
||||
</div>
|
||||
<div>
|
||||
<b>Description:</b> @((MarkupString)info.Description)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<b>Name:</b> @info.Name
|
||||
<b>Name:</b> <EntityLabelComponent EntityId="@passive.DataType"/>
|
||||
</div>
|
||||
<div style="max-width: 600px;">
|
||||
<b>Description:</b> @((MarkupString)info.Description)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div>
|
||||
|
||||
<span>
|
||||
<b>@requirement.Requirement.Replace("_", " "):</b> @requirement.Name
|
||||
<b>@requirement.Requirement.Replace("_", " "):</b> <EntityLabelComponent EntityId="@requirement.DataType"/>
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
@@ -46,6 +46,13 @@
|
||||
<b>Build Time:</b> @production.BuildTime.ToString()s
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (!production.Energy.Equals(0)) {
|
||||
<div>
|
||||
<b>Energy:</b> @production.Energy
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@if (!production.Cooldown.Equals(0)) {
|
||||
<div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<b>Name:</b> @info.Name
|
||||
<b>Name:</b> <EntityLabelComponent EntityId="@spell.DataType"/>
|
||||
</div>
|
||||
<div>
|
||||
<b>Description:</b> @((MarkupString)info.Description)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var entity = EntityModel.Get(upgradeId.Id);
|
||||
<div>
|
||||
<div>
|
||||
<b>Name:</b> @entity.Info().Name
|
||||
<b>Name:</b> <EntityLabelComponent EntityId="@entity.DataType"/>
|
||||
</div>
|
||||
<div>
|
||||
<b>Description:</b> @entity.Info().Description
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
@{
|
||||
var vanguard = Entity.VanguardAdded();
|
||||
|
||||
var isNull = Entity.VanguardAdded() == null ? "null" : "not null";
|
||||
}
|
||||
|
||||
@if (vanguard != null) {
|
||||
var immortalId = Entity.VanguardAdded().ImmortalId;
|
||||
var immortal = DATA.Get()[immortalId];
|
||||
|
||||
|
||||
<EntityDisplayComponent Title="Vanguard">
|
||||
<div>
|
||||
<div>
|
||||
<b>Immortal:</b> <EntityLabelComponent EntityId="@immortal.DataType"/>
|
||||
</div>
|
||||
@if (!Entity.VanguardAdded().ReplaceId.Equals("")) {
|
||||
<div>
|
||||
<b>Replaces:</b> <EntityLabelComponent EntityId="@Entity.VanguardAdded().ReplaceId"></EntityLabelComponent>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</EntityDisplayComponent>
|
||||
}
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public EntityModel Entity { get; set; }
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
@if (Entity.Vanguard() != null) {
|
||||
<EntityDisplayComponent Title="Vanguard">
|
||||
<div>
|
||||
<div>
|
||||
<b>Immortal:</b> @Entity.Vanguard().Immortal.Replace("_", " ")
|
||||
</div>
|
||||
@if (Entity.Vanguard().Replaces != "") {
|
||||
<div>
|
||||
<b>Replaces:</b> @Entity.Vanguard().Replaces.Replace("_", " ")
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</EntityDisplayComponent>
|
||||
}
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public EntityModel Entity { get; set; }
|
||||
|
||||
}
|
||||
@@ -3,24 +3,21 @@
|
||||
@foreach (var data in Entity.IdVanguards()) {
|
||||
var entity = EntityModel.Get(data.Id);
|
||||
|
||||
var info = entity.Info();
|
||||
var production = entity.Production();
|
||||
var requirements = entity.Requirements();
|
||||
var vanguard = entity.Vanguard();
|
||||
var vanguard = entity.VanguardAdded();
|
||||
var productionBuilding = (from building in requirements
|
||||
where building.Requirement == RequirementType.Production_Building
|
||||
select building).First().Name;
|
||||
select building).First().DataType;
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<b>Name:</b> @info.Name
|
||||
<b>Name:</b> <EntityLabelComponent EntityId="@entity.DataType"/>
|
||||
</div>
|
||||
<div>
|
||||
<b>Replaces:</b> @vanguard.Replaces
|
||||
<b>Replaces:</b> <EntityLabelComponent EntityId="@vanguard.ReplaceId"/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<b>Built From:</b> @productionBuilding
|
||||
<b>Built From:</b> <EntityLabelComponent EntityId="@productionBuilding"/>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -13,12 +13,15 @@
|
||||
|
||||
@if (EntityFilterService.GetFactionType() != "Any" && EntityFilterService.GetFactionType() != "None") {
|
||||
<div class="filterContainer">
|
||||
@foreach (var choice in EntityFilterService.GetImmortalChoices()) {
|
||||
@foreach (var choice in EntityFilterService.GetImmortalChoices())
|
||||
{
|
||||
var name = DATA.Get()[choice].Info().Name;
|
||||
|
||||
var styleClass = "";
|
||||
if (choice.Equals(EntityFilterService.GetImmortalType())) {
|
||||
styleClass = "selected";
|
||||
}
|
||||
<button class="choiceButton @styleClass" @onclick="@(e => OnChangeImmortal(choice))">@choice</button>
|
||||
<button class="choiceButton @styleClass" @onclick="@(e => OnChangeImmortal(choice))">@name</button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@@ -52,10 +55,10 @@
|
||||
<FormLabelComponent>Immortal</FormLabelComponent>
|
||||
<ChildContent>
|
||||
<option value="@ImmortalType.Any" selected>Any</option>
|
||||
<option value="@ImmortalType.Mala">Mala</option>
|
||||
<option value="@ImmortalType.Xol">Xol</option>
|
||||
<option value="@ImmortalType.Orzum">Orzum</option>
|
||||
<option value="@ImmortalType.Ajari">Ajari</option>
|
||||
<option value="@DataType.IMMORTAL_Mala">Mala</option>
|
||||
<option value="@DataType.IMMORTAL_Xol">Xol</option>
|
||||
<option value="@DataType.IMMORTAL_Orzum">Orzum</option>
|
||||
<option value="@DataType.IMMORTAL_Ajari">Ajari</option>
|
||||
</ChildContent>
|
||||
</FormSelectComponent>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user