Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Commit

Permalink
Fix issues with Avatars after MudBlazor upgrade. (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminsampica authored Mar 17, 2023
1 parent d8638cb commit 8125570
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Client/DynamoLeagueBlazor.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="7.0.4" />
<PackageReference Include="MudBlazor" Version="6.1.9" />
<PackageReference Include="MudBlazor" Version="6.2.0" />
<PackageReference Include="Serilog.Sinks.BrowserConsole" Version="1.0.0" />
<PackageReference Include="Serilog.Sinks.BrowserHttp" Version="1.0.0-dev-00021" />
</ItemGroup>
Expand Down
11 changes: 9 additions & 2 deletions src/Client/Shared/Components/Avatar.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<MudAvatar Image=@Image Size=Size @attributes=AllOtherAttributes>
@Initials
<MudAvatar Size=Size @attributes=AllOtherAttributes>
@if(Image is not null)
{
<MudImage Src="@Image" ObjectFit="ObjectFit.Contain"/>
}
else
{
@Initials
}
</MudAvatar>


Expand Down
8 changes: 4 additions & 4 deletions src/Client/Shared/NavMenu/Admin.razor
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<AuthorizeView Policy=@PolicyRequirements.Admin>
<Authorized>
<MudDivider />
<MudNavLink Href="/admin/startseason">Start New Season</MudNavLink>
<MudNavLink Href="/admin/refreshplayerheadshots">Refresh Headshots</MudNavLink>
<MudNavLink Href="/admin/users">Manage Users</MudNavLink>
<MudDivider DividerType="DividerType.Middle" />
<MudNavLink Href="/admin/startseason"Icon="@Icons.Material.Outlined.Refresh">Start New Season</MudNavLink>
<MudNavLink Href="/admin/refreshplayerheadshots" Icon="@Icons.Material.Outlined.Photo">Refresh Headshots</MudNavLink>
<MudNavLink Href="/admin/users" Icon="@Icons.Material.Outlined.PersonAdd">Manage Users</MudNavLink>
</Authorized>
</AuthorizeView>
8 changes: 4 additions & 4 deletions src/Client/Shared/NavMenu/Login.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

<AuthorizeView>
<Authorized>
<MudNavLink Href="authentication/profile">Manage Account</MudNavLink>
<MudNavLink OnClick="BeginSignOut">Log Out</MudNavLink>
<MudNavLink Href="authentication/profile" Icon="@Icons.Material.Outlined.ManageAccounts">Manage Account</MudNavLink>
<MudNavLink OnClick="BeginSignOut" Icon="@Icons.Material.Outlined.Logout">Log Out</MudNavLink>
</Authorized>
<NotAuthorized>
<MudNavLink Href="authentication/register">Register</MudNavLink>
<MudNavLink Href="authentication/login">Log In</MudNavLink>
<MudNavLink Href="authentication/register" Icon="@Icons.Material.Outlined.AppRegistration">Register</MudNavLink>
<MudNavLink Href="authentication/login" Icon="@Icons.Material.Outlined.Login">Log In</MudNavLink>
</NotAuthorized>
</AuthorizeView>

Expand Down
2 changes: 1 addition & 1 deletion src/Client/Shared/NavMenu/NavMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<MudNavLink Href="/rules" Icon=@Icons.Material.Outlined.Rule>Rules</MudNavLink>
</MudNavMenu>
<Admin />
<MudDivider />
<MudDivider DividerType="DividerType.Middle"/>
<Login />
</MudDrawer>

Expand Down

0 comments on commit 8125570

Please sign in to comment.