From 7a296e4273294b4f31d2cad7ce97e27573bf25e8 Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Tue, 23 Jun 2026 10:28:06 +0200 Subject: [PATCH] feat: use MDI silhouettes for avatars and add flag to compact meta row --- static/index.html | 2 +- static/js/voice-inspector.js | 7 +++++-- static/js/voice-library.js | 16 ++++++++++------ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/static/index.html b/static/index.html index 3628791..fa74549 100644 --- a/static/index.html +++ b/static/index.html @@ -26,7 +26,7 @@ - + diff --git a/static/js/voice-inspector.js b/static/js/voice-inspector.js index 18036d4..36b59a4 100644 --- a/static/js/voice-inspector.js +++ b/static/js/voice-inspector.js @@ -58,11 +58,14 @@ function selectVoice(wrap) { const inspFlagIcon = inspFlagCc ? `` : null; + const defaultSilClass = curGender === 'M' ? 'mdi-face-man' : (curGender === 'F' ? 'mdi-face-woman' : 'mdi-account'); + const silHtml = ``; + const inspIconHtml = window.voiceAvatarIcon ? window.voiceAvatarIcon(v.avatar, 48) : null; const avatarHtml = picSrcInsp ? `` - : inspIconHtml || inspFlagIcon || initial; - const avatarBgStyle = (picSrcInsp || inspIconHtml || inspFlagIcon) ? '' : `style="background:${color}"`; + : inspIconHtml || silHtml; + const avatarBgStyle = (picSrcInsp || inspIconHtml) ? '' : `style="background:${color}"`; const flagIconHtml = inspFlagIcon || ''; diff --git a/static/js/voice-library.js b/static/js/voice-library.js index 4fb70ac..d5b2436 100644 --- a/static/js/voice-library.js +++ b/static/js/voice-library.js @@ -1884,15 +1884,17 @@ function makeVoiceRow(v) { ? `` : null; - // Avatar: photo > gender/type icon > flag icon > initial letter (with color) + // Avatar: photo > gender/type icon > silhouette (with color) + const defaultSilClass = gender === 'M' ? 'mdi-face-man' : (gender === 'F' ? 'mdi-face-woman' : 'mdi-account'); + const silHtml = ``; + const iconHtml = window.voiceAvatarIcon ? window.voiceAvatarIcon(v.avatar, 34) : null; const avatarClass = picSrc ? 'vl-avatar vl-avatar-photo' - : iconHtml ? 'vl-avatar vl-avatar-icon' - : flagIconHtml ? 'vl-avatar vl-avatar-flag' : 'vl-avatar vl-avatar-initial'; - const avatarStyle = (picSrc || iconHtml || flagIconHtml) ? '' : `style="background:${color}"`; + : iconHtml ? 'vl-avatar vl-avatar-icon' : 'vl-avatar vl-avatar-sil'; + const avatarStyle = (picSrc || iconHtml) ? '' : `style="background:${color}"`; const avatarContent = picSrc ? `` - : iconHtml || flagIconHtml || `${initial}`; + : iconHtml || silHtml; wrap.innerHTML = `
@@ -1902,9 +1904,11 @@ function makeVoiceRow(v) { ? `` : `${escHtml(dispName)}`}
- ${isClone ? 'Clone' : 'Design'} + ${flagEmoji} ${escHtml(langCode)} ${gender ? `${genderMap[gender]||'?'} ${genderLabel[gender]||''}` : ''} ${benchText !== '-' ? ` ${escHtml(benchText)}` : ''} +
${starsHtml}
+ ${isClone ? 'Clone' : 'Design'}