UserComponent 10 Benutzer anzeigen design fehlt noch

This commit is contained in:
2026-01-14 13:12:18 +01:00
parent a9baccb998
commit fa3b3eb00e

View File

@@ -1,6 +1,23 @@
<h3>@user.DisplayName</h3> @inject FileService fileService
<div>
<img src=@profilePictureUrl />
<h4>@user.DisplayName</h4>
<p>@user.Settings["Jahrgang"] - @user.Settings["Fachrichtung"]</p>
</div>
@code { @code {
[Parameter] [Parameter]
public User user { get; set; } public User user { get; set; }
private string profilePictureUrl = "";
protected override async Task OnInitializedAsync()
{
if(user.PhotoFileId != null)
{
File f = await fileService.GetFileAsync(user.PhotoFileId);
profilePictureUrl = f.Url;
}
}
} }