Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Tabby
提交
df2f4d4a
T
Tabby
项目概览
后端镜像
/
Tabby
通知
35
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Tabby
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
df2f4d4a
编写于
3月 01, 2020
作者:
E
Eugene Pankov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
angular 9 fixes
上级
09282017
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
59 addition
and
28 deletion
+59
-28
terminus-serial/src/components/serialTab.component.ts
terminus-serial/src/components/serialTab.component.ts
+8
-3
terminus-ssh/src/components/sshTab.component.ts
terminus-ssh/src/components/sshTab.component.ts
+9
-6
terminus-terminal/src/api/baseTerminalTab.component.ts
terminus-terminal/src/api/baseTerminalTab.component.ts
+34
-18
terminus-terminal/src/components/terminalTab.component.ts
terminus-terminal/src/components/terminalTab.component.ts
+8
-1
未找到文件。
terminus-serial/src/components/serialTab.component.ts
浏览文件 @
df2f4d4a
import
colors
from
'
ansi-colors
'
import
{
Spinner
}
from
'
cli-spinner
'
import
{
Component
}
from
'
@angular/core
'
import
{
Component
,
Injector
}
from
'
@angular/core
'
import
{
first
}
from
'
rxjs/operators
'
import
{
BaseTerminalTabComponent
}
from
'
terminus-terminal
'
import
{
SerialService
}
from
'
../services/serial.service
'
...
...
@@ -16,14 +16,19 @@ import { Subscription } from 'rxjs'
})
export
class
SerialTabComponent
extends
BaseTerminalTabComponent
{
connection
:
SerialConnection
serial
:
SerialService
session
:
SerialSession
serialPort
:
any
private
homeEndSubscription
:
Subscription
constructor
(
injector
:
Injector
,
private
serial
:
SerialService
,
)
{
super
(
injector
)
}
ngOnInit
()
{
this
.
logger
=
this
.
log
.
create
(
'
terminalTab
'
)
this
.
serial
=
this
.
injector
.
get
(
SerialService
)
this
.
homeEndSubscription
=
this
.
hotkeys
.
matchedHotkey
.
subscribe
(
hotkey
=>
{
if
(
!
this
.
hasFocus
)
{
...
...
terminus-ssh/src/components/sshTab.component.ts
浏览文件 @
df2f4d4a
import
colors
from
'
ansi-colors
'
import
{
Spinner
}
from
'
cli-spinner
'
import
{
Component
}
from
'
@angular/core
'
import
{
Component
,
Injector
}
from
'
@angular/core
'
import
{
NgbModal
}
from
'
@ng-bootstrap/ng-bootstrap
'
import
{
first
}
from
'
rxjs/operators
'
import
{
BaseTerminalTabComponent
}
from
'
terminus-terminal
'
...
...
@@ -18,16 +18,19 @@ import { Subscription } from 'rxjs'
})
export
class
SSHTabComponent
extends
BaseTerminalTabComponent
{
connection
:
SSHConnection
ssh
:
SSHService
session
:
SSHSession
private
ngbModal
:
NgbModal
private
homeEndSubscription
:
Subscription
ngOnInit
()
{
this
.
ngbModal
=
this
.
injector
.
get
<
NgbModal
>
(
NgbModal
)
constructor
(
injector
:
Injector
,
public
ssh
:
SSHService
,
private
ngbModal
:
NgbModal
,
)
{
super
(
injector
)
}
ngOnInit
()
{
this
.
logger
=
this
.
log
.
create
(
'
terminalTab
'
)
this
.
ssh
=
this
.
injector
.
get
(
SSHService
)
this
.
homeEndSubscription
=
this
.
hotkeys
.
matchedHotkey
.
subscribe
(
hotkey
=>
{
if
(
!
this
.
hasFocus
)
{
...
...
terminus-terminal/src/api/baseTerminalTab.component.ts
浏览文件 @
df2f4d4a
...
...
@@ -2,7 +2,7 @@ import { Observable, Subject, Subscription } from 'rxjs'
import
{
first
}
from
'
rxjs/operators
'
import
{
ToastrService
}
from
'
ngx-toastr
'
import
colors
from
'
ansi-colors
'
import
{
NgZone
,
OnInit
,
OnDestroy
,
Inject
,
Injector
,
Optional
,
ViewChild
,
HostBinding
,
Input
,
ElementRef
}
from
'
@angular/core
'
import
{
NgZone
,
OnInit
,
OnDestroy
,
Inject
or
,
ViewChild
,
HostBinding
,
Input
,
ElementRef
,
InjectFlags
}
from
'
@angular/core
'
import
{
trigger
,
transition
,
style
,
animate
,
AnimationTriggerMetadata
}
from
'
@angular/animations
'
import
{
AppService
,
ConfigService
,
BaseTabComponent
,
ElectronService
,
HostAppService
,
HotkeysService
,
Platform
,
LogService
,
Logger
,
TabContextMenuItemProvider
}
from
'
terminus-core
'
...
...
@@ -63,6 +63,22 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
*/
enablePassthrough
=
true
// Deps start
config
:
ConfigService
element
:
ElementRef
protected
zone
:
NgZone
protected
app
:
AppService
protected
hostApp
:
HostAppService
protected
hotkeys
:
HotkeysService
protected
sessions
:
SessionsService
protected
electron
:
ElectronService
protected
terminalContainersService
:
TerminalFrontendService
protected
toastr
:
ToastrServiceProxy
protected
log
:
LogService
protected
decorators
:
TerminalDecorator
[]
protected
contextMenuProviders
:
TabContextMenuItemProvider
[]
// Deps end
protected
logger
:
Logger
protected
output
=
new
Subject
<
string
>
()
private
sessionCloseSubscription
:
Subscription
...
...
@@ -76,24 +92,24 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
get
alternateScreenActive$
():
Observable
<
boolean
>
{
return
this
.
frontend
.
alternateScreenActive$
}
get
frontendReady$
():
Observable
<
void
>
{
return
this
.
frontendReady
}
constructor
(
public
config
:
ConfigService
,
public
element
:
ElementRef
,
protected
injector
:
Injector
,
protected
zone
:
NgZone
,
protected
app
:
AppService
,
protected
hostApp
:
HostAppService
,
protected
hotkeys
:
HotkeysService
,
protected
sessions
:
SessionsService
,
protected
electron
:
ElectronService
,
protected
terminalContainersService
:
TerminalFrontendService
,
@
Inject
(
ToastrService
)
protected
toastr
:
ToastrServiceProxy
,
protected
log
:
LogService
,
@
Optional
()
@
Inject
(
TerminalDecorator
)
protected
decorators
:
TerminalDecorator
[],
@
Optional
()
@
Inject
(
TabContextMenuItemProvider
)
protected
contextMenuProviders
:
TabContextMenuItemProvider
[],
)
{
constructor
(
protected
injector
:
Injector
)
{
super
()
this
.
logger
=
log
.
create
(
'
baseTerminalTab
'
)
this
.
config
=
injector
.
get
(
ConfigService
)
this
.
element
=
injector
.
get
(
ElementRef
)
this
.
zone
=
injector
.
get
(
NgZone
)
this
.
app
=
injector
.
get
(
AppService
)
this
.
hostApp
=
injector
.
get
(
HostAppService
)
this
.
hotkeys
=
injector
.
get
(
HotkeysService
)
this
.
sessions
=
injector
.
get
(
SessionsService
)
this
.
electron
=
injector
.
get
(
ElectronService
)
this
.
terminalContainersService
=
injector
.
get
(
TerminalFrontendService
)
this
.
toastr
=
injector
.
get
(
ToastrService
)
this
.
log
=
injector
.
get
(
LogService
)
this
.
decorators
=
injector
.
get
<
any
>
(
TerminalDecorator
,
null
,
InjectFlags
.
Optional
)
as
TerminalDecorator
[]
this
.
contextMenuProviders
=
injector
.
get
<
any
>
(
TabContextMenuItemProvider
,
null
,
InjectFlags
.
Optional
)
as
TabContextMenuItemProvider
[]
this
.
logger
=
this
.
log
.
create
(
'
baseTerminalTab
'
)
this
.
decorators
=
this
.
decorators
||
[]
this
.
setTitle
(
'
Terminal
'
)
...
...
terminus-terminal/src/components/terminalTab.component.ts
浏览文件 @
df2f4d4a
import
{
Component
,
Input
}
from
'
@angular/core
'
import
{
Component
,
Input
,
Injector
}
from
'
@angular/core
'
import
{
Subscription
}
from
'
rxjs
'
import
{
first
}
from
'
rxjs/operators
'
import
{
BaseTabProcess
,
WIN_BUILD_CONPTY_SUPPORTED
,
isWindowsBuild
}
from
'
terminus-core
'
...
...
@@ -17,6 +17,13 @@ export class TerminalTabComponent extends BaseTerminalTabComponent {
@
Input
()
sessionOptions
:
SessionOptions
private
homeEndSubscription
:
Subscription
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
constructor
(
injector
:
Injector
,
)
{
super
(
injector
)
}
ngOnInit
()
{
this
.
logger
=
this
.
log
.
create
(
'
terminalTab
'
)
this
.
session
=
new
Session
(
this
.
config
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录