Agent Tests for API, MAUI, and Slop Features
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
@inject IGlossaryService glossaryService
|
||||
@inject IGlossaryDialogService glossaryDialogService
|
||||
|
||||
@if (TermId == null)
|
||||
{
|
||||
<span>Missing term</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
var term = glossaryService.GetTerm(TermId);
|
||||
if (term != null)
|
||||
{
|
||||
<button class="glossaryLabel @term.Category.ToLowerInvariant()" @onclick="TermLabelClicked"
|
||||
title="@term.ShortDefinition">
|
||||
@term.Term
|
||||
</button>
|
||||
}
|
||||
}
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter] public string TermId { get; set; } = default!;
|
||||
|
||||
void TermLabelClicked()
|
||||
{
|
||||
glossaryDialogService.AddDialog(TermId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
.glossaryLabel {
|
||||
font-weight: bolder;
|
||||
box-shadow: 1px 1px 0 0 rgba(0, 0, 0, 0.2);
|
||||
padding-right: 4px;
|
||||
border: none;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dotted;
|
||||
text-underline-offset: 2px;
|
||||
}
|
||||
|
||||
.glossaryLabel:hover {
|
||||
background-color: var(--primary-hover);
|
||||
}
|
||||
|
||||
.resource {
|
||||
color: gold;
|
||||
}
|
||||
|
||||
.mechanic {
|
||||
color: #8fc5ff;
|
||||
}
|
||||
|
||||
.faction {
|
||||
color: #da4e4e;
|
||||
}
|
||||
|
||||
.role {
|
||||
color: #87aa87;
|
||||
}
|
||||
Reference in New Issue
Block a user