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
823c76b0
Commit
823c76b0
authored
Sep 26, 2017
by
i317280
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
7e533da1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
22 deletions
+29
-22
terminal.css
src/app/TerminalPage/terminal.css
+17
-0
terminal.html
src/app/TerminalPage/terminal.html
+1
-3
terminal.ts
src/app/TerminalPage/terminal.ts
+11
-15
styles.css
src/styles.css
+0
-4
No files found.
src/app/TerminalPage/terminal.css
View file @
823c76b0
...
...
@@ -89,6 +89,13 @@
height
:
100%
;
}
#term
>
div
{
border-left
:
10px
solid
black
;
border-top
:
10px
solid
black
;
background-color
:
black
;
height
:
100%
;
}
.terminal
{
border
:
#000
solid
5px
;
color
:
#f0f0f0
;
...
...
@@ -123,3 +130,13 @@
.hidden
{
display
:
none
;
}
#liuzheng
{
position
:
fixed
;
top
:
0
;
left
:
0
;
z-index
:
-1
;
font-size
:
11px
!important
;
padding-bottom
:
16px
!important
;
font-family
:
'Monaco'
,
iosevka
!important
;
}
src/app/TerminalPage/terminal.html
View file @
823c76b0
...
...
@@ -17,6 +17,4 @@
[
ngClass
]="{'
disconnected
'
:
!
m
.
connected
,'
hidden
'
:
m
.
hide
}"
id=
"term-{{i}}"
>
</div>
</div>
<div
class=
"terminal"
style=
"position: absolute;top: -9999999px;left: -999999px;"
>
<span
id=
"liuzheng"
style=
"display: none;"
>
liuzheng
</span>
</div>
<span
id=
"liuzheng"
>
liuzheng
</span>
src/app/TerminalPage/terminal.ts
View file @
823c76b0
...
...
@@ -51,34 +51,31 @@ export class TerminalComponent implements OnInit {
close
(
i
)
{
this
.
_logger
.
debug
(
i
);
Terminal
.
TerminalDisconnect
(
i
);
Terminal
Component
.
TerminalDisconnect
(
i
);
DataStore
.
term
[
i
].
hide
=
true
;
DataStore
.
term
[
i
].
closed
=
true
;
DataStore
.
term
[
i
].
term
.
destroy
();
DataStore
.
term
.
splice
(
i
,
1
);
Terminal
.
checkActive
(
i
);
Terminal
Component
.
checkActive
(
i
);
}
static
checkActive
(
index
)
{
let
len
=
DataStore
.
term
.
length
;
if
(
len
==
2
)
{
if
(
len
==
1
)
{
// 唯一一个
DataStore
.
termActive
=
0
;
}
else
{
if
(
len
-
1
==
index
)
{
}
else
if
(
len
-
1
==
index
)
{
// 删了最后一个
DataStore
.
termActive
=
index
-
1
;
DataStore
.
termActive
=
len
-
2
;
}
else
{
DataStore
.
termActive
=
index
;
}
for
(
let
m
in
DataStore
.
term
)
{
DataStore
.
term
[
m
].
hide
=
true
;
}
DataStore
.
term
[
DataStore
.
termActive
].
hide
=
false
;
}
TerminalComponent
.
setActive
(
DataStore
.
termActive
)
}
setActive
(
index
)
{
setActive
=
TerminalComponent
.
setActive
;
static
setActive
(
index
)
{
for
(
let
m
in
DataStore
.
term
)
{
DataStore
.
term
[
m
].
hide
=
true
;
}
...
...
@@ -115,7 +112,7 @@ export class TerminalComponent implements OnInit {
cols
:
cols
,
rows
:
rows
,
useStyle
:
true
,
screenKeys
:
true
screenKeys
:
true
,
});
DataStore
.
term
.
push
(
new
Term
());
for
(
let
m
in
DataStore
.
term
)
{
...
...
@@ -123,7 +120,6 @@ export class TerminalComponent implements OnInit {
}
DataStore
.
term
[
id
].
hide
=
false
;
this
.
_logger
.
log
(
DataStore
.
term
[
id
+
1
].
closed
);
DataStore
.
termActive
=
id
;
...
...
@@ -192,7 +188,7 @@ export class TerminalComponent implements OnInit {
static
TerminalDisconnectAll
()
{
alert
(
"TerminalDisconnectAll"
);
for
(
let
i
in
DataStore
.
term
)
{
Terminal
.
TerminalDisconnect
(
i
);
Terminal
Component
.
TerminalDisconnect
(
i
);
// DataStore.term[i]["connected"] = false;
// DataStore.term[i]["socket"].destroy();
// DataStore.term[i]["term"].write('\r\n\x1b[31mBye Bye!\x1b[m\r\n');
...
...
src/styles.css
View file @
823c76b0
...
...
@@ -33,7 +33,3 @@ app-root {
padding-bottom
:
16px
!important
;
font-family
:
'Monaco'
,
iosevka
!important
;
}
.xterm-rows
{
margin
:
10px
0
0
10px
;
}
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