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:
2026-05-17 17:30:04 -04:00
parent 17e05cb61d
commit 309f19520b
27 changed files with 694 additions and 1622 deletions
@@ -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); });