Show multiline DevExpress message boxes with CSS fix

Added a ShowMessageBoxAsync overload to display multiple messages as separate lines using a custom CSS class (`fb-msgbox-multiline`) to preserve line breaks. Updated GridEkaerHistory.razor to use this for skipped item reporting. Extended app.css with the required style. Enhanced settings.local.json with new PowerShell commands for DevExpress.Blazor package inspection.
This commit is contained in:
Loretta 2026-07-11 06:55:10 +02:00
parent b6dddd6f1f
commit e72f5c1cb3
4 changed files with 26 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -293,8 +293,9 @@
}
// Az adathiány/formátumhiba miatt KIHAGYOTT jelöltek üzenetei popupban — ezeket javítani kell, mielőtt bekerülhetnek.
// A lista-overload üzenetenként külön sort ad (a Text-be fűzött sortöréseket a HTML elnyelné); a cím hozza a darabszámot.
if (result?.Messages is { Count: > 0 } skipped)
await DialogService.ShowMessageBoxAsync("EKÁER — kihagyott tételek", string.Join(Environment.NewLine, skipped), MessageBoxRenderStyle.Warning);
await DialogService.ShowMessageBoxAsync($"EKÁER — kihagyott tételek ({skipped.Count})", skipped, MessageBoxRenderStyle.Warning);
}
private async Task OnDownloadClick(EkaerHistory ekaerHistory)

View File

@ -12,6 +12,19 @@ public static class DevexpressComponentExtensions
await messageBox.AlertAsync(messageBoxOptions);
}
/// <summary>Több-üzenetes messagebox: minden üzenet KÜLÖN SORBAN jelenik meg. A sima <c>Text</c>-be fűzött
/// sortörések a HTML-renderelésnél szóközzé olvadnának — a <c>CssClass</c> + a <c>white-space: pre-line</c>
/// szabály (app.css: <c>.fb-msgbox-multiline</c>) tartja meg őket. (A <c>MessageBoxOptions</c>-nek nincs
/// BodyTemplate-je, ezért CSS-megoldás.)</summary>
public static async Task ShowMessageBoxAsync(this IDialogService messageBox, string title, IReadOnlyCollection<string> lines, MessageBoxRenderStyle messageBoxRenderStyle)
{
// "• " prefix = lista-hatás (a MessageBoxOptions csak sima szöveget tud, <ul>/<li> nem lehetséges).
var messageBoxOptions = CreateMessageBoxOptions(title, string.Join(Environment.NewLine, lines.Select(l => $"• {l}")), messageBoxRenderStyle);
messageBoxOptions.CssClass = "fb-msgbox-multiline";
await messageBox.AlertAsync(messageBoxOptions);
}
public static async Task<bool> ShowConfirmBoxAsync(this IDialogService messageBox, string title, string text, MessageBoxRenderStyle messageBoxRenderStyle)
{
var messageBoxOptions = CreateMessageBoxOptions(title, text, messageBoxRenderStyle);

View File

@ -3,6 +3,12 @@ html, body {
min-height: 100vh;
}
/* Több-üzenetes messagebox (DevexpressComponentExtensions.ShowMessageBoxAsync lista-overload):
a Text-be fűzött sortörések valódi sorokként jelenjenek meg (a white-space öröklődik a dialógus törzsébe). */
.fb-msgbox-multiline {
white-space: pre-line;
}
a, .btn-link {
color: #006bb7;
}