Commit 56fcc208 authored by liuzheng712's avatar liuzheng712 Committed by i317280

feat: update

parent 6b6ce213
......@@ -38,7 +38,8 @@ export class CleftbarComponent implements OnInit {
name: "ops-win",
uuid: "win-aasdf",
type: "rdp",
token: "rdpxxx"
token: "rdpxxx",
machine: "sss"
}
],
}];
......
......@@ -14,10 +14,13 @@ export class Term {
socket: any;
term: any;
}
export class Rdp {
machine: string;
token: string;
client: any;
}
export class View {
nick: string;
type: string;
......@@ -29,6 +32,7 @@ export class View {
Term: Term;
}
export let NavList: {
List: Array<View>;
Active: number;
......
......@@ -26,14 +26,23 @@ export class RdpComponent implements OnInit {
Connect(host) {
let id = NavList.List.length - 1;
let canvas = Mstsc.$("canvas-" + id);
canvas.style.display = 'inline';
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
NavList.List[id].nick = host.name;
NavList.List[id].connected = true;
NavList.List[id].edit = false;
NavList.List[id].closed = false;
NavList.List[id].type = "rdp";
NavList.List[id].Rdp = new Rdp;
NavList.List[id].Rdp.token = "xxx";
NavList.List[id].Rdp.machine = "xxx";
NavList.List[id].Rdp.token = host.token;
NavList.List[id].Rdp.machine = host.machine;
NavList.List[id].Rdp.client = Mstsc.client.create(Mstsc.$("canvas-" + id));
NavList.List[id].Rdp.client.connect(host.token, "rdp/socket.io");
NavList.List.push(new View());
for (let m in NavList.List) {
......@@ -42,12 +51,7 @@ export class RdpComponent implements OnInit {
NavList.List[id].hide = false;
NavList.Active = id;
let client = Mstsc.client.create(Mstsc.$("canvas-" + id));
let canvas = Mstsc.$("canvas-" + id);
canvas.style.display = 'inline';
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
client.connect("xxxx", "rdp/socket.io");
}
static Disconnect(host) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment