diff --git a/Assets/dotsanimation1.webm b/Assets/dotsanimation1.webm new file mode 100644 index 0000000..e59b91e Binary files /dev/null and b/Assets/dotsanimation1.webm differ diff --git a/Assets/logo_empty.png b/Assets/logo_empty.png new file mode 100644 index 0000000..6a48a00 Binary files /dev/null and b/Assets/logo_empty.png differ diff --git a/src/Constants.cs b/src/Constants.cs index cdb17ae..29d75cc 100644 --- a/src/Constants.cs +++ b/src/Constants.cs @@ -9,7 +9,8 @@ namespace Dots; public class Constants { public const string AppName = "Dots"; - public const string InstalledSdkSKey = "Installed-Sdks-Key"; + public const string InstalledSdkSKey = "installed-sdks-key"; + public const string LastCheckedKey = "last-checked"; #if MACCATALYST public const string UninstallerPath = "Package Cache"; public const string InstallerScript = "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh"; diff --git a/src/Data/ReleaseIndex.cs b/src/Data/ReleaseIndex.cs index ed1440f..48ce45c 100644 --- a/src/Data/ReleaseIndex.cs +++ b/src/Data/ReleaseIndex.cs @@ -46,11 +46,11 @@ public class ReleaseIndex public Uri ReleasesJson { get; set; } } -public enum Product { Net, NetCore }; +public enum Product { Net, NetCore, Undefined }; -public enum ReleaseType { Lts, Sts }; +public enum ReleaseType { Lts, Sts, Undefined }; -public enum SupportPhase { Active, Eol, Preview }; +public enum SupportPhase { Active, Eol, Preview, Undefined }; public class ProductEnumConverter : JsonConverter @@ -61,7 +61,7 @@ public override Product Read(ref Utf8JsonReader reader, Type typeToConvert, Json { ".NET" => Product.Net, ".NET Core" => Product.NetCore, - _ => throw new JsonException() + _ => Product.Undefined }; } @@ -71,7 +71,7 @@ public override void Write(Utf8JsonWriter writer, Product value, JsonSerializerO { Product.Net => ".NET", Product.NetCore => ".NET Core", - _ => throw new JsonException() + _ => "" }); } } @@ -84,7 +84,7 @@ public override ReleaseType Read(ref Utf8JsonReader reader, Type typeToConvert, { "lts" => ReleaseType.Lts, "sts" => ReleaseType.Sts, - _ => throw new JsonException() + _ => ReleaseType.Undefined }; } @@ -94,7 +94,7 @@ public override void Write(Utf8JsonWriter writer, ReleaseType value, JsonSeriali { ReleaseType.Lts => "lts", ReleaseType.Sts => "sts", - _ => throw new JsonException() + _ => "" }); } } @@ -108,7 +108,7 @@ public override SupportPhase Read(ref Utf8JsonReader reader, Type typeToConvert, "preview" => SupportPhase.Preview, "active" => SupportPhase.Active, "eol" => SupportPhase.Eol, - _ => throw new JsonException() + _ => SupportPhase.Undefined }; } @@ -119,7 +119,7 @@ public override void Write(Utf8JsonWriter writer, SupportPhase value, JsonSerial SupportPhase.Preview => "preview", SupportPhase.Active => "active", SupportPhase.Eol => "eol", - _ => throw new JsonException() + _ => "" }); } } diff --git a/src/MainPage.xaml b/src/MainPage.xaml index deb3758..31c0892 100644 --- a/src/MainPage.xaml +++ b/src/MainPage.xaml @@ -629,15 +629,28 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/MainPage.xaml.cs b/src/MainPage.xaml.cs index 53c8538..4e69823 100644 --- a/src/MainPage.xaml.cs +++ b/src/MainPage.xaml.cs @@ -10,6 +10,7 @@ using System; using System.Diagnostics; using static System.Runtime.InteropServices.JavaScript.JSType; +using Microsoft.Maui.Platform; namespace Dots; @@ -22,14 +23,34 @@ public MainPage(MainViewModel vm) InitializeComponent(); AnimationView.Source = new HtmlWebViewSource() { - Html = $$"""