Skip to content

Commit 6ef077e

Browse files
committed
Upgrade mudblazor to v7
1 parent c5b44e2 commit 6ef077e

3 files changed

Lines changed: 55 additions & 46 deletions

File tree

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,40 @@
1-
@using PocketDDD.BlazorClient.Features.HeaderBar.Store;
2-
3-
@inherits Fluxor.Blazor.Web.Components.FluxorComponent
1+
@using PocketDDD.BlazorClient.Features.HeaderBar.Store
2+
@inherits FluxorComponent
43

54
@inject IDispatcher Dispatcher
65
@inject IState<HeaderBarState> State
76

8-
<MudAppBar Dense="true" DisableGutters="true" Class="pl-1">
7+
<MudAppBar Dense="true" Gutters="false" Class="pl-1">
98
@if (State.Value.ShowBackButton)
109
{
11-
<MudIconButton
10+
<MudIconButton
1211
Icon="@Icons.Material.Filled.ArrowBack"
1312
OnClick="HandleNavigateBack"
1413
Class="pl-0"/>
1514
}
1615

1716
<MudText Typo="Typo.h6" Class="pl-0">@State.Value.Title</MudText>
18-
<MudSpacer />
19-
17+
<MudSpacer/>
18+
2019
@if (State.Value.ShowFeedbackButton)
2120
{
2221
<MudIconButton
2322
Icon="@Icons.Material.Filled.TagFaces"
24-
OnClick="HandleShowEventFeedback" />
23+
OnClick="HandleShowEventFeedback"/>
2524
}
2625

2726
</MudAppBar>
2827

2928
@code {
30-
void HandleShowEventFeedback() => Dispatcher.Dispatch(new ViewFeedbackAction());
31-
void HandleNavigateBack() => Dispatcher.Dispatch(new NavigateBackAction());
29+
30+
void HandleShowEventFeedback()
31+
{
32+
Dispatcher.Dispatch(new ViewFeedbackAction());
33+
}
34+
35+
void HandleNavigateBack()
36+
{
37+
Dispatcher.Dispatch(new NavigateBackAction());
38+
}
39+
3240
}

PocketDDD.BlazorClient/PocketDDD.BlazorClient/Features/Home/Components/EventData.razor

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,55 @@
1-
@using PocketDDD.BlazorClient.Features.Home.Store;
2-
@using System.Text.Json;
3-
@using PocketDDD.BlazorClient.Features.Session.Store;
1+
@using PocketDDD.BlazorClient.Features.Home.Store
42
@inherits FluxorComponent
53

64
@inject NavigationManager NavigationManager
75
@inject IState<HomeState> State
86
@inject IDispatcher Dispatcher
97

10-
<MudList Clickable="true">
11-
@foreach(var timeSlot in State.Value.EventMetaData)
8+
<MudList T="(Session session, int index)" ReadOnly="false">
9+
@foreach (var timeSlot in State.Value.EventMetaData)
1210
{
1311
<MudListSubheader Class="pb-0 pl-1 border-b border-solid mud-border-primary">
1412
<MudText Typo="Typo.h6">
1513
@timeSlot.From.ToString("h:mm")
1614
@timeSlot.From.ToString("tt").ToLowerInvariant()
1715
</MudText>
1816
</MudListSubheader>
19-
@if(timeSlot.Info is not null)
17+
@if (timeSlot.Info is not null)
2018
{
21-
<MudListItem Class="ml-6">
19+
<MudListItem T="(Session session, int index)" Class="ml-6">
2220
<MudText Typo="Typo.h5">@timeSlot.Info</MudText>
2321
</MudListItem>
2422
}
25-
@foreach(var sessionItem in timeSlot.Sessions.Select((session, index) => (session, index)))
23+
24+
@foreach (var sessionItem in timeSlot.Sessions.Select((session, index) => (session, index)))
2625
{
27-
<MudListItem OnClick="() => HandleViewSession(sessionItem.session.Id)">
26+
<MudListItem T="(Session session, int index)" OnClick="() => HandleViewSession(sessionItem.session.Id)">
2827
<MudPaper Class="pa-4">
2928
<MudText Typo="Typo.subtitle1">
30-
@WhenBookmarkedShowIcon(sessionItem.session)
29+
@WhenBookmarkedShowIcon(sessionItem.session)
3130
@sessionItem.session.Title
3231
</MudText>
3332
<MudText Typo="Typo.subtitle2">@sessionItem.session.SpeakerName</MudText>
3433
<MudText Typo="Typo.subtitle2">@sessionItem.session.RoomName</MudText>
3534
</MudPaper>
3635
</MudListItem>
3736

38-
@if (sessionItem.index != timeSlot.Sessions.Count -1)
37+
@if (sessionItem.index != timeSlot.Sessions.Count - 1)
3938
{
40-
<MudDivider />
39+
<MudDivider/>
4140
}
4241
}
4342
}
4443

4544
</MudList>
4645

4746
@code{
48-
RenderFragment? WhenBookmarkedShowIcon(Features.Home.Store.Session session) =>
47+
48+
RenderFragment? WhenBookmarkedShowIcon(Session session) =>
4949
session.IsBookmarked
50-
? @<MudIcon Icon="@Icons.Material.Filled.Bookmark" Title="Bookmarked" />
50+
? @<MudIcon Icon="@Icons.Material.Filled.Bookmark" Title="Bookmarked"/>
5151
: null;
52+
5253
}
5354

5455
@code {
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
22

3-
<PropertyGroup>
4-
<Nullable>enable</Nullable>
5-
<ImplicitUsings>enable</ImplicitUsings>
6-
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
7-
<LangVersion>default</LangVersion>
8-
<TargetFramework>net8.0</TargetFramework>
9-
</PropertyGroup>
3+
<PropertyGroup>
4+
<Nullable>enable</Nullable>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
7+
<LangVersion>default</LangVersion>
8+
<TargetFramework>net8.0</TargetFramework>
9+
</PropertyGroup>
1010

11-
<ItemGroup>
12-
<PackageReference Include="MudBlazor" Version="6.2.2" />
13-
<PackageReference Include="Fluxor.Blazor.Web" Version="6.6.0" />
14-
<PackageReference Include="Fluxor.Blazor.Web.ReduxDevTools" Version="6.6.0" />
15-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.14" />
16-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.14" PrivateAssets="all" />
17-
</ItemGroup>
11+
<ItemGroup>
12+
<PackageReference Include="Fluxor.Blazor.Web" Version="6.6.0"/>
13+
<PackageReference Include="Fluxor.Blazor.Web.ReduxDevTools" Version="6.6.0"/>
14+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.14"/>
15+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.14" PrivateAssets="all"/>
16+
<PackageReference Include="MudBlazor" Version="7.16.0"/>
17+
</ItemGroup>
1818

19-
<ItemGroup>
20-
<ProjectReference Include="..\..\PocketDDD.Shared\PocketDDD.Shared.csproj" />
21-
<ProjectReference Include="..\PocketDDD.BlazorClient.LocalStorage\PocketDDD.BlazorClient.LocalStorage.csproj" />
22-
</ItemGroup>
23-
24-
<ItemGroup>
25-
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" />
26-
</ItemGroup>
19+
<ItemGroup>
20+
<ProjectReference Include="..\..\PocketDDD.Shared\PocketDDD.Shared.csproj"/>
21+
<ProjectReference Include="..\PocketDDD.BlazorClient.LocalStorage\PocketDDD.BlazorClient.LocalStorage.csproj"/>
22+
</ItemGroup>
23+
24+
<ItemGroup>
25+
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js"/>
26+
</ItemGroup>
2727

2828
</Project>

0 commit comments

Comments
 (0)