mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 15:01:56 +00:00
Added user photo resizing
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
{
|
||||
<tr class="user-row">
|
||||
<td>
|
||||
<img class="rounded-circle user-icon" src="data:image/jpeg;base64,@userTableViewModel.JpegPhoto" alt="Photo" style="max-width:300px;" />
|
||||
<img class="rounded-circle user-icon" src="~/Home/UserPhoto?uid=@userTableViewModel.Uid&size=48" alt="Photo" style="width:32px;height:32px;" width="32" height="32" loading="lazy" />
|
||||
</td>
|
||||
<td>@userTableViewModel.Uid</td>
|
||||
<td>@userTableViewModel.Title</td>
|
||||
@@ -730,13 +730,7 @@
|
||||
// Photo
|
||||
const imgEl = row.querySelector('td:first-child img');
|
||||
const detailPhoto = document.getElementById('detailPhoto');
|
||||
if (imgEl && imgEl.src.startsWith('data:image')) {
|
||||
detailPhoto.src = imgEl.src;
|
||||
detailPhoto.style.display = 'block';
|
||||
} else {
|
||||
detailPhoto.style.display = 'none';
|
||||
}
|
||||
|
||||
detailPhoto.src = `/Home/UserPhoto?uid=${data.uid}&size=256`;
|
||||
detailModal.show();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user