diff --git a/src/TUI/Controls/Components/VersionExtensions.cs b/src/TUI/Controls/Components/VersionExtensions.cs index 5de4afa..9fcf3e6 100644 --- a/src/TUI/Controls/Components/VersionExtensions.cs +++ b/src/TUI/Controls/Components/VersionExtensions.cs @@ -13,9 +13,10 @@ public static class VersionExtensions VersionType.Candidate => "󰑣", VersionType.Canary => "󱗆", VersionType.Next => "󰒭", + VersionType.Unstable => "󱓉", _ => "" }; - + public static string Colorize(this VersionStatus versionStatus, string value) => versionStatus switch { diff --git a/src/TUI/Controls/Components/VersionType.cs b/src/TUI/Controls/Components/VersionType.cs index a7fac98..2030c01 100644 --- a/src/TUI/Controls/Components/VersionType.cs +++ b/src/TUI/Controls/Components/VersionType.cs @@ -3,6 +3,7 @@ namespace TUI.Controls.Components; public enum VersionType { Convention, + Unstable, Release, Candidate, Canary, diff --git a/src/TUI/Domain/Version.cs b/src/TUI/Domain/Version.cs index 8ac98d3..7fc8fac 100644 --- a/src/TUI/Domain/Version.cs +++ b/src/TUI/Domain/Version.cs @@ -21,6 +21,11 @@ public class Version Major = Convert.ToInt32(parts[0].RemoveVersionPrefix()); + if (version.StartsWith("^")) + { + Type = VersionType.Unstable; + } + if (parts.Length == 1) { return; @@ -44,7 +49,7 @@ public class Version not null when extension.Contains("alpha") => VersionType.Alpha, not null when extension.Contains("canary") => VersionType.Canary, not null when extension.Contains("next") => VersionType.Next, - _ => VersionType.Release + _ => version.StartsWith("^") ? VersionType.Unstable : VersionType.Release }; } } \ No newline at end of file