Skip to content

Commit

Permalink
Fix no pfp case
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBang1112 committed Aug 25, 2024
1 parent 692aa24 commit 7bce36b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,34 @@
<h3>Developers & Modelers</h3>
@foreach (var discordUser in discordUsers.Where(x => x.User.IsStaff))
{
<div title="@discordUser.Username"><img src="https://cdn.discordapp.com/avatars/@discordUser.Id/@discordUser.AvatarHash" width="32" height="32" /> @(discordUser.GlobalName ?? discordUser.Username)</div>
<div title="@discordUser.Username">
@if (discordUser.AvatarHash is null)
{
<img src="img/discord-no-pfp.webp" width="32" height="32" />
}
else
{
<img src="https://cdn.discordapp.com/avatars/@discordUser.Id/@discordUser.AvatarHash" width="32" height="32" />
}
<span>@(discordUser.GlobalName ?? discordUser.Username)</span>
</div>
}
<h3>Supporters</h3>
@if (discordUsers.Any(x => !x.User.IsStaff))
{
@foreach (var discordUser in discordUsers.Where(x => !x.User.IsStaff))
{
<div title="@discordUser.Username"><img src="https://cdn.discordapp.com/avatars/@discordUser.Id/@discordUser.AvatarHash" width="32" height="32" /> @(discordUser.GlobalName ?? discordUser.Username)</div>
<div title="@discordUser.Username">
@if (discordUser.AvatarHash is null)
{
<img src="img/discord-no-pfp.webp" width="32" height="32" />
}
else
{
<img src="https://cdn.discordapp.com/avatars/@discordUser.Id/@discordUser.AvatarHash" width="32" height="32" />
}
<span>@(discordUser.GlobalName ?? discordUser.Username)</span>
</div>
}
}
else
Expand Down
3 changes: 2 additions & 1 deletion Src/NationsConverterWeb/NationsConverterWeb/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(Path.Combine(builder.Environment.ContentRootPath, "Items")),
RequestPath = "/items"
RequestPath = "/items",
ServeUnknownFileTypes = true
});

app.UseDirectoryBrowser(new DirectoryBrowserOptions
Expand Down
Binary file not shown.

0 comments on commit 7bce36b

Please sign in to comment.