fix color formatting core dump

This commit is contained in:
2026-05-20 11:20:00 +02:00
parent 27cf1b6314
commit 3e9d80fe98
3 changed files with 74 additions and 33 deletions
+5 -5
View File
@@ -32,15 +32,15 @@ public static class MainMenuScreen
if (key is not null)
{
var conn = key.Host + ":" + key.Port +
(string.IsNullOrEmpty(key.Tenant) ? "" : "@" + key.Tenant) +
" user=" + key.User;
AnsiConsole.MarkupLine(
$" Key: [bold yellow]{key.Name}[/] " +
$"[dim]{key.Host}:{key.Port}" +
(string.IsNullOrEmpty(key.Tenant) ? "" : $"@{key.Tenant}") +
$" user={key.User}[/]");
$" Key: [bold yellow]{Markup.Escape(key.Name)}[/] [dim]{Markup.Escape(conn)}[/]");
}
else
{
AnsiConsole.MarkupLine($" Key: [bold yellow]{keyName}[/]");
AnsiConsole.MarkupLine($" Key: [bold yellow]{Markup.Escape(keyName)}[/]");
}
AnsiConsole.WriteLine();