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
79d8cb2a
Unverified
Commit
79d8cb2a
authored
May 30, 2019
by
BaiJiangJie
Committed by
GitHub
May 30, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70 from jumpserver/dev
Dev
parents
569ed60b
82a1f7d4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
15 deletions
+36
-15
cn.json
i18n/cn.json
+2
-1
zh-CN.json
i18n/zh-CN.json
+2
-1
zh.json
i18n/zh.json
+2
-1
nav.component.ts
src/app/elements/nav/nav.component.ts
+10
-0
term.component.ts
src/app/elements/term/term.component.ts
+20
-12
No files found.
i18n/cn.json
View file @
79d8cb2a
...
...
@@ -59,5 +59,6 @@
"select a solution"
:
"选择分辨率"
,
"set font"
:
"设置字体"
,
"font"
:
"字体"
,
"font size"
:
"字体大小"
"font size"
:
"字体大小"
,
"full screen"
:
"全屏显示"
}
i18n/zh-CN.json
View file @
79d8cb2a
...
...
@@ -59,5 +59,6 @@
"select a solution"
:
"选择分辨率"
,
"set font"
:
"设置字体"
,
"font"
:
"字体"
,
"font size"
:
"字体大小"
"font size"
:
"字体大小"
,
"full screen"
:
"全屏显示"
}
i18n/zh.json
View file @
79d8cb2a
...
...
@@ -59,5 +59,6 @@
"select a solution"
:
"选择分辨率"
,
"set font"
:
"设置字体"
,
"font"
:
"字体"
,
"font size"
:
"字体大小"
"font size"
:
"字体大小"
,
"full screen"
:
"全屏显示"
}
src/app/elements/nav/nav.component.ts
View file @
79d8cb2a
...
...
@@ -66,6 +66,11 @@ export class ElementNavComponent implements OnInit {
// this._appService.copy();
break
;
}
case
'FullScreen'
:
{
document
.
getElementsByClassName
(
'window active '
)[
0
].
requestFullscreen
();
window
.
dispatchEvent
(
new
Event
(
'resize'
));
break
;
}
case
'Disconnect'
:
{
if
(
!
confirm
(
'断开当前连接? (RDP暂不支持)'
))
{
break
;
...
...
@@ -264,6 +269,11 @@ export class ElementNavComponent implements OnInit {
'href'
:
''
,
'name'
:
'Share session (read/write)'
,
'disable'
:
true
},
{
'id'
:
'FullScreen'
,
'click'
:
'FullScreen'
,
'name'
:
'Full Screen'
}
]
},
{
...
...
src/app/elements/term/term.component.ts
View file @
79d8cb2a
...
...
@@ -46,18 +46,26 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
}
getWinSize
()
{
const
activeEle
=
$
(
'#winContainer'
);
const
elementStyle
=
window
.
getComputedStyle
(
this
.
term
.
element
);
const
elementPadding
=
{
top
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-top'
),
10
),
bottom
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-bottom'
),
10
),
right
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-right'
),
10
),
left
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-left'
),
10
)
};
const
elementPaddingVer
=
elementPadding
.
top
+
elementPadding
.
bottom
;
const
elementPaddingHor
=
elementPadding
.
right
+
elementPadding
.
left
;
const
availableHeight
=
activeEle
.
height
()
-
elementPaddingVer
;
const
availableWidth
=
activeEle
.
width
()
-
elementPaddingHor
-
(
<
any
>
this
.
term
).
viewport
.
scrollBarWidth
;
let
availableHeight
=
0
;
let
availableWidth
=
0
;
if
(
document
.
fullscreenElement
)
{
availableWidth
=
document
.
body
.
clientWidth
-
10
;
availableHeight
=
document
.
body
.
clientHeight
;
}
else
{
const
activeEle
=
$
(
'#winContainer'
);
const
elementStyle
=
window
.
getComputedStyle
(
this
.
term
.
element
);
const
elementPadding
=
{
top
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-top'
),
10
),
bottom
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-bottom'
),
10
),
right
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-right'
),
10
),
left
:
parseInt
(
elementStyle
.
getPropertyValue
(
'padding-left'
),
10
)
};
const
elementPaddingVer
=
elementPadding
.
top
+
elementPadding
.
bottom
;
const
elementPaddingHor
=
elementPadding
.
right
+
elementPadding
.
left
;
availableHeight
=
activeEle
.
height
()
-
elementPaddingVer
;
availableWidth
=
activeEle
.
width
()
-
elementPaddingHor
-
(
<
any
>
this
.
term
).
viewport
.
scrollBarWidth
;
}
const
geometry
=
[
Math
.
floor
(
availableWidth
/
(
<
any
>
this
.
term
).
renderer
.
dimensions
.
actualCellWidth
)
-
1
,
Math
.
floor
(
availableHeight
/
(
<
any
>
this
.
term
).
renderer
.
dimensions
.
actualCellHeight
)
-
1
...
...
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