Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Store.UI/Pages/Customers.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@
<div class="crm-avatar-wrap">
@if (!string.IsNullOrEmpty(c.ThumbnailUrl))
{
<img src="@c.ThumbnailUrl" alt="@c.FullName" class="crm-avatar" />
<img src="@c.ThumbnailUrl" alt="@c.FullName" class="crm-avatar" loading="lazy" />
}
else
{
Expand Down Expand Up @@ -943,7 +943,7 @@
<td>
@if (!string.IsNullOrEmpty(c.ThumbnailUrl))
{
<img src="@c.ThumbnailUrl" alt="@c.FullName" style="width:32px;height:32px;border-radius:50%;object-fit:cover;" />
<img src="@c.ThumbnailUrl" alt="@c.FullName" style="width:32px;height:32px;border-radius:50%;object-fit:cover;" loading="lazy" width="32" height="32" />
}
else
{
Expand Down Expand Up @@ -1511,7 +1511,7 @@ async function openDrawer(customerId) {

const avatarWrap = document.getElementById('drawerAvatarWrap');
if (c.thumbnailUrl) {
avatarWrap.innerHTML = `<img src="${c.thumbnailUrl}" alt="${c.fullName}" class="crm-avatar" style="width:56px;height:56px;" />`;
avatarWrap.innerHTML = `<img src="${c.thumbnailUrl}" alt="${c.fullName}" class="crm-avatar" style="width:56px;height:56px;" loading="lazy" width="56" height="56" />`;
} else {
avatarWrap.innerHTML = `<div class="crm-avatar" style="width:56px;height:56px;font-size:1.2rem;">${initials}</div>`;
}
Expand Down
4 changes: 2 additions & 2 deletions Store.UI/Pages/Employees.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<td>
@if (!string.IsNullOrEmpty(e.ThumbnailUrl))
{
<img src="@e.ThumbnailUrl" alt="Photo" style="width:32px;height:32px;border-radius:50%;object-fit:cover;cursor:pointer;" onclick="viewImage('@(e.FullImageUrl ?? e.ThumbnailUrl)')" />
<img src="@e.ThumbnailUrl" alt="Photo" style="width:32px;height:32px;border-radius:50%;object-fit:cover;cursor:pointer;" loading="lazy" width="32" height="32" onclick="viewImage('@(e.FullImageUrl ?? e.ThumbnailUrl)')" />
}
else
{
Expand Down Expand Up @@ -360,7 +360,7 @@
const initials = (c.fullName || 'EM').split(' ').map(s => s[0]).slice(0, 2).join('');
const avatarWrap = document.getElementById('drawerAvatarWrap');
if (c.thumbnailUrl) {
avatarWrap.innerHTML = `<img src="${c.thumbnailUrl}" alt="${c.fullName}" class="crm-avatar" style="width:56px;height:56px;object-fit:cover;" />`;
avatarWrap.innerHTML = `<img src="${c.thumbnailUrl}" alt="${c.fullName}" class="crm-avatar" style="width:56px;height:56px;object-fit:cover;" loading="lazy" width="56" height="56" />`;
} else {
avatarWrap.innerHTML = `<div class="crm-avatar" style="width:56px;height:56px;font-size:1.2rem;">${initials}</div>`;
}
Expand Down
2 changes: 1 addition & 1 deletion Store.UI/Pages/Loyalty.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@
<div class="loyalty-card-top">
@if (!string.IsNullOrWhiteSpace(m.ThumbnailUrl))
{
<img src="@m.ThumbnailUrl" alt="@m.FullName" class="member-avatar" />
<img src="@m.ThumbnailUrl" alt="@m.FullName" class="member-avatar" loading="lazy" />
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Store.UI/Pages/Profile.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
<div class="profile-avatar-wrapper" onclick="document.getElementById('avatarInput').click()">
@if (!string.IsNullOrEmpty(Model.CurrentAvatarPath))
{
<img src="@Model.CurrentAvatarPath" alt="Avatar" />
<img src="@Model.CurrentAvatarPath" alt="Avatar" loading="lazy" />
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Store.UI/Pages/Shared/_AppLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@

<div class="user-profile-block">
<button type="button" class="user-profile-btn" id="userMenuBtn" aria-expanded="false" aria-haspopup="true">
<img src="@avatarUrl" class="user-avatar" alt="@displayName" onerror="this.src='/images/admin.png'" />
<img src="@avatarUrl" class="user-avatar" alt="@displayName" onerror="this.src='/images/admin.png'" loading="lazy" />
<div class="user-info">
<span class="user-name">@displayName</span>
<span class="user-role">@userRole</span>
Expand Down
6 changes: 3 additions & 3 deletions Store.UI/Pages/Suppliers.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@
<div class="supplier-avatar" style="width:36px; height:36px; font-size:0.85rem;">
@if (!string.IsNullOrEmpty(s.ThumbnailUrl))
{
<img src="@s.ThumbnailUrl" alt="@s.Name" />
<img src="@s.ThumbnailUrl" alt="@s.Name" loading="lazy" />
}
else
{
Expand Down Expand Up @@ -973,7 +973,7 @@
<div class="supplier-avatar">
@if (!string.IsNullOrEmpty(s.ThumbnailUrl))
{
<img src="@s.ThumbnailUrl" alt="@s.Name" />
<img src="@s.ThumbnailUrl" alt="@s.Name" loading="lazy" />
}
else
{
Expand Down Expand Up @@ -1597,7 +1597,7 @@

const avatarWrap = document.getElementById('drawerAvatarWrap');
if (p.thumbnailUrl) {
avatarWrap.innerHTML = `<img src="${p.thumbnailUrl}" alt="${p.name}" style="width:100%;height:100%;object-fit:cover;" />`;
avatarWrap.innerHTML = `<img src="${p.thumbnailUrl}" alt="${p.name}" style="width:100%;height:100%;object-fit:cover;" loading="lazy" />`;
} else {
avatarWrap.innerHTML = `<span>${initials}</span>`;
}
Expand Down
2 changes: 1 addition & 1 deletion Store.UI/Pages/Users.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<td>
@if (!string.IsNullOrEmpty(u.ThumbnailUrl))
{
<img src="@u.ThumbnailUrl" alt="Avatar" style="width:32px;height:32px;border-radius:50%;object-fit:cover;cursor:pointer;" onclick="viewImage('@(u.FullImageUrl ?? u.ThumbnailUrl)')" />
<img src="@u.ThumbnailUrl" alt="Avatar" style="width:32px;height:32px;border-radius:50%;object-fit:cover;cursor:pointer;" loading="lazy" width="32" height="32" onclick="viewImage('@(u.FullImageUrl ?? u.ThumbnailUrl)')" />
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Store.UI/wwwroot/js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@
}

const thumbnailHtml = res.thumbnailUrl
? `<img src="${res.thumbnailUrl}" class="scan-entity-img" alt="${res.title}" />`
? `<img src="${res.thumbnailUrl}" class="scan-entity-img" alt="${res.title}" loading="lazy" />`
: `<div class="scan-entity-icon-ph">🏷️</div>`;

content.innerHTML = `
Expand Down
Loading