@trustquery/browser 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/AttachmentManager.js
CHANGED
|
@@ -325,13 +325,20 @@ export default class AttachmentManager {
|
|
|
325
325
|
const existingIcon = iconPlaceholder?.querySelector('.tq-attachment-icon');
|
|
326
326
|
|
|
327
327
|
if (newMatches.length === 0 && existingIcon) {
|
|
328
|
-
// No more matches - remove the icon
|
|
328
|
+
// No more matches - remove the icon and collapse placeholder
|
|
329
329
|
existingIcon.remove();
|
|
330
|
+
|
|
331
|
+
// Collapse the icon placeholder by setting width to 0
|
|
332
|
+
if (iconPlaceholder) {
|
|
333
|
+
iconPlaceholder.style.width = '0';
|
|
334
|
+
iconPlaceholder.style.minWidth = '0';
|
|
335
|
+
}
|
|
336
|
+
|
|
330
337
|
if (this.options.debug) {
|
|
331
338
|
console.log('[AttachmentManager] Removed warning icon - all warnings resolved');
|
|
332
339
|
}
|
|
333
340
|
} else if (newMatches.length > 0 && !existingIcon) {
|
|
334
|
-
// New matches appeared - add icon
|
|
341
|
+
// New matches appeared - add icon and expand placeholder
|
|
335
342
|
const match = newMatches[0];
|
|
336
343
|
const messageState = match.intent?.handler?.['message-state'] || 'warning';
|
|
337
344
|
const iconMap = {
|
|
@@ -340,6 +347,12 @@ export default class AttachmentManager {
|
|
|
340
347
|
'info': 'trustquery-info.svg'
|
|
341
348
|
};
|
|
342
349
|
|
|
350
|
+
// Expand the icon placeholder back to normal width
|
|
351
|
+
if (iconPlaceholder) {
|
|
352
|
+
iconPlaceholder.style.width = '24px';
|
|
353
|
+
iconPlaceholder.style.minWidth = '24px';
|
|
354
|
+
}
|
|
355
|
+
|
|
343
356
|
const icon = document.createElement('img');
|
|
344
357
|
icon.className = 'tq-attachment-icon';
|
|
345
358
|
icon.src = `./assets/${iconMap[messageState] || iconMap.warning}`;
|