feat: add VNC support with noVNC integration
- Introduced a new VNC viewer panel in the frontend, allowing users to connect to VNC sessions. - Implemented VNC connection handling with optional SSH tunneling in the backend. - Added a new SSH key manager for managing SSH keys within the terminal. - Created a trigger rules engine to monitor terminal output and trigger actions based on defined patterns. - Added CSS styles for the VNC viewer and its components. - Updated database schema to support VNC protocol in profiles. - Implemented WebSocket proxy for VNC connections to facilitate communication between the frontend and backend.
This commit is contained in:
+23
-1
@@ -100,9 +100,12 @@
|
||||
setActive(sessionId) {
|
||||
this.app.state.setActiveSession(sessionId);
|
||||
|
||||
// Highlight active tab
|
||||
// Highlight active tab and clear activity indicator
|
||||
this.tabList.querySelectorAll(".tab").forEach((t) => {
|
||||
t.classList.toggle("tab-active", t.dataset.sessionId === sessionId);
|
||||
if (t.dataset.sessionId === sessionId) {
|
||||
t.classList.remove("tab-has-activity");
|
||||
}
|
||||
});
|
||||
|
||||
// Show corresponding panel, hide others
|
||||
@@ -425,6 +428,21 @@
|
||||
return [...this.order];
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks a background tab as having new activity.
|
||||
* Does nothing if the session is currently active.
|
||||
* @param {string} sessionId
|
||||
*/
|
||||
markActivity(sessionId) {
|
||||
if (sessionId === this.app.state.activeSessionId) return;
|
||||
const tabEl = this.tabList.querySelector(
|
||||
`[data-session-id="${sessionId}"]`,
|
||||
);
|
||||
if (tabEl && !tabEl.classList.contains("tab-has-activity")) {
|
||||
tabEl.classList.add("tab-has-activity");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the session ID of the next tab (wrapping round).
|
||||
* @returns {string|null}
|
||||
@@ -488,6 +506,10 @@
|
||||
);
|
||||
tab.appendChild(status);
|
||||
|
||||
// Activity indicator (hidden by default, shown when background tab has output)
|
||||
const activity = createElement("span", "tab-activity");
|
||||
tab.appendChild(activity);
|
||||
|
||||
// Pin indicator
|
||||
if (sessionInfo.pinned) {
|
||||
tab.classList.add("tab-pinned");
|
||||
|
||||
Reference in New Issue
Block a user