mirror of
https://github.com/khairul169/vaulterm.git
synced 2026-09-15 17:03:30 +07:00
tidy up
This commit is contained in:
@@ -15,25 +15,25 @@ const HomePage = () => {
|
||||
type: "ssh",
|
||||
params: { hostId: "01jc3v9w609f8e2wzw60amv195" },
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
type: "pve",
|
||||
params: { client: "vnc", hostId: "01jc3wp2b3zvgr777f4e3caw4w" },
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
type: "pve",
|
||||
params: { client: "xtermjs", hostId: "01jc3z3yyn2fgb77tyfxc1tkfy" },
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
type: "incus",
|
||||
params: {
|
||||
client: "xtermjs",
|
||||
hostId: "01jc3xz9db0v54dg10hk70a13b",
|
||||
shell: "fish",
|
||||
},
|
||||
},
|
||||
// {
|
||||
// id: "2",
|
||||
// type: "pve",
|
||||
// params: { client: "vnc", hostId: "01jc3wp2b3zvgr777f4e3caw4w" },
|
||||
// },
|
||||
// {
|
||||
// id: "3",
|
||||
// type: "pve",
|
||||
// params: { client: "xtermjs", hostId: "01jc3z3yyn2fgb77tyfxc1tkfy" },
|
||||
// },
|
||||
// {
|
||||
// id: "4",
|
||||
// type: "incus",
|
||||
// params: {
|
||||
// client: "xtermjs",
|
||||
// hostId: "01jc3xz9db0v54dg10hk70a13b",
|
||||
// shell: "fish",
|
||||
// },
|
||||
// },
|
||||
]);
|
||||
const [curSession, setSession] = useState(0);
|
||||
|
||||
@@ -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