Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Tabby
提交
461cd2be
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,发现更多精彩内容 >>
未验证
提交
461cd2be
编写于
7月 05, 2021
作者:
E
Eugene Pankov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
deprecated matchedHotkey
上级
da599567
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
141 addition
and
32 deletion
+141
-32
tabby-core/src/buttonProvider.ts
tabby-core/src/buttonProvider.ts
+9
-7
tabby-core/src/components/appRoot.component.ts
tabby-core/src/components/appRoot.component.ts
+1
-1
tabby-core/src/components/splitTab.component.ts
tabby-core/src/components/splitTab.component.ts
+1
-1
tabby-core/src/components/tabHeader.component.ts
tabby-core/src/components/tabHeader.component.ts
+1
-1
tabby-core/src/index.ts
tabby-core/src/index.ts
+1
-1
tabby-core/src/services/hotkeys.service.ts
tabby-core/src/services/hotkeys.service.ts
+2
-0
tabby-core/src/services/profiles.service.ts
tabby-core/src/services/profiles.service.ts
+9
-0
tabby-local/src/components/terminalTab.component.ts
tabby-local/src/components/terminalTab.component.ts
+1
-1
tabby-local/src/index.ts
tabby-local/src/index.ts
+1
-1
tabby-serial/src/components/serialTab.component.ts
tabby-serial/src/components/serialTab.component.ts
+1
-1
tabby-settings/src/buttonProvider.ts
tabby-settings/src/buttonProvider.ts
+1
-1
tabby-ssh/src/components/sshTab.component.ts
tabby-ssh/src/components/sshTab.component.ts
+1
-1
tabby-ssh/src/config.ts
tabby-ssh/src/config.ts
+1
-0
tabby-ssh/src/hotkeys.ts
tabby-ssh/src/hotkeys.ts
+4
-0
tabby-ssh/src/index.ts
tabby-ssh/src/index.ts
+49
-4
tabby-telnet/src/components/telnetTab.component.ts
tabby-telnet/src/components/telnetTab.component.ts
+1
-1
tabby-telnet/src/config.ts
tabby-telnet/src/config.ts
+1
-0
tabby-telnet/src/hotkeys.ts
tabby-telnet/src/hotkeys.ts
+4
-0
tabby-telnet/src/index.ts
tabby-telnet/src/index.ts
+49
-3
tabby-telnet/src/profiles.ts
tabby-telnet/src/profiles.ts
+2
-7
tabby-terminal/src/api/baseTerminalTab.component.ts
tabby-terminal/src/api/baseTerminalTab.component.ts
+1
-1
未找到文件。
tabby-core/src/buttonProvider.ts
浏览文件 @
461cd2be
...
...
@@ -7,10 +7,10 @@ import { HostAppService, Platform } from './api/hostApp'
import
{
Profile
}
from
'
./api/profileProvider
'
import
{
ConfigService
}
from
'
./services/config.service
'
import
{
SelectorOption
}
from
'
./api/selector
'
import
{
HotkeysService
}
from
'
./services/hotkeys.service
'
import
{
ProfilesService
}
from
'
./services/profiles.service
'
import
{
AppService
}
from
'
./services/app.service
'
import
{
NotificationsService
}
from
'
./services/notifications.service
'
import
{
HotkeysService
}
from
'
api
'
/** @hidden */
@
Injectable
()
...
...
@@ -35,12 +35,14 @@ export class ButtonProvider extends ToolbarButtonProvider {
async
activate
()
{
const
recentProfiles
:
Profile
[]
=
this
.
config
.
store
.
recentProfiles
const
getProfileOptions
=
(
profile
):
SelectorOption
<
void
>
=>
({
icon
:
recentProfiles
.
includes
(
profile
)
?
'
fas fa-history
'
:
profile
.
icon
,
name
:
profile
.
group
?
`
${
profile
.
group
}
/
${
profile
.
name
}
`
:
profile
.
name
,
description
:
this
.
profilesServices
.
providerForProfile
(
profile
)?.
getDescription
(
profile
),
callback
:
()
=>
this
.
launchProfile
(
profile
),
})
const
getProfileOptions
=
(
profile
):
SelectorOption
<
void
>
=>
{
const
result
:
SelectorOption
<
void
>
=
this
.
profilesServices
.
selectorOptionForProfile
(
profile
)
if
(
recentProfiles
.
includes
(
profile
))
{
result
.
icon
=
'
fas fa-history
'
}
result
.
callback
=
()
=>
this
.
launchProfile
(
profile
)
return
result
}
let
options
=
recentProfiles
.
map
(
getProfileOptions
)
if
(
recentProfiles
.
length
)
{
...
...
tabby-core/src/components/appRoot.component.ts
浏览文件 @
461cd2be
...
...
@@ -80,7 +80,7 @@ export class AppRootComponent {
this
.
logger
=
log
.
create
(
'
main
'
)
this
.
logger
.
info
(
'
v
'
,
platform
.
getAppVersion
())
this
.
hotkeys
.
matchedHotkey
.
subscribe
((
hotkey
:
string
)
=>
{
this
.
hotkeys
.
hotkey$
.
subscribe
((
hotkey
:
string
)
=>
{
if
(
hotkey
.
startsWith
(
'
tab-
'
))
{
const
index
=
parseInt
(
hotkey
.
split
(
'
-
'
)[
1
])
if
(
index
<=
this
.
app
.
tabs
.
length
)
{
...
...
tabby-core/src/components/splitTab.component.ts
浏览文件 @
461cd2be
...
...
@@ -209,7 +209,7 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
})
this
.
blurred$
.
subscribe
(()
=>
this
.
getAllTabs
().
forEach
(
x
=>
x
.
emitBlurred
()))
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
matchedHotkey
,
hotkey
=>
{
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
hotkey$
,
hotkey
=>
{
if
(
!
this
.
hasFocus
||
!
this
.
focusedTab
)
{
return
}
...
...
tabby-core/src/components/tabHeader.component.ts
浏览文件 @
461cd2be
...
...
@@ -43,7 +43,7 @@ export class TabHeaderComponent extends BaseComponent {
@
Optional
()
@
Inject
(
TabContextMenuItemProvider
)
protected
contextMenuProviders
:
TabContextMenuItemProvider
[],
)
{
super
()
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
matchedHotkey
,
(
hotkey
)
=>
{
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
hotkey$
,
(
hotkey
)
=>
{
if
(
this
.
app
.
activeTab
===
this
.
tab
)
{
if
(
hotkey
===
'
rename-tab
'
)
{
this
.
showRenameTabModal
()
...
...
tabby-core/src/index.ts
浏览文件 @
461cd2be
...
...
@@ -135,7 +135,7 @@ export default class AppModule { // eslint-disable-line @typescript-eslint/no-ex
console
.
error
(
'
Unhandled exception:
'
,
err
)
})
hotkeys
.
matchedHotkey
.
subscribe
(
async
(
hotkey
)
=>
{
hotkeys
.
hotkey$
.
subscribe
(
async
(
hotkey
)
=>
{
if
(
hotkey
.
startsWith
(
'
profile.
'
))
{
const
id
=
hotkey
.
split
(
'
.
'
)[
1
]
const
profile
=
(
await
profilesService
.
getProfiles
()).
find
(
x
=>
x
.
id
===
id
)
...
...
tabby-core/src/services/hotkeys.service.ts
浏览文件 @
461cd2be
...
...
@@ -3,6 +3,7 @@ import { Observable, Subject } from 'rxjs'
import
{
HotkeyDescription
,
HotkeyProvider
}
from
'
../api/hotkeyProvider
'
import
{
stringifyKeySequence
,
EventData
}
from
'
./hotkeys.util
'
import
{
ConfigService
}
from
'
./config.service
'
import
{
deprecate
}
from
'
util
'
export
interface
PartialHotkeyMatch
{
id
:
string
...
...
@@ -53,6 +54,7 @@ export class HotkeysService {
// deprecated
this
.
hotkey$
.
subscribe
(
h
=>
this
.
matchedHotkey
.
emit
(
h
))
this
.
matchedHotkey
.
subscribe
=
deprecate
(
this
.
matchedHotkey
.
subscribe
,
'
matchedHotkey is deprecated, use hotkey$
'
)
}
/**
...
...
tabby-core/src/services/profiles.service.ts
浏览文件 @
461cd2be
...
...
@@ -2,6 +2,7 @@ import { Injectable, Inject } from '@angular/core'
import
{
NewTabParameters
}
from
'
./tabs.service
'
import
{
BaseTabComponent
}
from
'
../components/baseTab.component
'
import
{
Profile
,
ProfileProvider
}
from
'
../api/profileProvider
'
import
{
SelectorOption
}
from
'
../api/selector
'
import
{
AppService
}
from
'
./app.service
'
import
{
ConfigService
}
from
'
./config.service
'
...
...
@@ -51,4 +52,12 @@ export class ProfilesService {
providerForProfile
(
profile
:
Profile
):
ProfileProvider
|
null
{
return
this
.
profileProviders
.
find
(
x
=>
x
.
id
===
profile
.
type
)
??
null
}
selectorOptionForProfile
<
T
>
(
profile
:
Profile
):
SelectorOption
<
T
>
{
return
{
icon
:
profile
.
icon
,
name
:
profile
.
group
?
`
${
profile
.
group
}
/
${
profile
.
name
}
`
:
profile
.
name
,
description
:
this
.
providerForProfile
(
profile
)?.
getDescription
(
profile
),
}
}
}
tabby-local/src/components/terminalTab.component.ts
浏览文件 @
461cd2be
...
...
@@ -30,7 +30,7 @@ export class TerminalTabComponent extends BaseTerminalTabComponent {
const
isConPTY
=
isWindowsBuild
(
WIN_BUILD_CONPTY_SUPPORTED
)
&&
this
.
config
.
store
.
terminal
.
useConPTY
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
matchedHotkey
,
hotkey
=>
{
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
hotkey$
,
hotkey
=>
{
if
(
!
this
.
hasFocus
)
{
return
}
...
...
tabby-local/src/index.ts
浏览文件 @
461cd2be
...
...
@@ -116,7 +116,7 @@ export default class LocalTerminalModule { // eslint-disable-line @typescript-es
dockMenu
:
DockMenuService
,
config
:
ConfigService
,
)
{
hotkeys
.
matchedHotkey
.
subscribe
(
async
(
hotkey
)
=>
{
hotkeys
.
hotkey$
.
subscribe
(
async
(
hotkey
)
=>
{
if
(
hotkey
===
'
new-tab
'
)
{
terminal
.
openTab
()
}
...
...
tabby-serial/src/components/serialTab.component.ts
浏览文件 @
461cd2be
...
...
@@ -29,7 +29,7 @@ export class SerialTabComponent extends BaseTerminalTabComponent {
ngOnInit
()
{
this
.
logger
=
this
.
log
.
create
(
'
terminalTab
'
)
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
matchedHotkey
,
hotkey
=>
{
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
hotkey$
,
hotkey
=>
{
if
(
!
this
.
hasFocus
)
{
return
}
...
...
tabby-settings/src/buttonProvider.ts
浏览文件 @
461cd2be
...
...
@@ -14,7 +14,7 @@ export class ButtonProvider extends ToolbarButtonProvider {
super
()
hostApp
.
settingsUIRequest$
.
subscribe
(()
=>
this
.
open
())
hotkeys
.
matchedHotkey
.
subscribe
(
async
(
hotkey
)
=>
{
hotkeys
.
hotkey$
.
subscribe
(
async
(
hotkey
)
=>
{
if
(
hotkey
===
'
settings
'
)
{
this
.
open
()
}
...
...
tabby-ssh/src/components/sshTab.component.ts
浏览文件 @
461cd2be
...
...
@@ -41,7 +41,7 @@ export class SSHTabComponent extends BaseTerminalTabComponent {
this
.
logger
=
this
.
log
.
create
(
'
terminalTab
'
)
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
matchedHotkey
,
hotkey
=>
{
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
hotkey$
,
hotkey
=>
{
if
(
!
this
.
hasFocus
)
{
return
}
...
...
tabby-ssh/src/config.ts
浏览文件 @
461cd2be
...
...
@@ -10,6 +10,7 @@ export class SSHConfigProvider extends ConfigProvider {
agentPath
:
null
,
},
hotkeys
:
{
'
ssh-profile-selector
'
:
[],
'
restart-ssh-session
'
:
[],
'
launch-winscp
'
:
[],
},
...
...
tabby-ssh/src/hotkeys.ts
浏览文件 @
461cd2be
...
...
@@ -5,6 +5,10 @@ import { HotkeyDescription, HotkeyProvider } from 'tabby-core'
@
Injectable
()
export
class
SSHHotkeyProvider
extends
HotkeyProvider
{
hotkeys
:
HotkeyDescription
[]
=
[
{
id
:
'
ssh-profile-selector
'
,
name
:
'
Show SSH profile selector
'
,
},
{
id
:
'
restart-ssh-session
'
,
name
:
'
Restart current SSH session
'
,
...
...
tabby-ssh/src/index.ts
浏览文件 @
461cd2be
...
...
@@ -4,8 +4,8 @@ import { FormsModule } from '@angular/forms'
import
{
NgbModule
}
from
'
@ng-bootstrap/ng-bootstrap
'
import
{
ToastrModule
}
from
'
ngx-toastr
'
import
{
NgxFilesizeModule
}
from
'
ngx-filesize
'
import
TabbyCoreModule
,
{
ConfigProvider
,
TabRecoveryProvider
,
HotkeyProvider
,
TabContextMenuItemProvider
,
ProfileProvider
}
from
'
tabby-core
'
import
{
SettingsTabProvider
}
from
'
tabby-settings
'
import
TabbyCoreModule
,
{
ConfigProvider
,
TabRecoveryProvider
,
HotkeyProvider
,
TabContextMenuItemProvider
,
ProfileProvider
,
HotkeysService
,
ProfilesService
,
AppService
,
SelectorService
,
SelectorOption
}
from
'
tabby-core
'
import
{
SettingsTab
Component
,
SettingsTab
Provider
}
from
'
tabby-settings
'
import
TabbyTerminalModule
from
'
tabby-terminal
'
import
{
SSHProfileSettingsComponent
}
from
'
./components/sshProfileSettings.component
'
...
...
@@ -40,7 +40,7 @@ import { SSHProfilesService } from './profiles'
{
provide
:
TabRecoveryProvider
,
useClass
:
RecoveryProvider
,
multi
:
true
},
{
provide
:
HotkeyProvider
,
useClass
:
SSHHotkeyProvider
,
multi
:
true
},
{
provide
:
TabContextMenuItemProvider
,
useClass
:
SFTPContextMenu
,
multi
:
true
},
{
provide
:
ProfileProvider
,
use
Class
:
SSHProfilesService
,
multi
:
true
},
{
provide
:
ProfileProvider
,
use
Existing
:
SSHProfilesService
,
multi
:
true
},
],
entryComponents
:
[
SSHProfileSettingsComponent
,
...
...
@@ -59,4 +59,49 @@ import { SSHProfilesService } from './profiles'
SFTPPanelComponent
,
],
})
export
default
class
SSHModule
{
}
// eslint-disable-line @typescript-eslint/no-extraneous-class
export
default
class
SSHModule
{
constructor
(
hotkeys
:
HotkeysService
,
private
app
:
AppService
,
private
selector
:
SelectorService
,
private
profilesService
:
ProfilesService
,
private
sshProfiles
:
SSHProfilesService
,
)
{
hotkeys
.
hotkey$
.
subscribe
(
hotkey
=>
{
if
(
hotkey
===
'
ssh-profile-selector
'
)
{
this
.
showSelector
()
}
})
}
async
showSelector
():
Promise
<
void
>
{
let
profiles
=
await
this
.
profilesService
.
getProfiles
()
profiles
=
profiles
.
filter
(
x
=>
!
x
.
isTemplate
&&
x
.
type
===
'
ssh
'
)
const
options
:
SelectorOption
<
void
>
[]
=
profiles
.
map
(
p
=>
({
...
this
.
profilesService
.
selectorOptionForProfile
(
p
),
callback
:
()
=>
this
.
profilesService
.
openNewTabForProfile
(
p
),
}))
options
.
push
({
name
:
'
Manage profiles
'
,
icon
:
'
fas fa-window-restore
'
,
callback
:
()
=>
this
.
app
.
openNewTabRaw
({
type
:
SettingsTabComponent
,
inputs
:
{
activeTab
:
'
profiles
'
},
}),
})
options
.
push
({
name
:
'
Quick connect
'
,
freeInputPattern
:
'
Connect to "%s"...
'
,
icon
:
'
fas fa-arrow-right
'
,
callback
:
query
=>
this
.
profilesService
.
openNewTabForProfile
(
this
.
sshProfiles
.
quickConnect
(
query
)
),
})
await
this
.
selector
.
show
(
'
Select an SSH profile
'
,
options
)
}
}
tabby-telnet/src/components/telnetTab.component.ts
浏览文件 @
461cd2be
...
...
@@ -33,7 +33,7 @@ export class TelnetTabComponent extends BaseTerminalTabComponent {
this
.
logger
=
this
.
log
.
create
(
'
telnetTab
'
)
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
matchedHotkey
,
hotkey
=>
{
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
hotkey$
,
hotkey
=>
{
if
(
this
.
hasFocus
&&
hotkey
===
'
restart-telnet-session
'
)
{
this
.
reconnect
()
}
...
...
tabby-telnet/src/config.ts
浏览文件 @
461cd2be
...
...
@@ -4,6 +4,7 @@ import { ConfigProvider } from 'tabby-core'
export
class
TelnetConfigProvider
extends
ConfigProvider
{
defaults
=
{
hotkeys
:
{
'
telnet-profile-selector
'
:
[],
'
restart-telnet-session
'
:
[],
},
}
...
...
tabby-telnet/src/hotkeys.ts
浏览文件 @
461cd2be
...
...
@@ -5,6 +5,10 @@ import { HotkeyDescription, HotkeyProvider } from 'tabby-core'
@
Injectable
()
export
class
TelnetHotkeyProvider
extends
HotkeyProvider
{
hotkeys
:
HotkeyDescription
[]
=
[
{
id
:
'
telnet-profile-selector
'
,
name
:
'
Show Telnet profile selector
'
,
},
{
id
:
'
restart-telnet-session
'
,
name
:
'
Restart current Telnet session
'
,
...
...
tabby-telnet/src/index.ts
浏览文件 @
461cd2be
...
...
@@ -4,8 +4,9 @@ import { FormsModule } from '@angular/forms'
import
{
NgbModule
}
from
'
@ng-bootstrap/ng-bootstrap
'
import
{
ToastrModule
}
from
'
ngx-toastr
'
import
{
NgxFilesizeModule
}
from
'
ngx-filesize
'
import
TabbyCoreModule
,
{
ConfigProvider
,
TabRecoveryProvider
,
HotkeyProvider
,
ProfileProvider
}
from
'
tabby-core
'
import
TabbyCoreModule
,
{
ConfigProvider
,
TabRecoveryProvider
,
HotkeyProvider
,
ProfileProvider
,
HotkeysService
,
AppService
,
SelectorService
,
ProfilesService
,
SelectorOption
}
from
'
tabby-core
'
import
TabbyTerminalModule
from
'
tabby-terminal
'
import
{
SettingsTabComponent
}
from
'
tabby-settings
'
import
{
TelnetProfileSettingsComponent
}
from
'
./components/telnetProfileSettings.component
'
import
{
TelnetTabComponent
}
from
'
./components/telnetTab.component
'
...
...
@@ -30,7 +31,7 @@ import { TelnetProfilesService } from './profiles'
{
provide
:
ConfigProvider
,
useClass
:
TelnetConfigProvider
,
multi
:
true
},
{
provide
:
TabRecoveryProvider
,
useClass
:
RecoveryProvider
,
multi
:
true
},
{
provide
:
HotkeyProvider
,
useClass
:
TelnetHotkeyProvider
,
multi
:
true
},
{
provide
:
ProfileProvider
,
use
Class
:
TelnetProfilesService
,
multi
:
true
},
{
provide
:
ProfileProvider
,
use
Existing
:
TelnetProfilesService
,
multi
:
true
},
],
entryComponents
:
[
TelnetProfileSettingsComponent
,
...
...
@@ -41,4 +42,49 @@ import { TelnetProfilesService } from './profiles'
TelnetTabComponent
,
],
})
export
default
class
TelnetModule
{
}
// eslint-disable-line @typescript-eslint/no-extraneous-class
export
default
class
TelnetModule
{
constructor
(
hotkeys
:
HotkeysService
,
private
app
:
AppService
,
private
selector
:
SelectorService
,
private
profilesService
:
ProfilesService
,
private
telnetProfiles
:
TelnetProfilesService
,
)
{
hotkeys
.
hotkey$
.
subscribe
(
hotkey
=>
{
if
(
hotkey
===
'
telnet-profile-selector
'
)
{
this
.
showSelector
()
}
})
}
async
showSelector
():
Promise
<
void
>
{
let
profiles
=
await
this
.
profilesService
.
getProfiles
()
profiles
=
profiles
.
filter
(
x
=>
!
x
.
isTemplate
&&
x
.
type
===
'
telnet
'
)
const
options
:
SelectorOption
<
void
>
[]
=
profiles
.
map
(
p
=>
({
...
this
.
profilesService
.
selectorOptionForProfile
(
p
),
callback
:
()
=>
this
.
profilesService
.
openNewTabForProfile
(
p
),
}))
options
.
push
({
name
:
'
Manage profiles
'
,
icon
:
'
fas fa-window-restore
'
,
callback
:
()
=>
this
.
app
.
openNewTabRaw
({
type
:
SettingsTabComponent
,
inputs
:
{
activeTab
:
'
profiles
'
},
}),
})
options
.
push
({
name
:
'
Quick connect
'
,
freeInputPattern
:
'
Connect to "%s"...
'
,
icon
:
'
fas fa-arrow-right
'
,
callback
:
query
=>
this
.
profilesService
.
openNewTabForProfile
(
this
.
telnetProfiles
.
quickConnect
(
query
)
),
})
await
this
.
selector
.
show
(
'
Select an Telnet profile
'
,
options
)
}
}
tabby-telnet/src/profiles.ts
浏览文件 @
461cd2be
...
...
@@ -8,7 +8,7 @@ import { TelnetProfile } from './session'
export
class
TelnetProfilesService
extends
ProfileProvider
{
id
=
'
telnet
'
name
=
'
Telnet
'
supportsQuickConnect
=
tru
e
supportsQuickConnect
=
fals
e
settingsComponent
=
TelnetProfileSettingsComponent
async
getBuiltinProfiles
():
Promise
<
TelnetProfile
[]
>
{
...
...
@@ -41,12 +41,7 @@ export class TelnetProfilesService extends ProfileProvider {
return
profile
.
options
.
host
?
`
${
profile
.
options
.
host
}
:
${
profile
.
options
.
port
}
`
:
''
}
quickConnect
(
query
:
string
):
TelnetProfile
|
null
{
if
(
!
query
.
startsWith
(
'
telnet:
'
))
{
return
null
}
query
=
query
.
substring
(
'
telnet:
'
.
length
)
quickConnect
(
query
:
string
):
TelnetProfile
{
let
host
=
query
let
port
=
23
if
(
host
.
includes
(
'
[
'
))
{
...
...
tabby-terminal/src/api/baseTerminalTab.component.ts
浏览文件 @
461cd2be
...
...
@@ -174,7 +174,7 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
this
.
logger
=
this
.
log
.
create
(
'
baseTerminalTab
'
)
this
.
setTitle
(
'
Terminal
'
)
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
matchedHotkey
,
async
hotkey
=>
{
this
.
subscribeUntilDestroyed
(
this
.
hotkeys
.
hotkey$
,
async
hotkey
=>
{
if
(
!
this
.
hasFocus
)
{
return
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录