Initial Commit

This commit is contained in:
2026-05-29 14:17:46 -04:00
commit b7d0676d5b
498 changed files with 30308 additions and 0 deletions
@@ -0,0 +1,25 @@
@implements IDisposable;
@inject IMyDialogService MyDialogService
<ConfirmationDialogComponent></ConfirmationDialogComponent>
@code {
protected override void OnInitialized()
{
base.OnInitialized();
MyDialogService.Subscribe(OnUpdate);
}
void IDisposable.Dispose()
{
MyDialogService.Unsubscribe(OnUpdate);
}
void OnUpdate()
{
StateHasChanged();
}
}
@@ -0,0 +1,29 @@
@implements IDisposable;
@inject IEntityDialogService entityDialogService
@if (entityDialogService.HasDialog())
{
<EntityDialogComponent></EntityDialogComponent>
}
@code {
protected override void OnInitialized()
{
base.OnInitialized();
entityDialogService.Subscribe(OnUpdate);
}
void IDisposable.Dispose()
{
entityDialogService.Unsubscribe(OnUpdate);
}
void OnUpdate()
{
StateHasChanged();
}
}
+49
View File
@@ -0,0 +1,49 @@
@implements IDisposable;
@inject ISearchService searchService
@inject IJSRuntime jsRuntime
<SearchDialogComponent></SearchDialogComponent>
@code {
private string test = "Q";
protected override void OnInitialized()
{
searchService.Subscribe(OnUpdate);
}
protected override async Task OnInitializedAsync()
{
await searchService.Load();
await jsRuntime.InvokeVoidAsync("SetDotnetReference", DotNetObjectReference.Create(this));
}
public void Dispose()
{
searchService.Unsubscribe(OnUpdate);
}
void OnUpdate()
{
StateHasChanged();
}
[JSInvokable("OnKeyPress")]
public async Task OnKeyPress(string code, bool ctrlKey, bool shiftKey, bool altKey, bool metaKey)
{
if (code.ToLower().Equals("k") && (ctrlKey || shiftKey || altKey || metaKey))
{
if (searchService.IsVisible)
{
searchService.Hide();
}
else
{
searchService.Show();
}
}
}
}
+60
View File
@@ -0,0 +1,60 @@
@implements IDisposable;
@inject IToastService toastService
@if (toastService.HasToasts())
{
<div class="toastsContainer">
@foreach (var toast in Toasts)
{
<ToastComponent Toast="toast"/>
}
</div>
}
<style>
.toastsContainer {
position: fixed;
top: 64px;
right: 64px;
display: flex;
flex-direction: column;
gap: 5px;
}
</style>
@code {
private List<ToastModel> Toasts => toastService.GetToasts();
private Timer ageTimer = null!;
protected override void OnInitialized()
{
base.OnInitialized();
toastService.Subscribe(OnUpdate);
ageTimer = new Timer(10);
ageTimer.Elapsed += OnAge!;
ageTimer.Enabled = true;
}
void IDisposable.Dispose()
{
toastService.Unsubscribe(OnUpdate);
}
void OnAge(object? sender, ElapsedEventArgs elapsedEventArgs)
{
toastService.AgeToasts();
ageTimer.Enabled = true;
}
void OnUpdate()
{
StateHasChanged();
}
}