From 93175bb9fc7a4ffd67cc3360fea30c196b548e6c Mon Sep 17 00:00:00 2001 From: Taylor Southwick Date: Mon, 26 Aug 2019 14:02:50 -0700 Subject: [PATCH 1/3] Update blazor for preview 8 and fix some casing issues --- sample/Comet.Blazor.Sample/Pages/_Host.cshtml | 2 +- sample/Comet.Blazor.Sample/_Imports.razor | 1 - src/Comet.Blazor/CanvasWriter.cs | 4 ++-- src/Comet.Blazor/Comet.Blazor.csproj | 5 ++--- src/Comet.Blazor/CometExtensions.cs | 4 ++-- src/Comet.Blazor/CometPage.razor | 2 +- src/Comet.Blazor/Components/BButton.razor | 2 +- src/Comet.Blazor/Components/BContainerView.razor | 2 +- src/Comet.Blazor/Components/BImage.razor | 2 +- src/Comet.Blazor/Components/BListView.razor | 2 +- src/Comet.Blazor/Components/BProgressBar.razor | 4 ++-- src/Comet.Blazor/Components/BShape.razor | 2 +- src/Comet.Blazor/Components/BSpacer.razor | 2 +- src/Comet.Blazor/Components/BTabView.razor | 2 +- src/Comet.Blazor/Components/BText.razor | 2 +- src/Comet.Blazor/Components/BTextField.razor | 2 +- src/Comet.Blazor/Components/BUnsupported.razor | 2 +- src/Comet.Blazor/Components/BView.cs | 2 +- src/Comet.Blazor/Components/CometComponentBase.cs | 2 +- src/Comet.Blazor/Scripts/{cometui.js => comet.js} | 2 +- src/Comet.Blazor/UI.cs | 7 ++++++- tests/Comet.Blazor.Tests/Comet.Blazor.Tests.csproj | 9 ++++++--- tests/Comet.Blazor.Tests/RegistrarTests.cs | 9 +++++++++ 23 files changed, 44 insertions(+), 29 deletions(-) rename src/Comet.Blazor/Scripts/{cometui.js => comet.js} (97%) diff --git a/sample/Comet.Blazor.Sample/Pages/_Host.cshtml b/sample/Comet.Blazor.Sample/Pages/_Host.cshtml index 4e90e427..f4d9b708 100644 --- a/sample/Comet.Blazor.Sample/Pages/_Host.cshtml +++ b/sample/Comet.Blazor.Sample/Pages/_Host.cshtml @@ -24,7 +24,7 @@ @(await Html.RenderComponentAsync()) - + diff --git a/sample/Comet.Blazor.Sample/_Imports.razor b/sample/Comet.Blazor.Sample/_Imports.razor index 13d94be9..07867f54 100644 --- a/sample/Comet.Blazor.Sample/_Imports.razor +++ b/sample/Comet.Blazor.Sample/_Imports.razor @@ -1,6 +1,5 @@ @using System.Net.Http @using Microsoft.AspNetCore.Components.Forms -@using Microsoft.AspNetCore.Components.Layouts @using Microsoft.AspNetCore.Components.Routing @using Microsoft.JSInterop @using Comet.Blazor.Sample diff --git a/src/Comet.Blazor/CanvasWriter.cs b/src/Comet.Blazor/CanvasWriter.cs index 4db544c6..a3499a30 100644 --- a/src/Comet.Blazor/CanvasWriter.cs +++ b/src/Comet.Blazor/CanvasWriter.cs @@ -12,8 +12,8 @@ namespace Comet.Blazor _jsRuntime = jsRuntime; } - public Task GetSizeAsync(object canvas) => _jsRuntime.InvokeAsync("Comet.canvas.getSize", new[] { canvas }); + public Task GetSizeAsync(object canvas) => _jsRuntime.InvokeAsync("comet.canvas.getSize", new[] { canvas }); - public Task DrawImageAsync(object canvas, byte[] bytes) => _jsRuntime.InvokeAsync("Comet.canvas.drawImage", new[] { canvas, bytes }); + public Task DrawImageAsync(object canvas, byte[] bytes) => _jsRuntime.InvokeAsync("comet.canvas.drawImage", new[] { canvas, bytes }); } } diff --git a/src/Comet.Blazor/Comet.Blazor.csproj b/src/Comet.Blazor/Comet.Blazor.csproj index 1084e397..38bea1e7 100644 --- a/src/Comet.Blazor/Comet.Blazor.csproj +++ b/src/Comet.Blazor/Comet.Blazor.csproj @@ -9,12 +9,11 @@ + - - PreserveNewest - + diff --git a/src/Comet.Blazor/CometExtensions.cs b/src/Comet.Blazor/CometExtensions.cs index 286bbb05..5105a01a 100644 --- a/src/Comet.Blazor/CometExtensions.cs +++ b/src/Comet.Blazor/CometExtensions.cs @@ -16,11 +16,11 @@ namespace Comet.Blazor UI.Init(); app.UseImages(); - app.Map("/_Comet/Comet.js", app2 => + app.Map("/_comet/comet.js", app2 => { app2.Run(async ctx => { - using (var stream = typeof(CometExtensions).Assembly.GetManifestResourceStream(typeof(CometExtensions), "Scripts.Comet.js")) + using (var stream = typeof(CometExtensions).Assembly.GetManifestResourceStream(typeof(CometExtensions), "Scripts.comet.js")) { ctx.Response.StatusCode = 200; ctx.Response.ContentType = "application/javascript"; diff --git a/src/Comet.Blazor/CometPage.razor b/src/Comet.Blazor/CometPage.razor index 5e079782..ef6a9c2f 100644 --- a/src/Comet.Blazor/CometPage.razor +++ b/src/Comet.Blazor/CometPage.razor @@ -1,6 +1,6 @@ @using Comet.Blazor.Components -
+