From 3b165de7a9c13b1e3a38b9c420d69f45c4f7ae8d Mon Sep 17 00:00:00 2001 From: 6d486f49 <76097bcc@gmail.com> Date: Thu, 4 Jun 2026 14:08:20 -0400 Subject: [PATCH] ...dialog --- Device/wwwroot/css/app.css | 4 +- .../Dialog/ConfirmationDialogComponent.razor | 120 +++++---- Pages/Dialog/EntityDialogComponent.razor | 168 ++++++------ Pages/Dialog/GlossaryDialogComponent.razor | 220 ++++++++------- Pages/Dialog/SearchDialogComponent.razor | 250 +++++++++++------- Web/App.razor | 4 +- Web/wwwroot/css/app.css | 4 +- 7 files changed, 436 insertions(+), 334 deletions(-) diff --git a/Device/wwwroot/css/app.css b/Device/wwwroot/css/app.css index c83e19e..3ba0018 100644 --- a/Device/wwwroot/css/app.css +++ b/Device/wwwroot/css/app.css @@ -37,9 +37,7 @@ --info-hover: #451376; --info-border-hover: #210b36; - --dialog-border-color: black; - --dialog-border-width: 2px; - --dialog-radius: 6px; + --dialog-radius: 12px; } html { diff --git a/Pages/Dialog/ConfirmationDialogComponent.razor b/Pages/Dialog/ConfirmationDialogComponent.razor index e0ad2ed..9bf9291 100644 --- a/Pages/Dialog/ConfirmationDialogComponent.razor +++ b/Pages/Dialog/ConfirmationDialogComponent.razor @@ -2,24 +2,25 @@ @inject IMyDialogService MyDialogService @inject IJSRuntime JsRuntime - @inject NavigationManager NavigationManager @if (MyDialogService.IsVisible) { -
-
+
-
- @MyDialogService.GetDialogContents().Title +
+
@MyDialogService.GetDialogContents().Title
+
-
+ +
@MyDialogService.GetDialogContents().Message
-
+
Cancel @@ -33,71 +34,97 @@
} - @code { - protected override void OnInitialized() { base.OnInitialized(); - MyDialogService.Subscribe(() => InvokeAsync(StateHasChanged)); } @@ -106,11 +133,8 @@ MyDialogService.Unsubscribe(() => InvokeAsync(StateHasChanged)); } - public void CloseDialog() { MyDialogService.Hide(); } - - -} \ No newline at end of file +} diff --git a/Pages/Dialog/EntityDialogComponent.razor b/Pages/Dialog/EntityDialogComponent.razor index 90c323b..6ff850b 100644 --- a/Pages/Dialog/EntityDialogComponent.razor +++ b/Pages/Dialog/EntityDialogComponent.razor @@ -1,31 +1,30 @@ @implements IDisposable; @inject IEntityDialogService entityDialogService -
- -
+
@if (entity == null) { -
Entity is null
+
Entity is null
} else {
- @if (entityDialogService.HasHistory()) - { - - } - -
- @entity.Info().Name +
+ @if (entityDialogService.HasHistory()) + { + + } +
@entity.Info().Name
- +
-
+ +
@@ -39,105 +38,117 @@ -
-
} -
-
@code { - EntityModel entity = default!; private int refresh; @@ -146,7 +157,6 @@ { base.OnInitialized(); entity = EntityData.Get()[entityDialogService.GetEntityId() ?? string.Empty]; - entityDialogService.Subscribe(OnUpdate); } @@ -159,7 +169,6 @@ { entity = EntityData.Get()[entityDialogService.GetEntityId() ?? string.Empty]; refresh++; - StateHasChanged(); } @@ -167,5 +176,4 @@ { entityDialogService.CloseDialog(); } - -} \ No newline at end of file +} diff --git a/Pages/Dialog/GlossaryDialogComponent.razor b/Pages/Dialog/GlossaryDialogComponent.razor index a5c3cfc..92e8391 100644 --- a/Pages/Dialog/GlossaryDialogComponent.razor +++ b/Pages/Dialog/GlossaryDialogComponent.razor @@ -2,31 +2,34 @@ @inject IGlossaryService glossaryService @inject IGlossaryDialogService glossaryDialogService - -
+
@if (term == null) { -
Term is null
+
Term is null
} else {
- @if (glossaryDialogService.HasHistory()) - { - - } -
- @term.Term +
+ @if (glossaryDialogService.HasHistory()) + { + + } +
@term.Term
+
+
+ @term.Category +
-
@term.Category
-
+ +
@((MarkupString)RenderMarkdown(term.LongDefinition))
@if (term.RelatedEntityIds.Count > 0) @@ -55,112 +58,131 @@
}
-
}
-
} - @code { - private string SearchText { get; set; } = ""; protected override void OnInitialized() @@ -146,7 +203,6 @@ timer.Enabled = false; } - private void FocusTimer(object? sender, ElapsedEventArgs e) { jsRuntime.InvokeVoidAsync("SetFocusToElement", "searchInput"); @@ -171,7 +227,6 @@ timer.Elapsed -= FocusTimer; } - public void CloseDialog() { searchService.Hide(); @@ -205,5 +260,4 @@ { timer.Enabled = false; } - -} \ No newline at end of file +} diff --git a/Web/App.razor b/Web/App.razor index 2708d58..495d65b 100644 --- a/Web/App.razor +++ b/Web/App.razor @@ -80,9 +80,7 @@ --info: #451376; --info-border: #210b36; - --dialog-border-color: black; - --dialog-border-width: 2px; - --dialog-radius: 6px; + --dialog-radius: 12px; --info-secondary: #1e1e2e; --info-secondary-border: #3a3a5c; diff --git a/Web/wwwroot/css/app.css b/Web/wwwroot/css/app.css index c83e19e..3ba0018 100644 --- a/Web/wwwroot/css/app.css +++ b/Web/wwwroot/css/app.css @@ -37,9 +37,7 @@ --info-hover: #451376; --info-border-hover: #210b36; - --dialog-border-color: black; - --dialog-border-width: 2px; - --dialog-radius: 6px; + --dialog-radius: 12px; } html {