Agent Tests for API, MAUI, and Slop Features

This commit is contained in:
2026-06-03 19:08:35 -04:00
parent 46150d3a69
commit 0feac0f0a0
142 changed files with 4156 additions and 1462 deletions
+56 -4
View File
@@ -1,5 +1,7 @@
@inject IStorageService StorageService
@inject IPermissionService PermissionService
@inject IGlossaryDialogService GlossaryDialogService
@inject IJSRuntime JsRuntime
<Router AppAssembly="@typeof(App).Assembly">
<Found Context="routeData">
@@ -18,15 +20,12 @@
</Router>
<EntityDialogPortal/>
<GlossaryDialogPortal/>
<ToastPortal/>
<SearchPortal/>
<ConfirmationDialogPortal/>
@if (PermissionService.GetIsDataCollectionEnabled())
{
<NavigationTracker/>
}
<style>
@@ -83,6 +82,22 @@
--dialog-border-color: black;
--dialog-border-width: 2px;
--dialog-radius: 6px;
--info-secondary: #1e1e2e;
--info-secondary-border: #3a3a5c;
}
.glossary-link {
text-decoration: underline;
text-decoration-style: dotted;
text-underline-offset: 2px;
cursor: pointer;
color: #8fc5ff;
font-weight: 600;
}
.glossary-link:hover {
background-color: var(--primary-hover);
}
</style>
@@ -97,4 +112,41 @@
StateHasChanged();
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await JsRuntime.InvokeVoidAsync("eval", @"
window.glossaryInterop = {
dotNetRef: null,
init: function(dotNetRef) {
this.dotNetRef = dotNetRef;
document.addEventListener('click', function(e) {
var target = e.target;
while (target) {
if (target.classList && target.classList.contains('glossary-link')) {
var id = target.getAttribute('data-glossary-id');
if (id && window.glossaryInterop.dotNetRef) {
window.glossaryInterop.dotNetRef.invokeMethodAsync('OpenGlossaryTerm', id);
e.preventDefault();
return;
}
}
target = target.parentElement;
}
});
}
};
");
await JsRuntime.InvokeVoidAsync("glossaryInterop.init", DotNetObjectReference.Create(this));
}
}
[JSInvokable]
public void OpenGlossaryTerm(string termId)
{
GlossaryDialogService.AddDialog(termId);
StateHasChanged();
}
}