Skip to content

Commit 2b2bfcf

Browse files
authored
⬆ chore: Upgrade Masa.Blazor to 1.0.0-preview.2 (masastack#178)
1 parent 29d0a91 commit 2b2bfcf

File tree

6 files changed

+21
-32
lines changed

6 files changed

+21
-32
lines changed

Masa.Blazor.Pro/Masa.Blazor.Pro.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Masa.Blazor" Version="0.7.0-alpha.1661" />
15+
<PackageReference Include="Masa.Blazor" Version="1.0.0-preview.2" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

Masa.Blazor.Pro/Pages/App/ECommerce/Order/Cart.razor

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<MCol Md="8">
33
<MVirtualScroll style="height: calc(100vh - 228px);" class="hidden-webkit-scrollbar pr-6" Items="_basketItems">
44
<ItemContent>
5-
<MHover Context="hoverContext" class="full-width mb-6" >
6-
<MCard Height="270" Class="@($"{hoverContext.Class} {(hoverContext.Hover ? "pro-elevation" : "")}")" @attributes="hoverContext.Attrs" Elevation="@(hoverContext.Hover ? 6 : 0)">
5+
<MHover Context="hoverContext" Class="full-width mb-6">
6+
<MCard Height="270" Class="@($"{(hoverContext.Hover ? "pro-elevation" : "")}")" @attributes="hoverContext.Attrs" Elevation="@(hoverContext.Hover ? 6 : 0)">
77
<MRow class="ma-0">
88
<MCol Md="@("auto")" Align="AlignTypes.Center" class="d-flex flex-column align-center">
99
<MImage src="@context.GetPictureUrl()" Width='222' Height="222" />

Masa.Blazor.Pro/Pages/App/Todo/TodoNav.razor

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<MNavigationDrawer Permanent Class="rounded-4" Width="300" Style="overflow: visible;">
22
<MButton Class="ma-6 rounded-pill" Style="width:-webkit-fill-available;" Dark Color="primary" OnClick="() => visible = true">Add Task</MButton>
3-
<MList Linkage Dense Class="remover-ripple">
3+
<MList Routable Dense Class="remover-ripple">
44
<TodoNavItem Href="/app/todo" Icon="mdi-email-outline" Title="My Task"></TodoNavItem>
55
<TodoNavItem Href="/app/todo/important" Icon="mdi-star-outline" Title="Important"></TodoNavItem>
66
<TodoNavItem Href="/app/todo/completed" Icon="mdi-check" Title="Completed"></TodoNavItem>

Masa.Blazor.Pro/Pages/Dashboard/ECommerce.razor

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@page "/dashboard/ecommerce"
22
@inherits ProCompontentBase
33
@inject MasaBlazor MasaBlazor
4-
@inject GlobalConfig GlobalConfig;
54
@inject NavHelper NavHelper;
65
@implements IDisposable
76

@@ -31,7 +30,7 @@
3130
<h5 class="mt-1">$230k</h5>
3231
</MCol>
3332
<MCol Class="block-center">
34-
<MECharts Height=100 Width="@("100%")" Class="mt-1" @key="GetEchartKey()" Option=_orderChart></MECharts>
33+
<MECharts Height=100 Width="@("100%")" Class="mt-1" Option=_orderChart></MECharts>
3534
</MCol>
3635
</MRow>
3736
</MCardText>
@@ -46,7 +45,7 @@
4645
<h5 class="mt-1">$682.5k</h5>
4746
</MCol>
4847
<MCol Class="block-center">
49-
<MECharts Height=100 Width="@("100%")" Class="mt-1" @key="GetEchartKey()" Option=_profitChart></MECharts>
48+
<MECharts Height=100 Width="@("100%")" Class="mt-1" Option=_profitChart></MECharts>
5049
</MCol>
5150
</MRow>
5251
</MCardText>
@@ -62,7 +61,7 @@
6261
<span class="text-caption neutral-lighten-2--text">68% more earning than last month.</span>
6362
</MCol>
6463
<MCol Class="block-center">
65-
<MECharts Height=100 Width="@("100%")" Class="mt-1" @key="GetEchartKey()" Option=_earningsChart></MECharts>
64+
<MECharts Height=100 Width="@("100%")" Class="mt-1" Option=_earningsChart></MECharts>
6665
</MCol>
6766
</MRow>
6867
</MCardText>
@@ -76,7 +75,7 @@
7675
<MCol Md=8 Sm=12>
7776
<MCard Class="max-height" Style="border-radius:20px 0px 0px 20px !important;">
7877
<MCardText>
79-
<MECharts Height=326 Width="@("100%")" @key="GetEchartKey()" Option=_revenueReportChart></MECharts>
78+
<MECharts Height=326 Width="@("100%")" Option=_revenueReportChart></MECharts>
8079
</MCardText>
8180
</MCard>
8281
</MCol>
@@ -97,7 +96,7 @@
9796
<span>Budget:56,800</span>
9897
</div>
9998
<div class="mt-5" style="height:200px;">
100-
<MECharts Height=200 Width="@("100%")" @key="GetEchartKey()" Option=_budgetChart></MECharts>
99+
<MECharts Height=200 Width="@("100%")" Option=_budgetChart></MECharts>
101100
</div>
102101
<MButton Color="primary" Height=30 Class="white--text text-btn rounded-pill" Style="bottom:24px;right:24px;position:absolute">View all</MButton>
103102
</MCardText>

Masa.Blazor.Pro/Shared/Breadcrumb.razor

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@if (items.Count > 0)
1010
{
1111
<div class="d-flex block-center pb-6 pt-1">
12-
<MBreadcrumbs @key="@(Guid.NewGuid())" Linkage Class="pa-0">
12+
<MBreadcrumbs @key="@(Guid.NewGuid())" Routable Class="pa-0">
1313
<DividerContent>
1414
<div class="mx-2" style="height:16px;width:0.5px;border: 0.5px solid #A3AED0;" />
1515
</DividerContent>

Masa.Blazor.Pro/Shared/Navigation.razor

+11-21
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<MNavigationDrawer @bind-Value="Visible" Class="@($"navigation {ComputedNavigationStyle}")" Width=300 MiniVariantWidth=80 Fixed ExpandOnHover="GlobalConfig.ExpandOnHover" @bind-MiniVariant="GlobalConfig.NavigationMini" App>
66

7-
<div style="height:132px" class="@($"block-center {(GlobalConfig.NavigationMini?"px-4":"px-12")}")" @onclick="()=>NavHelper.NavigateTo(GlobalVariables.DefaultRoute)">
7+
<div style="height:132px" class="@($"block-center {(GlobalConfig.NavigationMini ? "px-4" : "px-12")}")" @onclick="() => NavHelper.NavigateTo(GlobalVariables.DefaultRoute)">
88
@if (GlobalConfig.NavigationMini)
99
{
1010
<img height="48" width="48" class="hover-pointer" src="/img/mainLayout/logo.svg" />
@@ -15,7 +15,7 @@
1515
}
1616
</div>
1717

18-
<MList Nav Linkage Dense Class="@($"pa-0 {(GlobalConfig.NavigationMini?"mini-navigation":"")}")">
18+
<MList Nav Routable Dense Class="@($"pa-0 {(GlobalConfig.NavigationMini ? "mini-navigation" : "")}")">
1919

2020
@foreach (var nav in NavHelper.Navs)
2121
{
@@ -25,10 +25,10 @@
2525
<MListItem Ripple=false Class="mb-4" ActiveClass="fill-lighten-1" Href="@nav.Href">
2626
<ItemContent>
2727
<MListItemIcon>
28-
<MIcon Color="@(context.Active?"primary":"neutral-lighten-2")" Size=20>@nav.Icon</MIcon>
28+
<MIcon Color="@(context.Active ? "primary" : "neutral-lighten-2")" Size=20>@nav.Icon</MIcon>
2929
</MListItemIcon>
3030
<MListItemContent>
31-
<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>
31+
<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>
3232
</MListItemContent>
3333
</ItemContent>
3434
</MListItem>
@@ -45,28 +45,15 @@
4545
<ChildContent>
4646
@foreach (var navChild in nav.Children)
4747
{
48-
@if (NavHelper.CurrentUri.EndsWith(navChild.Href))
49-
{
50-
<MBorder Value=false Width=4 Class="rounded-r-1" Border="Borders.Right">
51-
<MListItem Ripple=false ActiveClass="fill-lighten-1" Link Href="@navChild.Href">
52-
<ItemContent>
53-
<MListItemContent>
54-
<div class="text-truncate white-space:nowrap @(context.Active?"text-subtitle2":"text-btn neutral-lighten-2--text")">@T(navChild.Title)</div>
55-
</MListItemContent>
56-
</ItemContent>
57-
</MListItem>
58-
</MBorder>
59-
}
60-
else
61-
{
48+
<MBorder Value=false Width=4 Class="rounded-r-1" Border="Borders.Right">
6249
<MListItem Ripple=false ActiveClass="fill-lighten-1" Link Href="@navChild.Href">
6350
<ItemContent>
6451
<MListItemContent>
65-
<div class="text-truncate white-space:nowrap @(context.Active?"text-subtitle2":"text-btn neutral-lighten-2--text")">@T(navChild.Title)</div>
52+
<div class="text-truncate white-space:nowrap @(context.Active ? "text-subtitle2" : "text-btn neutral-lighten-2--text")">@T(navChild.Title)</div>
6653
</MListItemContent>
6754
</ItemContent>
6855
</MListItem>
69-
}
56+
</MBorder>
7057
}
7158
</ChildContent>
7259
</MListGroup>
@@ -85,6 +72,7 @@
8572
}
8673

8774
@code {
75+
8876
[Inject]
8977
public MasaBlazor Masa { get; set; } = default!;
9078

@@ -102,4 +90,6 @@
10290
}
10391
else Visible = true;
10492
}
105-
}
93+
}
94+
95+

0 commit comments

Comments
 (0)