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:
@@ -1,4 +1,4 @@
|
||||
import { api } from '../../lib/api.mjs';
|
||||
import { api } from '../../lib/api.mjs';
|
||||
|
||||
const ACTION_ICONS = {
|
||||
status_change: 'refresh-cw',
|
||||
@@ -122,7 +122,7 @@ class WoTimeline extends HTMLElement {
|
||||
${this.#detailHTML(e)}
|
||||
<div class="entry-meta">
|
||||
<span class="entry-user">${this.#esc(e.performed_by)}</span>
|
||||
<span>·</span>
|
||||
<span>·</span>
|
||||
<span title="${new Date(e.performed_at).toLocaleString()}">${this.#relativeTime(e.performed_at)}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -134,7 +134,7 @@ class WoTimeline extends HTMLElement {
|
||||
<i data-lucide="rotate-cw" style="width:13px;height:13px"></i> Refresh
|
||||
</button>`;
|
||||
|
||||
if (window.lucide) lucide.createIcons({ nodes: [s] });
|
||||
if (window.lucide) lucide.createIcons({ root: s });
|
||||
s.querySelector('#refresh-btn').addEventListener('click', () => this.#load());
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ class WoTimeline extends HTMLElement {
|
||||
return `<div class="entry-detail">
|
||||
<span class="status-change">
|
||||
<span class="status-badge">${this.#esc(e.old_value.replace('_',' '))}</span>
|
||||
<span class="status-arrow">→</span>
|
||||
<span class="status-arrow">→</span>
|
||||
<span class="status-badge" style="background:var(--surface-2)">${this.#esc(e.new_value.replace('_',' '))}</span>
|
||||
</span>
|
||||
</div>`;
|
||||
|
||||
Reference in New Issue
Block a user