Refactor Lucide icon rendering by replacing nodes with root across components and fix unintended character encoding issues in placeholders and text.
This commit is contained in:
@@ -202,7 +202,7 @@ class WoPhotoPanel extends HTMLElement {
|
||||
</div>
|
||||
</dialog>`;
|
||||
|
||||
if (window.lucide) lucide.createIcons({ nodes: [s] });
|
||||
if (window.lucide) lucide.createIcons({ root: s });
|
||||
this.#bindEvents(filtered);
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ class WoPhotoPanel extends HTMLElement {
|
||||
preview.innerHTML = Array.from(files).map(f =>
|
||||
`<div class="preview-item"><i data-lucide="image" style="width:13px;height:13px"></i> ${this.#esc(f.name)}</div>`
|
||||
).join('');
|
||||
if (window.lucide) lucide.createIcons({ nodes: [preview] });
|
||||
if (window.lucide) lucide.createIcons({ root: preview });
|
||||
btn.disabled = files.length === 0;
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ class WoPhotoPanel extends HTMLElement {
|
||||
<button class="lightbox-next"><i data-lucide="chevron-right" style="width:20px;height:20px"></i></button>` : ''}
|
||||
${p.caption ? `<div class="lightbox-caption">${this.#esc(p.caption)}</div>` : ''}`;
|
||||
s.appendChild(lb);
|
||||
if (window.lucide) lucide.createIcons({ nodes: [lb] });
|
||||
if (window.lucide) lucide.createIcons({ root: lb });
|
||||
lb.querySelector('.lightbox-close').addEventListener('click', () => lb.remove());
|
||||
lb.addEventListener('click', e => { if (e.target === lb) lb.remove(); });
|
||||
lb.querySelector('.lightbox-prev')?.addEventListener('click', e => { e.stopPropagation(); show(i - 1); });
|
||||
|
||||
Reference in New Issue
Block a user