diff --git a/UI/AppUpdateNoticeRenderer.cs b/UI/AppUpdateNoticeRenderer.cs index 9117f6e..f3a2851 100644 --- a/UI/AppUpdateNoticeRenderer.cs +++ b/UI/AppUpdateNoticeRenderer.cs @@ -9,12 +9,22 @@ public static class AppUpdateNoticeRenderer public static void Render(UpdateCheckResult updateResult) { var label = updateResult.IsPrerelease ? "Pre-release available" : "Update available"; + var updateCommand = GetUpdateCommand(); + var content = new Rows( + new Markup( + $"[yellow bold]{label}: v{Markup.Escape(updateResult.LatestVersion)}[/] [Grey66](current: [/][Grey66 dim bold]{Markup.Escape(updateResult.CurrentVersion)}[/][Grey66])[/]"), + new Markup($"[Grey66]Close this app before updating and run:[/] [underline]{Markup.Escape(updateCommand)}[/]"), + new Markup($"[Grey66]Manual download:[/] [link]{Markup.Escape(updateResult.ReleaseUrl)}[/]")); - AnsiConsole.MarkupLine( - $"[yellow bold]{label}: v{updateResult.LatestVersion}[/] [grey](current: {updateResult.CurrentVersion})[/]"); - AnsiConsole.MarkupLine("[grey]Close this app before updating.[/]"); - AnsiConsole.MarkupLine($"[grey]Run: {GetUpdateCommand()}[/]"); - AnsiConsole.MarkupLine($"[grey]Manual download: {updateResult.ReleaseUrl}[/]"); + var panel = new Panel(content) + { + Border = BoxBorder.Square, + BorderStyle = new Style(Color.Grey, null, Decoration.Dim) + }; + panel.Padding = new Padding(1, 0, 1, 0); + panel.Expand = false; + + AnsiConsole.Write(panel); } private static string GetUpdateCommand()