diff --git a/assets/js/main.js b/assets/js/main.js
index 46068d6..76da6e7 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -1129,7 +1129,7 @@ document.addEventListener('DOMContentLoaded', () => {
${roles.map(r => `
- ${r.icon_url ? `
` : ''}
+ ${renderRoleIconJS(r.icon_url, '14px', 'me-1')}
${escapeHTML(r.name)}
`).join('')}
@@ -1869,19 +1869,19 @@ document.addEventListener('DOMContentLoaded', () => {
} catch (e) { console.error(e); }
}
- function renderRoleIconJS(icon, size = '14px') {
+ function renderRoleIconJS(icon, size = '14px', extraClass = 'ms-1') {
if (!icon) return '';
const isUrl = icon.startsWith('http') || icon.startsWith('/');
if (isUrl) {
- return `
})
`;
+ return ``;
} else if (icon.startsWith(':') && icon.endsWith(':')) {
const ce = (window.CUSTOM_EMOTES_CACHE || []).find(e => e.code === icon);
if (ce) {
- return `

`;
+ return ``;
}
- return `
${escapeHTML(icon)}`;
+ return ``;
} else {
- return `
${escapeHTML(icon)}`;
+ return ``;
}
}
@@ -2169,7 +2169,8 @@ document.addEventListener('DOMContentLoaded', () => {
item.className = 'list-group-item bg-dark text-white border-secondary p-2 d-flex align-items-center';
item.innerHTML = `
-