Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Tabby
提交
dc9508f8
T
Tabby
项目概览
后端镜像
/
Tabby
通知
41
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,发现更多精彩内容 >>
提交
dc9508f8
编写于
7月 24, 2019
作者:
E
Eugene Pankov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lint & enabled linter on Azure pipelines
上级
b6aa1f76
变更
13
显示空白变更内容
内联
并排
Showing
13 changed file
with
34 addition
and
31 deletion
+34
-31
.eslintrc.yml
.eslintrc.yml
+1
-0
app/src/plugins.ts
app/src/plugins.ts
+1
-1
azure-pipelines.yml
azure-pipelines.yml
+3
-0
terminus-core/src/components/appRoot.component.ts
terminus-core/src/components/appRoot.component.ts
+2
-2
terminus-core/src/components/tabHeader.component.ts
terminus-core/src/components/tabHeader.component.ts
+2
-2
terminus-core/src/services/app.service.ts
terminus-core/src/services/app.service.ts
+3
-3
terminus-core/src/services/config.service.ts
terminus-core/src/services/config.service.ts
+2
-2
terminus-core/src/services/docking.service.ts
terminus-core/src/services/docking.service.ts
+6
-6
terminus-core/src/services/updater.service.ts
terminus-core/src/services/updater.service.ts
+6
-7
terminus-settings/src/components/settingsTab.component.ts
terminus-settings/src/components/settingsTab.component.ts
+4
-4
terminus-ssh/src/services/ssh.service.ts
terminus-ssh/src/services/ssh.service.ts
+1
-1
terminus-terminal/src/api/baseTerminalTab.component.ts
terminus-terminal/src/api/baseTerminalTab.component.ts
+2
-2
terminus-terminal/src/services/sessions.service.ts
terminus-terminal/src/services/sessions.service.ts
+1
-1
未找到文件。
.eslintrc.yml
浏览文件 @
dc9508f8
...
...
@@ -31,6 +31,7 @@ rules:
'
@typescript-eslint/promise-function-async'
:
off
'
@typescript-eslint/no-unnecessary-type-assertion'
:
off
'
@typescript-eslint/require-array-sort-compare'
:
off
'
@typescript-eslint/no-floating-promises'
:
off
'
@typescript-eslint/no-use-before-define'
:
-
error
-
classes
:
false
...
...
app/src/plugins.ts
浏览文件 @
dc9508f8
...
...
@@ -176,7 +176,7 @@ export async function loadPlugins (foundPlugins: PluginInfo[], progress: Progres
pluginModule
[
'
bootstrap
'
]
=
packageModule
.
bootstrap
plugins
.
push
(
pluginModule
)
console
.
timeEnd
(
label
)
await
(
new
Promise
(
x
=>
setTimeout
(
x
,
50
)
))
await
new
Promise
(
x
=>
setTimeout
(
x
,
50
))
}
catch
(
error
)
{
console
.
error
(
`Could not load
${
foundPlugin
.
name
}
:`
,
error
)
}
...
...
azure-pipelines.yml
浏览文件 @
dc9508f8
...
...
@@ -86,6 +86,9 @@ jobs:
-
script
:
yarn run build
displayName
:
'
Build'
-
script
:
yarn run lint
displayName
:
'
Lint'
-
script
:
node scripts/prepackage-plugins.js
displayName
:
'
Prepackage
plugins'
...
...
terminus-core/src/components/appRoot.component.ts
浏览文件 @
dc9508f8
...
...
@@ -128,8 +128,8 @@ export class AppRootComponent {
})
this
.
hostApp
.
windowCloseRequest$
.
subscribe
(
async
()
=>
{
await
this
.
app
.
closeAllTabs
()
&&
this
.
hostApp
.
closeWindow
()
;
})
;
await
this
.
app
.
closeAllTabs
()
&&
this
.
hostApp
.
closeWindow
()
})
if
(
window
[
'
safeModeReason
'
])
{
ngbModal
.
open
(
SafeModeModalComponent
)
...
...
terminus-core/src/components/tabHeader.component.ts
浏览文件 @
dc9508f8
...
...
@@ -10,7 +10,7 @@ import { AppService } from '../services/app.service'
import
{
HostAppService
,
Platform
}
from
'
../services/hostApp.service
'
/** @hidden */
export
interface
ISortableComponent
{
export
interface
SortableComponentProxy
{
setDragHandle
(
_
:
HTMLElement
)
}
...
...
@@ -34,7 +34,7 @@ export class TabHeaderComponent {
private
hostApp
:
HostAppService
,
private
ngbModal
:
NgbModal
,
private
hotkeys
:
HotkeysService
,
@
Inject
(
SortableComponent
)
private
parentDraggable
:
ISortableComponent
,
@
Inject
(
SortableComponent
)
private
parentDraggable
:
SortableComponentProxy
,
@
Optional
()
@
Inject
(
TabContextMenuItemProvider
)
protected
contextMenuProviders
:
TabContextMenuItemProvider
[],
)
{
this
.
hotkeys
.
matchedHotkey
.
subscribe
((
hotkey
)
=>
{
...
...
terminus-core/src/services/app.service.ts
浏览文件 @
dc9508f8
...
...
@@ -209,16 +209,16 @@ export class AppService {
/**
* Attempts to close all tabs, returns false if one of the tabs blocked closure
*/
async
closeAllTabs
()
:
Promise
<
boolean
>
{
async
closeAllTabs
():
Promise
<
boolean
>
{
for
(
const
tab
of
this
.
tabs
)
{
if
(
!
await
tab
.
canClose
())
{
return
false
;
return
false
}
}
for
(
const
tab
of
this
.
tabs
)
{
tab
.
destroy
()
}
return
true
;
return
true
}
/** @hidden */
...
...
terminus-core/src/services/config.service.ts
浏览文件 @
dc9508f8
...
...
@@ -71,8 +71,8 @@ export class ConfigProxy {
}
}
getValue
(
_key
:
string
):
any
{
}
setValue
(
_key
:
string
,
_value
:
any
)
{
}
getValue
(
_key
:
string
):
any
{
}
// eslint-disable-line @typescript-eslint/no-empty-function
setValue
(
_key
:
string
,
_value
:
any
)
{
}
// eslint-disable-line @typescript-eslint/no-empty-function
}
@
Injectable
({
providedIn
:
'
root
'
})
...
...
terminus-core/src/services/docking.service.ts
浏览文件 @
dc9508f8
...
...
@@ -31,7 +31,7 @@ export class DockingService {
const
newBounds
:
Bounds
=
{
x
:
0
,
y
:
0
,
width
:
0
,
height
:
0
}
const
fill
=
this
.
config
.
store
.
appearance
.
dockFill
<=
1
?
this
.
config
.
store
.
appearance
.
dockFill
:
1
;
const
fill
=
this
.
config
.
store
.
appearance
.
dockFill
<=
1
?
this
.
config
.
store
.
appearance
.
dockFill
:
1
const
[
minWidth
,
minHeight
]
=
this
.
hostApp
.
getWindow
().
getMinimumSize
()
if
(
dockSide
===
'
left
'
||
dockSide
===
'
right
'
)
{
...
...
@@ -64,15 +64,15 @@ export class DockingService {
}
getScreens
()
{
const
primaryDisplayID
=
this
.
electron
.
screen
.
getPrimaryDisplay
().
id
;
return
this
.
electron
.
screen
.
getAllDisplays
().
sort
((
a
,
b
)
=>
(
const
primaryDisplayID
=
this
.
electron
.
screen
.
getPrimaryDisplay
().
id
return
this
.
electron
.
screen
.
getAllDisplays
().
sort
((
a
,
b
)
=>
a
.
bounds
.
x
===
b
.
bounds
.
x
?
a
.
bounds
.
y
-
b
.
bounds
.
y
:
a
.
bounds
.
x
-
b
.
bounds
.
x
)
)
.
map
((
display
,
index
)
=>
{
).
map
((
display
,
index
)
=>
{
return
{
id
:
display
.
id
,
name
:
display
.
id
===
primaryDisplayID
?
'
Primary Display
'
:
`Display
${
index
+
1
}
`
,
}
})
;
})
}
private
repositionWindow
()
{
...
...
terminus-core/src/services/updater.service.ts
浏览文件 @
dc9508f8
...
...
@@ -29,7 +29,7 @@ export class UpdaterService {
this
.
autoUpdater
=
electron
.
remote
.
require
(
'
electron-updater
'
).
autoUpdater
this
.
autoUpdater
.
autoInstallOnAppQuit
=
!!
config
.
store
.
enableAutomaticUpdates
;
this
.
autoUpdater
.
autoInstallOnAppQuit
=
!!
config
.
store
.
enableAutomaticUpdates
this
.
autoUpdater
.
on
(
'
update-available
'
,
()
=>
{
this
.
logger
.
info
(
'
Update available
'
)
...
...
@@ -76,20 +76,19 @@ export class UpdaterService {
this
.
electron
.
shell
.
openExternal
(
this
.
updateURL
)
}
else
{
if
(
process
.
platform
===
'
win32
'
)
{
let
downloadpath
=
await
this
.
autoUpdater
.
downloadUpdate
()
;
let
downloadpath
=
await
this
.
autoUpdater
.
downloadUpdate
()
fs
.
exists
(
downloadpath
[
0
],
(
exists
)
=>
{
if
(
exists
)
{
fs
.
copyFile
(
downloadpath
[
0
],
os
.
tmpdir
()
+
'
terminus-installer-temp.exe
'
,
(
err
)
=>
{
if
(
!
err
)
{
spawn
(
os
.
tmpdir
()
+
'
terminus-installer-temp.exe
'
,
[
'
--force-run
'
],
{
detached
:
true
,
stdio
:
'
ignore
'
});
spawn
(
os
.
tmpdir
()
+
'
terminus-installer-temp.exe
'
,
[
'
--force-run
'
],
{
detached
:
true
,
stdio
:
'
ignore
'
})
}
});
})
}
})
}
else
{
await
this
.
downloaded
;
this
.
autoUpdater
.
quitAndInstall
(
false
,
true
)
;
await
this
.
downloaded
this
.
autoUpdater
.
quitAndInstall
(
false
,
true
)
}
}
}
...
...
terminus-settings/src/components/settingsTab.component.ts
浏览文件 @
dc9508f8
...
...
@@ -70,12 +70,12 @@ export class SettingsTabComponent extends BaseTabComponent {
onConfigChange
()
const
onScreenChange
=
()
=>
{
this
.
zone
.
run
(()
=>
this
.
screens
=
this
.
docking
.
getScreens
())
;
this
.
zone
.
run
(()
=>
this
.
screens
=
this
.
docking
.
getScreens
())
}
electron
.
screen
.
on
(
'
display-added
'
,
onScreenChange
)
;
electron
.
screen
.
on
(
'
display-removed
'
,
onScreenChange
)
;
electron
.
screen
.
on
(
'
display-metrics-changed
'
,
onScreenChange
)
;
electron
.
screen
.
on
(
'
display-added
'
,
onScreenChange
)
electron
.
screen
.
on
(
'
display-removed
'
,
onScreenChange
)
electron
.
screen
.
on
(
'
display-metrics-changed
'
,
onScreenChange
)
hotkeys
.
getHotkeyDescriptions
().
then
(
descriptions
=>
{
this
.
hotkeyDescriptions
=
descriptions
...
...
terminus-ssh/src/services/ssh.service.ts
浏览文件 @
dc9508f8
...
...
@@ -138,7 +138,7 @@ export class SSHService {
let
agent
:
string
=
null
if
(
this
.
hostApp
.
platform
===
Platform
.
Windows
)
{
const
pageantRunning
=
new
Promise
<
boolean
>
(
resolve
=>
{
windowsProcessTreeNative
.
getProcessList
(
list
=>
{
windowsProcessTreeNative
.
getProcessList
(
list
=>
{
// eslint-disable-line block-scoped-var
resolve
(
list
.
some
(
x
=>
x
.
name
===
'
pageant.exe
'
))
},
0
)
})
...
...
terminus-terminal/src/api/baseTerminalTab.component.ts
浏览文件 @
dc9508f8
...
...
@@ -15,7 +15,7 @@ import { TerminalContextMenuItemProvider } from './contextMenuProvider'
/** @hidden */
export
interface
IToastrService
{
export
interface
ToastrServiceProxy
{
info
(
_
:
string
)
}
/**
...
...
@@ -80,7 +80,7 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
protected
sessions
:
SessionsService
,
protected
electron
:
ElectronService
,
protected
terminalContainersService
:
TerminalFrontendService
,
@
Inject
(
ToastrService
)
protected
toastr
:
IToastrService
,
@
Inject
(
ToastrService
)
protected
toastr
:
ToastrServiceProxy
,
protected
log
:
LogService
,
@
Optional
()
@
Inject
(
TerminalDecorator
)
protected
decorators
:
TerminalDecorator
[],
@
Optional
()
@
Inject
(
TerminalContextMenuItemProvider
)
protected
contextMenuProviders
:
TerminalContextMenuItemProvider
[],
...
...
terminus-terminal/src/services/sessions.service.ts
浏览文件 @
dc9508f8
...
...
@@ -284,7 +284,7 @@ export class Session extends BaseSession {
}
catch
(
e
)
{
return
null
}
let
cwd
=
lines
[
(
lines
[
1
]
===
'
fcwd
'
)
?
2
:
1
].
substring
(
1
)
let
cwd
=
lines
[
lines
[
1
]
===
'
fcwd
'
?
2
:
1
].
substring
(
1
)
if
(
cwd
.
startsWith
(
catalinaDataVolumePrefix
))
{
cwd
=
cwd
.
substring
(
catalinaDataVolumePrefix
.
length
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录