fix(helpdesk): add data-type=image hint for FsLightbox cache reuse
FsLightbox uses data-type to skip content detection. Combined with Cache-Control: max-age=3600 on the proxy, the browser should serve the lightbox image from cache instead of making a second SOAP call. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -128,7 +128,7 @@ export function renderCommunicationFeed(entries, options = {}) {
|
||||
html += `</span>`;
|
||||
html += `<span class="helpdesk-chat-file-preview">`;
|
||||
html += `<span class="helpdesk-chat-file-skeleton helpdesk-skeleton"></span>`;
|
||||
html += `<a data-fslightbox="ticket-files" href="${esc(imgUrl)}" aria-label="${esc(fileName)}"><img src="${esc(imgUrl)}" alt="${esc(fileName)}" loading="lazy" onload="this.closest('.helpdesk-chat-file-preview').querySelector('.helpdesk-chat-file-skeleton').hidden=true" onerror="this.closest('.helpdesk-chat-file-preview').hidden=true"></a>`;
|
||||
html += `<a data-fslightbox="ticket-files" href="${esc(imgUrl)}" data-type="image" aria-label="${esc(fileName)}"><img src="${esc(imgUrl)}" alt="${esc(fileName)}" loading="lazy" onload="this.closest('.helpdesk-chat-file-preview').querySelector('.helpdesk-chat-file-skeleton').hidden=true" onerror="this.closest('.helpdesk-chat-file-preview').hidden=true"></a>`;
|
||||
html += `</span>`;
|
||||
html += `<a href="${esc(fileUrl)}" target="_blank" rel="noopener noreferrer" class="helpdesk-chat-file-link"><i class="bi bi-download" aria-hidden="true"></i> ${esc(fileName)}</a>`;
|
||||
html += '</div>';
|
||||
|
||||
Reference in New Issue
Block a user