Fixed images in Users view

This commit is contained in:
2025-10-09 11:50:43 +02:00
parent 41cc78d321
commit 49af3e79c3
4 changed files with 19 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
@using Microsoft.AspNetCore.Mvc.Localization
@using Berufsschule_HAM.Models
@using System.Buffers.Text
@model UsersIndexViewModel
@inject IViewLocalizer T
@{
@@ -20,7 +21,7 @@
<table class="table table-striped align-middle">
<thead>
<tr>
<th>User Photo</th>
<th style="width: 2rem;"></th>
<th>User ID</th>
<th>title</th>
<th>Name</th>
@@ -34,7 +35,9 @@
foreach (UserTableViewModel userTableViewModel in Model.UserTableViewModels)
{
<tr>
<td>@@userTableViewModel.JpegPhoto</td>
<td>
<img class="rounded-circle user-icon" src="data:image/jpeg;base64,@userTableViewModel.JpegPhoto" alt="Photo" style="max-width:300px;" />
</td>
<td>@userTableViewModel.Uid</td>
<td>@userTableViewModel.Title</td>
<td>@userTableViewModel.Name</td>