mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Added small pre-cached image pre-loading, fixed layout shift for user preview
This commit is contained in:
@@ -659,7 +659,7 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="col-md-4 text-center">
|
<div class="col-md-4 text-center">
|
||||||
<img id="detailPhoto" alt="Photo" class="img-thumbnail rounded-circle" style="max-height:150px;" />
|
<img id="detailPhoto" alt="Photo" class="img-thumbnail rounded-circle" style="height:150px;" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label" for="detailUid">@T["Username"]</label>
|
<label class="form-label" for="detailUid">@T["Username"]</label>
|
||||||
@@ -759,7 +759,10 @@
|
|||||||
const imgEl = row.querySelector('td:first-child img');
|
const imgEl = row.querySelector('td:first-child img');
|
||||||
const detailPhoto = document.getElementById('detailPhoto');
|
const detailPhoto = document.getElementById('detailPhoto');
|
||||||
detailPhoto.src = '';
|
detailPhoto.src = '';
|
||||||
|
detailPhoto.src = `/Home/UserPhoto?uid=${data.uid}&size=48`;
|
||||||
|
detailPhoto.onload = () => {
|
||||||
detailPhoto.src = `/Home/UserPhoto?uid=${data.uid}&size=256`;
|
detailPhoto.src = `/Home/UserPhoto?uid=${data.uid}&size=256`;
|
||||||
|
};
|
||||||
detailModal.show();
|
detailModal.show();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user