Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
luna
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
luna
Commits
04939b69
Commit
04939b69
authored
Nov 24, 2017
by
liuzheng712
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add rdp single page
parent
bbcd3353
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
0 deletions
+65
-0
rdppage.component.css
src/app/rdppage/rdppage.component.css
+0
-0
rdppage.component.html
src/app/rdppage/rdppage.component.html
+1
-0
rdppage.component.spec.ts
src/app/rdppage/rdppage.component.spec.ts
+25
-0
rdppage.component.ts
src/app/rdppage/rdppage.component.ts
+39
-0
No files found.
src/app/rdppage/rdppage.component.css
0 → 100644
View file @
04939b69
src/app/rdppage/rdppage.component.html
0 → 100644
View file @
04939b69
<canvas
id=
"canvas"
></canvas>
src/app/rdppage/rdppage.component.spec.ts
0 → 100644
View file @
04939b69
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
();
});
});
src/app/rdppage/rdppage.component.ts
0 → 100644
View file @
04939b69
/**
* 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"
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment