Clean up layer name display - hide image URLs

- Image layers now show as '[Image]' unless they have a specific name
- Text layers show extracted text content or '[Text]' if empty
- Prevents full image URLs from cluttering the layer list

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
thePR0M3TH3ANandClaude Sonnet 4.6 committed 2026-05-15 15:48:39 -04:00
1 parent f7a74f5af9
commit ec0cefdff5
1 file changed
+5 -1
+5 -1
View File
@@ -5033,7 +5033,11 @@
const info = document.createElement('p');
info.className = 'hint';
info.style.marginTop = '8px';
info.textContent = `${layers.length} layer${layers.length>1?'s':''}: ` + layers.map(l => l.name || (l.html||'').replace(/<[^>]+>/g,'').trim() || `[${l.type}]`).join(', ');
info.textContent = `${layers.length} layer${layers.length>1?'s':''}: ` + layers.map(l => {
if (l.type === 'image') return l.name || '[Image]';
if (l.type === 'text') return l.name || (l.html||l.text||'').replace(/<[^>]+>/g,'').trim() || '[Text]';
return l.name || `[${l.type}]`;
}).join(', ');
container.appendChild(info);
}
}