feat(Database) Adding entity dialog
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
|
||||
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public RenderFragment ChildContent { get; set; }
|
||||
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
.entityDialogBackground {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
@using Model.Immortal.Entity
|
||||
@using Services.Website
|
||||
@using System.ComponentModel.DataAnnotations
|
||||
@using Model.Immortal.Entity.Data
|
||||
@using Services
|
||||
|
||||
@inject IEntityDialogService entityDialogService
|
||||
|
||||
|
||||
@if (entity == null)
|
||||
{
|
||||
<div>Add a entity</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="entityLabel @entity.Descriptive.ToLower()" @onclick="EntityLabelClicked">@entity.Info().Name</button>
|
||||
}
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter] public string EntityId { get; set; }
|
||||
|
||||
private EntityModel entity = null;
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
entity = DATA.Get()[EntityId];
|
||||
Console.Write(entity.Info().Name);
|
||||
|
||||
}
|
||||
|
||||
void EntityLabelClicked()
|
||||
{
|
||||
Console.WriteLine("EntityLabelClicked()");
|
||||
|
||||
entityDialogService.AddDialog(EntityId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
.entityLabel {
|
||||
font-weight: bolder;
|
||||
box-shadow: 1px 1px 0 0 rgba(0,0,0,0.2);
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.entityLabel:hover {
|
||||
background-color: var(--primary-hover);
|
||||
}
|
||||
|
||||
.army {
|
||||
color: cyan;
|
||||
}
|
||||
|
||||
.building {
|
||||
color: greenyellow;
|
||||
}
|
||||
|
||||
.ability {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.passive {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
@implements IDisposable
|
||||
|
||||
|
||||
|
||||
<div onmouseleave="@HoverOut" class="desktopNavContainer">
|
||||
<div class="menuHeader" @onmouseover="() => NavigationService.ChangeNavigationState(NavigationStateType.Hovering_Menu)">
|
||||
<NavLink href="/" class="websiteTitle">
|
||||
@@ -42,7 +41,6 @@
|
||||
width: 100vw;
|
||||
height: 40px;
|
||||
background-color: rgba(255,255,255,0.1);
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.menuHeader {
|
||||
|
||||
Reference in New Issue
Block a user