Skip to content

Commit 839406d

Browse files
Merge pull request #105 from stavroskasidis/release/1.11
Release/1.11
2 parents d69c313 + 644c8ca commit 839406d

File tree

24 files changed

+132
-159
lines changed

24 files changed

+132
-159
lines changed

BlazorContextMenu/BlazorContextMenu.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<IsPackable>true</IsPackable>
6-
<RazorLangVersion>3.0</RazorLangVersion>
76

87
<!-- This custom package feed is required only when using nightly builds of Blazor -->
98
<!-- <RestoreSources>https://dotnet.myget.org/F/blazor-dev/api/v3/index.json;$(RestoreSources)</RestoreSources> -->
@@ -17,7 +16,7 @@
1716
<Copyright />
1817
<PackageTags>blazor blazor-component blazor-context-menu context-menu contextmenu menu blazor-menu blazorcontextmenu razor razor-components razorcomponents</PackageTags>
1918
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
20-
<Version>1.10.1</Version>
19+
<Version>1.11.0</Version>
2120
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
2221
<Product>Blazor.ContextMenu</Product>
2322
</PropertyGroup>
@@ -46,7 +45,7 @@
4645
</ItemGroup>
4746

4847
<ItemGroup>
49-
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.0" />
50-
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.0" />
48+
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.0" />
49+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.0" />
5150
</ItemGroup>
5251
</Project>

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,12 @@ public class Startup
244244
</details>
245245
246246
## Release Notes
247+
<details open="open"><summary>1.11</summary>
247248

248-
<details open="open"><summary>1.10.1</summary>
249+
>- Upgraded to dotnet 6.0
250+
</details>
251+
252+
<details><summary>1.10.1</summary>
249253

250254
>- Fix for [#80](https://github.com/stavroskasidis/BlazorContextMenu/issues/80).
251255
</details>

TestApps/BlazorContextMenu.TestAppsCommon/BlazorContextMenu.TestAppsCommon.csproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.1</TargetFramework>
5-
<LangVersion>7.3</LangVersion>
6-
<RazorLangVersion>3.0</RazorLangVersion>
4+
<TargetFramework>net6.0</TargetFramework>
75
</PropertyGroup>
86

97
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.0" />
8+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.0" />
119
</ItemGroup>
1210

1311
<ItemGroup>

TestApps/BlazorContextMenu.TestAppsCommon/wwwroot/css/site.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ div.red-menu {
143143

144144
div.dark-menu {
145145
color: #FFFFFF;
146-
background-color: #444;
146+
background-color: rgba(52, 58, 64, 0.95);
147+
width: 200px;
148+
margin: 0;
149+
padding: 0;
147150
}
148151

149152
.dark-menu .dark-menu-item--with-submenu:after {
@@ -153,6 +156,7 @@ div.dark-menu {
153156
.dark-menu .dark-menu-item--disabled,
154157
.dark-menu .dark-menu-item {
155158
background-color: #444;
159+
backdrop-filter: blur(2px) contrast(.3);
156160
}
157161

158162
.dark-menu .dark-menu-item--disabled:hover,
Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Router AppAssembly="@typeof(Program).Assembly">
1+
<Router AppAssembly="@typeof(Program).Assembly" PreferExactMatches="@true">
22
<Found Context="routeData">
33
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
44
</Found>
@@ -8,16 +8,3 @@
88
</LayoutView>
99
</NotFound>
1010
</Router>
11-
12-
13-
14-
@*@inject IJSRuntime jsRuntime
15-
@code{
16-
protected override async Task OnAfterRenderAsync(bool firstRender)
17-
{
18-
if (firstRender)
19-
{
20-
await jsRuntime.InvokeVoidAsync("TestApp_AppLoaded");
21-
}
22-
}
23-
}*@

TestApps/BlazorTestApp/BlazorContextMenu.BlazorTestApp.Client/BlazorContextMenu.BlazorTestApp.Client.csproj

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.1</TargetFramework>
5-
<LangVersion>7.3</LangVersion>
6-
<RazorLangVersion>3.0</RazorLangVersion>
7-
8-
<!-- This custom package feed is required only when using nightly builds of Blazor -->
9-
<!-- <RestoreSources>$(RestoreSources);https://dotnet.myget.org/f/blazor-dev/api/v3/index.json</RestoreSources> -->
4+
<TargetFramework>net6.0</TargetFramework>
105
</PropertyGroup>
116

127
<ItemGroup>
13-
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.1.0-preview4.19579.2" />
14-
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.1.0-preview4.19579.2" PrivateAssets="all" />
15-
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="3.1.0-preview4.19579.2" />
8+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0" />
9+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0" PrivateAssets="all" />
1610
</ItemGroup>
1711

1812
<ItemGroup>
Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,47 @@
1-
using Microsoft.AspNetCore.Blazor.Hosting;
1+
using BlazorContextMenu;
2+
using BlazorContextMenu.BlazorTestApp.Client;
3+
using BlazorContextMenu.BlazorTestApp.Client.Services;
4+
using BlazorContextMenu.TestAppsCommon;
5+
using Microsoft.AspNetCore.Components.Web;
6+
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
27
using Microsoft.Extensions.DependencyInjection;
38
using System;
9+
using System.Net.Http;
410

5-
namespace BlazorContextMenu.BlazorTestApp.Client
11+
var builder = WebAssemblyHostBuilder.CreateDefault(args);
12+
builder.RootComponents.Add<App>("#app");
13+
builder.RootComponents.Add<HeadOutlet>("head::after");
14+
builder.Services.AddScoped<ISampleDataService, SampleDataService>();
15+
builder.Services.AddBlazorContextMenu(options =>
616
{
7-
public class Program
17+
options.ConfigureTemplate(defaultTemplate =>
818
{
9-
public static void Main(string[] args)
10-
{
11-
CreateHostBuilder(args).Build().Run();
12-
}
19+
defaultTemplate.MenuCssClass = "my-menu";
20+
defaultTemplate.MenuItemCssClass = "my-menu-item";
21+
defaultTemplate.SeperatorCssClass = "my-menu-seperator";
22+
});
1323

14-
public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) =>
15-
BlazorWebAssemblyHost.CreateDefaultBuilder()
16-
.UseBlazorStartup<Startup>();
17-
}
18-
}
24+
options.ConfigureTemplate("red", template =>
25+
{
26+
template.MenuCssClass = "red-menu";
27+
template.MenuItemCssClass = "red-menu-item";
28+
template.MenuItemDisabledCssClass = "red-menu-item--disabled";
29+
template.SeperatorHrCssClass = "red-menu-seperator-hr";
30+
template.MenuItemWithSubMenuCssClass = "red-menu-item--with-submenu";
31+
template.Animation = Animation.FadeIn;
32+
});
33+
34+
options.ConfigureTemplate("dark", template =>
35+
{
36+
template.MenuCssClass = "dark-menu";
37+
template.MenuItemCssClass = "dark-menu-item";
38+
template.MenuItemDisabledCssClass = "dark-menu-item--disabled";
39+
template.SeperatorHrCssClass = "dark-menu-seperator-hr";
40+
template.MenuItemWithSubMenuCssClass = "dark-menu-item--with-submenu";
41+
template.Animation = Animation.FadeIn;
42+
});
43+
});
44+
45+
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
46+
47+
await builder.Build().RunAsync();

TestApps/BlazorTestApp/BlazorContextMenu.BlazorTestApp.Client/Properties/launchSettings.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
},
1818
"BlazorContextMenu.BlazorTestApp": {
1919
"commandName": "Project",
20+
"dotnetRunMessages": "true",
2021
"launchBrowser": true,
22+
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
23+
"applicationUrl": "https://localhost:5001;http://localhost:5000",
2124
"environmentVariables": {
2225
"ASPNETCORE_ENVIRONMENT": "Development"
23-
},
24-
"applicationUrl": "http://localhost:64255/"
26+
}
2527
}
2628
}
2729
}

TestApps/BlazorTestApp/BlazorContextMenu.BlazorTestApp.Client/Services/SampleDataService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Collections.Generic;
55
using System.Linq;
66
using System.Net.Http;
7+
using System.Net.Http.Json;
78
using System.Threading.Tasks;
89

910
namespace BlazorContextMenu.BlazorTestApp.Client.Services
@@ -19,7 +20,7 @@ public SampleDataService(HttpClient http)
1920

2021
public async Task<string[]> GetSampleData()
2122
{
22-
var summaries = await _http.GetJsonAsync<string[]>("api/SampleData/Summaries");
23+
var summaries = await _http.GetFromJsonAsync<string[]>("api/SampleData/Summaries");
2324
return summaries;
2425
}
2526
}

TestApps/BlazorTestApp/BlazorContextMenu.BlazorTestApp.Client/Startup.cs

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)