mirror of
https://github.com/PR0M3TH3AN/Artstr-Studio.git
synced 2026-10-27 16:50:40 +00:00
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:
1 parent
f7a74f5af9
commit
ec0cefdff5
1 file changed
+5
-1
+5
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user