Commit 04939b69 authored by liuzheng712's avatar liuzheng712

feat: add rdp single page

parent bbcd3353
<canvas id="canvas"></canvas>
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RdppageComponent } from './rdppage.component';
describe('RdppageComponent', () => {
let component: RdppageComponent;
let fixture: ComponentFixture<RdppageComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ RdppageComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(RdppageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
/**
* RDP页面
*
* @date 2017-11-24
* @author liuzheng <liuzheng712@gmail.com>
*/
import {Component, OnInit} from '@angular/core';
import {ActivatedRoute, Params} from '@angular/router';
import {DataStore} from "../app.service";
declare let Mstsc: any;
@Component({
selector: 'app-rdppage',
templateUrl: './rdppage.component.html',
styleUrls: ['./rdppage.component.css']
})
export class RdppageComponent implements OnInit {
constructor(private activatedRoute: ActivatedRoute) {
DataStore.NavShow = false;
}
ngOnInit() {
let token: string;
this.activatedRoute.params.subscribe((params: Params) => {
token = params['token'];
});
let canvas = Mstsc.$("canvas");
canvas.style.display = 'inline';
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
let client = Mstsc.client.create(Mstsc.$("canvas"));
client.connect(token, "rdp/socket.io");
}
}
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