mirror of
https://github.com/khairul169/vaulterm.git
synced 2026-09-15 17:03:30 +07:00
tidy up
This commit is contained in:
@@ -5,16 +5,12 @@ import VNCViewer from "./vncviewer";
|
||||
|
||||
type SSHSessionProps = {
|
||||
type: "ssh";
|
||||
params: {
|
||||
hostId: string;
|
||||
};
|
||||
};
|
||||
|
||||
type PVESessionProps = {
|
||||
type: "pve";
|
||||
params: {
|
||||
client: "vnc" | "xtermjs";
|
||||
hostId: string;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -22,15 +18,15 @@ type IncusSessionProps = {
|
||||
type: "incus";
|
||||
params: {
|
||||
client: "vnc" | "xtermjs";
|
||||
hostId: string;
|
||||
shell?: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type InteractiveSessionProps =
|
||||
export type InteractiveSessionProps = { params: { hostId: string } } & (
|
||||
| SSHSessionProps
|
||||
| PVESessionProps
|
||||
| IncusSessionProps;
|
||||
| IncusSessionProps
|
||||
);
|
||||
|
||||
const InteractiveSession = ({ type, params }: InteractiveSessionProps) => {
|
||||
const query = new URLSearchParams(params);
|
||||
|
||||
Reference in New Issue
Block a user