Skip to content

Commit fa8662e

Browse files
authored
⬆ chore: upgrade Masa.Blazor to 1.0.0-rc.4 (masastack#192)
1 parent 4bd1b3e commit fa8662e

24 files changed

+76
-64
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="1.0.0-rc.1" />
15+
<PackageReference Include="Masa.Blazor" Version="1.0.0-rc.4" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

Masa.Blazor.Pro/Pages/App/Invoice/Add.razor

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<MCardText class="px-8 py-6">
88
<div class="d-flex">
99
<div class="mr-auto">
10-
<MIcon Color=purple>fas fa-seedling</MIcon>
10+
<MIcon Color=purple>fa:fas fa-seedling</MIcon>
1111
<span class="ml-4 black--text">Masa Blazor Pro</span>
1212
<h4 class="mt-6">Office 149, 450 South Brand Brooklyn</h4>
1313
<h4 class="mt-2">San Diego County, CA 91905, USA</h4>
@@ -124,11 +124,11 @@
124124
</MRow>
125125
</div>
126126
<div class="border-solid text-center" style="width:20px">
127-
<MIcon Small OnClick="()=>_bills.Remove(bill)">fas fa-times</MIcon>
127+
<MIcon Small OnClick="()=>_bills.Remove(bill)">fa:fas fa-times</MIcon>
128128
<div style="height:75%"></div>
129129
<MMenu NudgeRight="40" CloseOnClick="false" CloseOnContentClick="false" @bind-Value="@bill.ShowMenu" Transition="scale-transition" Left Top OffsetY MinWidth="@("auto")">
130130
<ActivatorContent>
131-
<MIcon @attributes="context.Attrs" Small Class="mt-auto">fas fa-cog</MIcon>
131+
<MIcon @attributes="context.Attrs" Small Class="mt-auto">fa:fas fa-cog</MIcon>
132132
</ActivatorContent>
133133
<ChildContent>
134134
<MCard>

Masa.Blazor.Pro/Pages/App/Invoice/Add.razor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public partial class Add : ProComponentBase
44
{
5-
private bool _showAddPayment;
5+
private bool? _showAddPayment;
66
private string _invoiceTo = "";
77
private readonly List<string> _invoices = new()
88
{

Masa.Blazor.Pro/Pages/App/Invoice/Components/AddPayment.razor

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@
5555
private List<string> _paymentMethods = InvoiceService.GetpaymentMethodList();
5656

5757
[Parameter]
58-
public bool Show { get; set; } = false;
58+
public bool? Show { get; set; }
5959

6060
[Parameter]
61-
public EventCallback<bool> ShowChanged { get; set; }
61+
public EventCallback<bool?> ShowChanged { get; set; }
6262

6363
private DateOnly Date { get; set; } = DateOnly.FromDateTime(DateTime.Now);
6464
}

Masa.Blazor.Pro/Pages/App/Invoice/Components/InvoiceList.razor

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
</MTooltip>
123123
<MTooltip Top>
124124
<ActivatorContent Context="_">
125-
<MIcon class="mr-7 ml-7" Small @attributes="@_.Attrs">far fa-eye</MIcon>
125+
<MIcon class="mr-7 ml-7" Small @attributes="@_.Attrs">fa:far fa-eye</MIcon>
126126
@*@onclick="()=>NavigateToPreview(context.Item.Id)"*@
127127
</ActivatorContent>
128128
<ChildContent>

Masa.Blazor.Pro/Pages/App/Invoice/Components/SendInvoice.razor

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838

3939
@code {
4040
[Parameter]
41-
public bool Show { get; set; } = false;
41+
public bool? Show { get; set; }
4242

4343
[Parameter]
44-
public EventCallback<bool> ShowChanged { get; set; }
44+
public EventCallback<bool?> ShowChanged { get; set; }
4545
}

Masa.Blazor.Pro/Pages/App/Invoice/Preview.razor.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
public partial class Preview
44
{
5-
private bool _showSendInvoice;
6-
private bool _showAddPayment;
5+
private bool? _showSendInvoice;
6+
private bool? _showAddPayment;
77
private InvoiceRecordDto? _invoiceRecord;
88

99
[Parameter]

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
</MTextField>
2222
<MMenu OffsetX Left OffsetY>
2323
<ActivatorContent>
24-
<MButton Class="mr-5" Icon Large @attributes="context.Attrs"><MIcon>mdi-dots-horizontal</MIcon></MButton>
24+
<MButton Class="mr-5" Icon Large @attributes="context.Attrs">
25+
<MIcon>mdi-dots-horizontal</MIcon>
26+
</MButton>
2527
</ActivatorContent>
2628
<ChildContent>
2729
<MList Dense>
@@ -66,7 +68,7 @@
6668
<MListItemAction>
6769
@foreach (var tag in item.Tag)
6870
{
69-
<MChip Class="mx-1 text-btn" Small TextColor="@_tagColorMap[tag]" Color="@(_tagColorMap[tag]+"-lighten-5")">@tag</MChip>
71+
<MChip Class="mx-1 text-btn" Small TextColor="@_tagColorMap[tag]" Color="@(_tagColorMap[tag] + "-lighten-5")">@tag</MChip>
7072
}
7173
<span class="ml-4 mr-2 text-caption">@item.DueDate</span>
7274
</MListItemAction>
@@ -82,5 +84,5 @@
8284
</div>
8385
</MRow>
8486
</div>
85-
<TodoDetail Value="_visible" ValueChanged="val=>_visible = val" SelectItem=_selectItem></TodoDetail>
86-
</CascadingValue>
87+
<TodoDetail @bind-Value="_visible" SelectItem=_selectItem></TodoDetail>
88+
</CascadingValue>

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public partial class Todo
77

88
private TodoDto _selectItem = new();
99
private string? _filterText;
10-
private bool _visible = false;
10+
private bool? _visible = false;
1111
private string? _inputText;
1212
private List<TodoDto> _thisList = new();
1313
private readonly List<TodoDto> _dataList = TodoService.GetList();

Masa.Blazor.Pro/Pages/App/Todo/TodoDetail.razor.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ public partial class TodoDetail
1818
public Todo Todo { get; set; } = default!;
1919

2020
[Parameter]
21-
public bool Value { get; set; }
21+
public bool? Value { get; set; }
2222

2323
[Parameter]
2424
public TodoDto? SelectItem { get; set; }
2525

2626
[Parameter]
27-
public EventCallback<bool> ValueChanged { get; set; }
27+
public EventCallback<bool?> ValueChanged { get; set; }
2828

2929
[Inject]
3030
public NavigationManager NavigationManager { get; set; } = default!;
@@ -75,7 +75,7 @@ protected override void OnParametersSet()
7575
};
7676
_selectData.Tag.AddRange(SelectItem.Tag);
7777

78-
if (ValueChanged.HasDelegate && !Value && _mForm != null)
78+
if (ValueChanged.HasDelegate && Value is not true && _mForm != null)
7979
{
8080
_mForm.ResetValidation();
8181
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<MNavigationDrawer Permanent Class="rounded-4" Width="300" Style="overflow: visible;">
2-
<MButton Class="ma-6 rounded-pill" Style="width:-webkit-fill-available;" Dark Color="primary" OnClick="() => visible = true">Add Task</MButton>
2+
<MButton Class="ma-6 rounded-pill" Style="width:-webkit-fill-available;" Dark Color="primary" OnClick="() => _visible = true">Add Task</MButton>
33
<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>
@@ -8,19 +8,19 @@
88

99
<MRow NoGutters Justify="JustifyTypes.SpaceBetween">
1010
<MSubheader Class="px-6 my-6 text-subtitle neutral-lighten-4--text">Tags</MSubheader>
11-
<MIcon Class="px-6 my-6" Small Color="#A3AED0">fas fa-plus</MIcon>
11+
<MIcon Class="px-6 my-6" Small Color="#A3AED0">fa:fas fa-plus</MIcon>
1212
</MRow>
1313

14-
<TodoNavItem Href="/app/todo/team" Icon="fas fa-circle" IconColor="purple" Title="Team"></TodoNavItem>
15-
<TodoNavItem Href="/app/todo/low" Icon="fas fa-circle" IconColor="#05CD99" Title="Low"></TodoNavItem>
16-
<TodoNavItem Href="/app/todo/medium" Icon="fas fa-circle" IconColor="#FFB547" Title="Medium"></TodoNavItem>
17-
<TodoNavItem Href="/app/todo/high" Icon="fas fa-circle" IconColor="#FF5252" Title="High"></TodoNavItem>
18-
<TodoNavItem Href="/app/todo/update" Icon="fas fa-circle" IconColor="#4318FF" Title="Update"></TodoNavItem>
14+
<TodoNavItem Href="/app/todo/team" Icon="fa:fas fa-circle" IconColor="purple" Title="Team"></TodoNavItem>
15+
<TodoNavItem Href="/app/todo/low" Icon="fa:fas fa-circle" IconColor="#05CD99" Title="Low"></TodoNavItem>
16+
<TodoNavItem Href="/app/todo/medium" Icon="fa:fas fa-circle" IconColor="#FFB547" Title="Medium"></TodoNavItem>
17+
<TodoNavItem Href="/app/todo/high" Icon="fa:fas fa-circle" IconColor="#FF5252" Title="High"></TodoNavItem>
18+
<TodoNavItem Href="/app/todo/update" Icon="fa:fas fa-circle" IconColor="#4318FF" Title="Update"></TodoNavItem>
1919
</MList>
2020
</MNavigationDrawer>
2121

22-
<TodoDetail @bind-Value="visible" SelectItem=null></TodoDetail>
22+
<TodoDetail @bind-Value="_visible" SelectItem=null></TodoDetail>
2323

2424
@code {
25-
bool visible;
25+
bool? _visible;
2626
}

Masa.Blazor.Pro/Pages/App/User/Add.razor

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
private UserDto _userData = new UserDto("","",DateOnly.FromDateTime(DateTime.Now),"","",UserService.GetPermissionsList());
2929

3030
[Parameter]
31-
public bool Visible { get; set; }
31+
public bool? Visible { get; set; }
3232

3333
[Parameter]
34-
public EventCallback<bool> VisibleChanged { get; set; }
34+
public EventCallback<bool?> VisibleChanged { get; set; }
3535

3636
[Parameter]
3737
public EventCallback<UserDto> Submit { get; set; }

Masa.Blazor.Pro/Pages/App/User/Edit.razor

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117

118118
<MTabItem Value="@("Information")">
119119
<div class="mt-3">
120-
<MIcon Size=20 Color="sample-green" Class="mt-n1">far fa-user</MIcon>
120+
<MIcon Size=20 Color="sample-green" Class="mt-n1">fa:far fa-user</MIcon>
121121
<span class="ml-1 text-h6">Personal Information</span>
122122
</div>
123123

Masa.Blazor.Pro/Pages/App/User/List.razor

+4-4
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,21 @@
127127
<MMenu Right Bottom>
128128
<ActivatorContent Context="activatorContext">
129129
<MButton Icon @attributes="@activatorContext.Attrs">
130-
<MIcon XSmall>fas fa-ellipsis-v</MIcon>
130+
<MIcon XSmall>fa:fas fa-ellipsis-v</MIcon>
131131
</MButton>
132132
</ActivatorContent>
133133
<ChildContent>
134134
<MList>
135135
<MListItem OnClick="()=>NavigateToDetails(context.Item.Id)">
136-
<MIcon Small>fas fa-user-tie</MIcon>
136+
<MIcon Small>fa:fas fa-user-tie</MIcon>
137137
<MListItemTitle Class="ml-2"> Details </MListItemTitle>
138138
</MListItem>
139139
<MListItem OnClick="()=>NavigateToEdit(context.Item.Id)">
140-
<MIcon Small>far fa-edit</MIcon>
140+
<MIcon Small>fa:far fa-edit</MIcon>
141141
<MListItemTitle Class="ml-2"> Edit </MListItemTitle>
142142
</MListItem>
143143
<MListItem OnClick="()=>_userPage.UserDatas.RemoveAt(_userPage.UserDatas.FindIndex(u=>u.Id==context.Item.Id))">
144-
<MIcon Small>far fa-trash-alt</MIcon>
144+
<MIcon Small>fa:far fa-trash-alt</MIcon>
145145
<MListItemTitle Class="ml-2"> Delete </MListItemTitle>
146146
</MListItem>
147147
</MList>

Masa.Blazor.Pro/Pages/App/User/List.razor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public partial class List
44
{
5-
public bool _visible;
5+
public bool? _visible;
66
public UserPage _userPage = new(UserService.GetList());
77
private List<int> _pageSizes = new() { 10, 25, 50, 100 };
88
private readonly List<DataTableHeader<UserDto>> _headers = new()

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
<MCol Md=6 Sm=12 Class="py-12">
127127
<div class="d-flex block-center">
128128
<MAvatar Size=56 Color="fill-lighten-1">
129-
<MIcon Color="dark-yellow" Size=25>far fa-user</MIcon>
129+
<MIcon Color="dark-yellow" Size=25>fa:far fa-user</MIcon>
130130
</MAvatar>
131131
<div class="ml-3">
132132
<div class="text-btn neutral-lighten-4--text">User</div>
@@ -227,7 +227,7 @@
227227
<img class="rounded-2 max-width" height=186 src="/img/eCommerce/rectangle.png" />
228228
<div class="d-flex my-4">
229229
<MAvatar Size=48 Color="fill-lighten-1">
230-
<MIcon Color="primary" Size=20>far fa-calendar-check</MIcon>
230+
<MIcon Color="primary" Size=20>fa:far fa-calendar-check</MIcon>
231231
</MAvatar>
232232
<div class="ml-4">
233233
<div class="text-subtitle">Sat,May 25,2021</div>

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

+8-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ private string GetEchartKey()
2525

2626
protected override void OnInitialized()
2727
{
28-
MasaBlazor.Breakpoint.OnUpdate += OnPropertyChanged;
28+
MasaBlazor.Breakpoint.OnUpdate += BreakpointOnOnUpdate;
2929
MasaBlazor.Application.PropertyChanged += OnPropertyChanged;
3030

3131
_orderChart = new
@@ -379,13 +379,17 @@ protected override void OnInitialized()
379379
};
380380
}
381381

382-
private Task OnPropertyChanged()
382+
private void BreakpointOnOnUpdate(object? sender, BreakpointChangedEventArgs e)
383+
{
384+
OnPropertyChanged();
385+
}
386+
387+
private void OnPropertyChanged()
383388
{
384389
if (NavHelper.CurrentUri.EndsWith("dashboard/ecommerce"))
385390
{
386391
InvokeAsync(StateHasChanged);
387392
}
388-
return Task.CompletedTask;
389393
}
390394

391395
private void OnPropertyChanged(object? sender, PropertyChangedEventArgs e)
@@ -395,7 +399,7 @@ private void OnPropertyChanged(object? sender, PropertyChangedEventArgs e)
395399

396400
public void Dispose()
397401
{
398-
MasaBlazor.Breakpoint.OnUpdate -= OnPropertyChanged;
402+
MasaBlazor.Breakpoint.OnUpdate -= BreakpointOnOnUpdate;
399403
MasaBlazor.Application.PropertyChanged -= OnPropertyChanged;
400404
}
401405
}

Masa.Blazor.Pro/Pages/Others/AccountSettings/AccountSettings.razor

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@
66
<MList>
77
<MListItemGroup Mandatory @bind-Value="_current" ActiveClass="deep-purple white--text elevation-6">
88
<MListItem>
9-
<MListItemIcon><MIcon>far fa-user</MIcon></MListItemIcon>
9+
<MListItemIcon><MIcon>fa:far fa-user</MIcon></MListItemIcon>
1010
<MListItemContent>
1111
<MListItemTitle>General</MListItemTitle>
1212
</MListItemContent>
1313
</MListItem>
1414
<MListItem>
15-
<MListItemIcon><MIcon>fas fa-lock</MIcon></MListItemIcon>
15+
<MListItemIcon><MIcon>fa:fas fa-lock</MIcon></MListItemIcon>
1616
<MListItemContent>
1717
<MListItemTitle>Change Password</MListItemTitle>
1818
</MListItemContent>
1919
</MListItem>
2020
<MListItem>
21-
<MListItemIcon><MIcon>fas fa-info-circle</MIcon></MListItemIcon>
21+
<MListItemIcon><MIcon>fa:fas fa-info-circle</MIcon></MListItemIcon>
2222
<MListItemContent>
2323
<MListItemTitle>Information</MListItemTitle>
2424
</MListItemContent>
2525
</MListItem>
2626
<MListItem>
27-
<MListItemIcon><MIcon>fas fa-share-alt-square</MIcon></MListItemIcon>
27+
<MListItemIcon><MIcon>fa:fas fa-share-alt-square</MIcon></MListItemIcon>
2828
<MListItemContent>
2929
<MListItemTitle>Social</MListItemTitle>
3030
</MListItemContent>
3131
</MListItem>
3232
<MListItem>
33-
<MListItemIcon><MIcon>far fa-bell</MIcon></MListItemIcon>
33+
<MListItemIcon><MIcon>fa:far fa-bell</MIcon></MListItemIcon>
3434
<MListItemContent>
3535
<MListItemTitle>Notifications</MListItemTitle>
3636
</MListItemContent>
@@ -134,7 +134,7 @@
134134
</MCard>
135135
<MCard Style="@(_current == 3 ?"":"display:none")">
136136
<MCardTitle>
137-
<MIcon>fas fa-share-alt-square</MIcon>
137+
<MIcon>fa:fas fa-share-alt-square</MIcon>
138138
<span class="ml-3">Social Links</span>
139139
</MCardTitle>
140140
<MCardText>
@@ -161,7 +161,7 @@
161161
<MDivider></MDivider>
162162
</MCardText>
163163
<MCardTitle>
164-
<MIcon>far fa-user</MIcon>
164+
<MIcon>fa:far fa-user</MIcon>
165165
<span class="ml-3">Profile Connections</span>
166166
</MCardTitle>
167167
<MCardText>

Masa.Blazor.Pro/Pages/_Layout.cshtml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<link href="https://cdn.masastack.com/npm/materialicons/materialicons.css" rel="stylesheet">
1616
<link href="https://cdn.masastack.com/npm/fontawesome/v5.0.13/css/all.css" rel="stylesheet">
1717
<link href="css/masa-blazor-pro.css" rel="stylesheet" />
18+
<link href="Masa.Blazor.Pro.styles.css" rel="stylesheet" />
1819
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
1920
</head>
2021
<body>

Masa.Blazor.Pro/Shared/Login.razor

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<MList Dense>
1111
<MListItem Link Href="/pages/authentication/login-v1">
1212
<MListItemIcon Class="mr-4">
13-
<MIcon Size=20 Color="neutral-lighten-4">fas fa-user-circle</MIcon>
13+
<MIcon Size=20 Color="neutral-lighten-4">fa:fas fa-user-circle</MIcon>
1414
</MListItemIcon>
1515
<MListItemContent>
1616
<MListItemTitle>
@@ -20,7 +20,7 @@
2020
</MListItem>
2121
<MListItem Link Href="/pages/authentication/login-v2">
2222
<MListItemIcon Class="mr-4">
23-
<MIcon Size=20 Color="neutral-lighten-4">fas fa-sign-in-alt</MIcon>
23+
<MIcon Size=20 Color="neutral-lighten-4">fa:fas fa-sign-in-alt</MIcon>
2424
</MListItemIcon>
2525
<MListItemContent>
2626
<MListItemTitle>

Masa.Blazor.Pro/Shared/MainLayout.razor

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"/app/todo"
5555
};
5656

57-
private bool _showSetting;
57+
private bool? _showSetting;
5858

5959
private string? _pageTab;
6060

0 commit comments

Comments
 (0)