feat: minimize terminal
This commit is contained in:
@@ -518,14 +518,18 @@ class ClusterMembersComponent extends Component {
|
||||
}
|
||||
|
||||
if (terminalBtn) {
|
||||
this.addEventListener(terminalBtn, 'click', (e) => {
|
||||
this.addEventListener(terminalBtn, 'click', async (e) => {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
try {
|
||||
if (window.TerminalPanel) {
|
||||
this.ensureTerminalContainer();
|
||||
window.TerminalPanel.open(this.terminalPanelContainer, memberIp);
|
||||
}
|
||||
if (!window.TerminalPanel) return;
|
||||
this.ensureTerminalContainer();
|
||||
const panel = window.TerminalPanel;
|
||||
const wasMinimized = panel.isMinimized;
|
||||
panel.open(this.terminalPanelContainer, memberIp);
|
||||
if (wasMinimized && panel.restore) {
|
||||
panel.restore();
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('Failed to open member terminal:', err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user