Skip to content

Commit

Permalink
⬆ chore: upgrade Masa.Blazor to v1.5.0 (#209)
Browse files Browse the repository at this point in the history
* ⬆ chore: upgrade Masa.Blazor to v1.5.0

* 👷 chore: Update dockerfile
  • Loading branch information
capdiem committed May 7, 2024
1 parent 73fb9a6 commit 9c9bc71
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
35 changes: 17 additions & 18 deletions Masa.Blazor.Pro.Client/Layout/Navigation.razor
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
MiniVariant="@GlobalConfig.ExpandOnHover"
App>
<div class="logo" @onclick="() => NavHelper.NavigateTo(GlobalVariables.DefaultRoute)">
<img class="hover-pointer" height="49" src="/img/mainLayout/logo-en.svg" />
<img class="hover-pointer" height="49" src="/img/mainLayout/logo-en.svg"/>
</div>

<MList Nav Routable Dense Class="@($"pa-0 {(GlobalConfig.ExpandOnHover ? "mini-navigation" : "")}")">
Expand All @@ -21,39 +21,39 @@
{
if (nav.Children is null)
{
<MBorder Value=false Offset Width=4 Class="rounded-r-1" Border="Borders.Right">
<MListItem Ripple=false Class="mb-4" ActiveClass="fill-lighten-1" Href="@nav.Href">
<ItemContent>
<MListItem Ripple=false Class="mb-4" ActiveClass="fill-lighten-1" Href="@nav.Href">
<ItemContent>
<MBorder Value="@context.Active" Offset Size=4 Border="Borders.Right" Style="display: contents">
<MListItemIcon>
<MIcon Color="@(context.Active ? "primary" : "neutral-lighten-2")" Size=20>@nav.Icon</MIcon>
</MListItemIcon>
<MListItemContent>
<div style="margin-left:6.5px;" class="text-truncate white-space:nowrap @(context.Active ? "text-subtitle" : "text-body neutral-lighten-2--text")">@T(nav.Title)</div>
<div style="margin-left:6.5px;" class="text-truncate @(context.Active ? "text-subtitle" : "text-body neutral-lighten-2--text")">@T(nav.Title)</div>
</MListItemContent>
</ItemContent>
</MListItem>
</MBorder>
</MBorder>
</ItemContent>
</MListItem>
}
else
{
<MListGroup Group="@nav.Children.Select(n => n.Href).ToList()" Class="mb-4" PrependIcon="@nav.Icon" NoAction ActiveClass="primaryText" AppendIcon="M8.33398 10.3335L12.5007 14.5002L16.6673 10.3335H8.33398Z">
<ActivatorContent>
<MListItemContent>
<div style="margin-left:6.5px;" class="text-truncate white-space:nowrap">@T(nav.Title)</div>
<div style="margin-left:6.5px;" class="text-truncate">@T(nav.Title)</div>
</MListItemContent>
</ActivatorContent>
<ChildContent>
@foreach (var navChild in nav.Children)
{
<MBorder Value=false Offset Width=4 Class="rounded-r-1" Border="Borders.Right">
<MListItem Ripple=false ActiveClass="fill-lighten-1" Link Href="@navChild.Href">
<ItemContent>
<MListItem Ripple=false ActiveClass="fill-lighten-1" Style="overflow: visible" Link Href="@navChild.Href">
<ItemContent>
<MBorder Value="@context.Active" Offset Size=4 Style="display: contents" Border="Borders.Right">
<MListItemContent>
<div class="text-truncate white-space:nowrap @(context.Active ? "text-subtitle2" : "text-btn neutral-lighten-2--text")">@T(navChild.Title)</div>
</MListItemContent>
</ItemContent>
</MListItem>
</MBorder>
</MBorder>
</ItemContent>
</MListItem>
}
</ChildContent>
</MListGroup>
Expand All @@ -73,8 +73,7 @@

@code {

[Inject]
public MasaBlazor Masa { get; set; } = default!;
[Inject] public MasaBlazor Masa { get; set; } = default!;

private CancellationTokenSource? _cancellationTokenSource;

Expand Down Expand Up @@ -125,4 +124,4 @@
GlobalConfig.ExpandOnHoverChanged -= GlobalConfigChanged;
}

}
}
6 changes: 3 additions & 3 deletions Masa.Blazor.Pro.Client/Masa.Blazor.Pro.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Masa.Blazor" Version="1.3.0-beta.6" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Masa.Blazor" Version="1.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.3" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions Masa.Blazor.Pro/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM registry.cn-hangzhou.aliyuncs.com/masa/dotnet_aspnet:8.0-1 AS base
FROM registry.cn-hangzhou.aliyuncs.com/masa/dotnet_aspnet:8.0.3 AS base
WORKDIR /app
ENV ASPNETCORE_URLS=http://0.0.0.0:80
EXPOSE 80
EXPOSE 443

FROM registry.cn-hangzhou.aliyuncs.com/masa/dotnet_sdk:8.0.100-1 AS build
FROM registry.cn-hangzhou.aliyuncs.com/masa/sdk:8.0.203 AS build
WORKDIR /src
COPY ["Masa.Blazor.Pro/Masa.Blazor.Pro.csproj", "Masa.Blazor.Pro/"]
RUN dotnet restore "Masa.Blazor.Pro/Masa.Blazor.Pro.csproj"
Expand Down
2 changes: 1 addition & 1 deletion Masa.Blazor.Pro/Masa.Blazor.Pro.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<ProjectReference Include="..\Masa.Blazor.Pro.Client\Masa.Blazor.Pro.Client.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 9c9bc71

Please sign in to comment.