Add edit button to sidebar items and fix initial terminal fit
- Add pencil edit button on each sidebar profile item (visible on hover) - Fire fitAddon.fit() multiple times after terminal creation (50/150/400ms) to catch the panel finishing its CSS layout - Re-fit terminal when session:state transitions to 'connected'
This commit is contained in:
@@ -134,6 +134,10 @@ class App {
|
||||
window.runtime.EventsOn('session:state', (payload) => {
|
||||
this.tabs.updateSessionState(payload.sessionID, payload.state, payload.error);
|
||||
this.updateStatusBar();
|
||||
// Re-fit the terminal once connected so it picks up the final container size
|
||||
if (payload.state === 'connected') {
|
||||
setTimeout(() => this.terminals.fitActive(), 50);
|
||||
}
|
||||
});
|
||||
|
||||
// Session closed by backend
|
||||
|
||||
Reference in New Issue
Block a user