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
bc2164c0
Commit
bc2164c0
authored
May 28, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
44062c7d
af380b1d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
17 deletions
+32
-17
term.component.ts
src/app/elements/term/term.component.ts
+24
-7
guacamole.component.ts
src/app/pages/replay/guacamole/guacamole.component.ts
+0
-4
environment.prod.ts
src/environments/environment.prod.ts
+2
-1
styles.css
src/styles.css
+6
-5
No files found.
src/app/elements/term/term.component.ts
View file @
bc2164c0
...
...
@@ -46,21 +46,38 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
getWinSize
()
{
const
activeEle
=
$
(
'#winContainer'
);
const
markerEle
=
$
(
'#marker'
);
const
cols
=
Math
.
floor
(
activeEle
.
width
()
/
markerEle
.
width
()
*
6
)
-
6
;
const
rows
=
Math
.
floor
(
activeEle
.
height
()
/
markerEle
.
height
())
-
1
;
return
[
cols
,
rows
];
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
;
const
geometry
=
[
Math
.
floor
(
availableWidth
/
(
<
any
>
this
.
term
).
renderer
.
dimensions
.
actualCellWidth
)
-
1
,
Math
.
floor
(
availableHeight
/
(
<
any
>
this
.
term
).
renderer
.
dimensions
.
actualCellHeight
)
-
1
];
return
geometry
;
// const cols = Math.floor((activeEle.width() - 15) / markerEle.width() * 6) - 1;
// const rows = Math.floor(activeEle.height() / markerEle.height()) - 1;
// return [cols, rows];
}
resizeTerm
()
{
// fit(this.term);
const
size
=
this
.
getWinSize
();
if
(
isNaN
(
size
[
0
]))
{
console
.
log
(
'get SIze'
,
size
);
if
(
isNaN
(
size
[
0
])
||
isNaN
(
size
[
1
]))
{
fit
(
this
.
term
);
}
else
{
(
<
any
>
this
.
term
).
renderer
.
clear
();
this
.
term
.
resize
(
size
[
0
],
size
[
1
]);
this
.
winSizeChangeTrigger
.
emit
([
this
.
term
.
cols
,
this
.
term
.
rows
]);
}
this
.
winSizeChangeTrigger
.
emit
([
this
.
term
.
cols
,
this
.
term
.
rows
]);
this
.
_cookie
.
set
(
'cols'
,
this
.
term
.
cols
.
toString
(),
0
,
'/'
,
document
.
domain
);
this
.
_cookie
.
set
(
'rows'
,
this
.
term
.
rows
.
toString
(),
0
,
'/'
,
document
.
domain
);
}
...
...
src/app/pages/replay/guacamole/guacamole.component.ts
View file @
bc2164c0
...
...
@@ -15,10 +15,6 @@ function formatTime(millis: number) {
const
totalSeconds
=
Math
.
floor
(
millis
/
1000
);
const
seconds
=
totalSeconds
%
60
;
const
minutes
=
Math
.
floor
(
totalSeconds
/
60
);
console
.
log
(
'1'
);
console
.
log
(
'1'
);
console
.
log
(
'1'
);
console
.
log
(
'1'
);
return
zeroPad
(
minutes
,
2
)
+
':'
+
zeroPad
(
seconds
,
2
);
}
...
...
src/environments/environment.prod.ts
View file @
bc2164c0
...
...
@@ -2,4 +2,5 @@ export const environment = {
production
:
true
};
// export const version = '1.3.0-{{BUILD_NUMBER}} GPLv2.';
export
const
version
=
'1.3.0-101 GPLv2.'
;
// export const version = '1.3.0-101 GPLv2.';
export
const
version
=
'1.3.0-{{BUILD_NUMBER}} GPLv2.'
;
src/styles.css
View file @
bc2164c0
...
...
@@ -21,8 +21,7 @@ app-root {
top
:
0
;
left
:
0
;
z-index
:
-1
;
font-size
:
13px
!important
;
padding-bottom
:
16px
!important
;
font-size
:
14px
!important
;
font-family
:
'Monaco'
,
'Consolas'
,
'monospace'
!important
;
color
:
white
;
}
...
...
@@ -77,16 +76,18 @@ app-root {
body
::-webkit-scrollbar-track
{
-webkit-box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.3
);
background-color
:
#676a6c
;
background-color
:
#272323
;
border-radius
:
6px
;
}
body
::-webkit-scrollbar
{
width
:
8px
;
height
:
8px
;
height
:
8px
;
}
body
::-webkit-scrollbar-thumb
{
background-color
:
#F5F5F5
;
background-color
:
#494141
;
border-radius
:
6px
;
}
.ztree
*
{
...
...
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