From 1b893f3e425562d5fbb30a9e8b5943e3b0977d47 Mon Sep 17 00:00:00 2001 From: Toreole Date: Tue, 1 Aug 2023 16:43:38 +0200 Subject: [PATCH 1/4] Minor fixes --- BlazorWebAssembly/Client/Pages/Index.razor | 4 ++-- BlazorWebAssembly/Client/Shared/NavMenu.razor | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BlazorWebAssembly/Client/Pages/Index.razor b/BlazorWebAssembly/Client/Pages/Index.razor index c05ce7c..95d94be 100644 --- a/BlazorWebAssembly/Client/Pages/Index.razor +++ b/BlazorWebAssembly/Client/Pages/Index.razor @@ -20,13 +20,13 @@ protected override async Task OnInitializedAsync() { + imageReconstructor.OnOutputChanged += StateHasChanged; //blockData persists across page swaps. no need to get it again. if (imageReconstructor.blockData.Length != 0) return; - var path = "images/tex_metadata.json"; + string path = "images/tex_metadata.json"; string json = await Http.GetStringAsync(path); imageReconstructor.blockData = JsonSerializer.Deserialize(json) ?? new MinecraftBlock[0]; - imageReconstructor.OnOutputChanged += StateHasChanged; } ~Index() diff --git a/BlazorWebAssembly/Client/Shared/NavMenu.razor b/BlazorWebAssembly/Client/Shared/NavMenu.razor index 32a2c89..59a7832 100644 --- a/BlazorWebAssembly/Client/Shared/NavMenu.razor +++ b/BlazorWebAssembly/Client/Shared/NavMenu.razor @@ -15,7 +15,7 @@ From 0776b76da4a68b95fdab03f8c2c21ecca1193f2f Mon Sep 17 00:00:00 2001 From: Toreole Date: Tue, 1 Aug 2023 16:59:59 +0200 Subject: [PATCH 2/4] Update layout to include link to repo, consistent styling --- BlazorWebAssembly/Client/Pages/Index.razor | 4 ++-- BlazorWebAssembly/Client/Shared/MainLayout.razor | 1 + BlazorWebAssembly/Client/Shared/NavMenu.razor | 6 ++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/BlazorWebAssembly/Client/Pages/Index.razor b/BlazorWebAssembly/Client/Pages/Index.razor index 95d94be..603f4ea 100644 --- a/BlazorWebAssembly/Client/Pages/Index.razor +++ b/BlazorWebAssembly/Client/Pages/Index.razor @@ -63,11 +63,11 @@ Block Size: @blockSize - + Contrast Bias: @imageReconstructor.ContrastBias - + Greedy Selection Threshold: @imageReconstructor.GreedyTextureThreshold diff --git a/BlazorWebAssembly/Client/Shared/MainLayout.razor b/BlazorWebAssembly/Client/Shared/MainLayout.razor index fc0a45f..4ea4dd2 100644 --- a/BlazorWebAssembly/Client/Shared/MainLayout.razor +++ b/BlazorWebAssembly/Client/Shared/MainLayout.razor @@ -10,6 +10,7 @@
About +
diff --git a/BlazorWebAssembly/Client/Shared/NavMenu.razor b/BlazorWebAssembly/Client/Shared/NavMenu.razor index 59a7832..25cc67c 100644 --- a/BlazorWebAssembly/Client/Shared/NavMenu.razor +++ b/BlazorWebAssembly/Client/Shared/NavMenu.razor @@ -1,6 +1,6 @@