feat: add member terminal trigger and align terminal panel bottom-center

This commit is contained in:
2025-09-30 21:32:30 +02:00
parent 75dc122898
commit a26ef3949a
3 changed files with 104 additions and 38 deletions

View File

@@ -21,11 +21,13 @@
this._buildPanel();
}
// Adjust position to be left of the details drawer
this._adjustRightOffset();
if (!this.resizeHandler) {
this.resizeHandler = () => this._adjustRightOffset();
window.addEventListener('resize', this.resizeHandler);
// Reset any leftover inline positioning so CSS centering applies
if (this.container) {
this.container.style.right = '';
this.container.style.left = '';
this.container.style.top = '';
this.container.style.bottom = '';
this.container.style.width = '';
}
// Show panel with animation
@@ -193,17 +195,6 @@
return text;
}
}
_adjustRightOffset() {
try {
const drawer = document.querySelector('.details-drawer');
const isOpen = drawer && drawer.classList.contains('open');
const width = isOpen ? drawer.getBoundingClientRect().width : 0;
if (this.container) {
this.container.style.right = `${width}px`;
}
} catch (_) { /* no-op */ }
}
}
// Expose singleton API