Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Tabby
提交
39732908
T
Tabby
项目概览
后端镜像
/
Tabby
通知
26
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,体验更适合开发者的 AI 搜索 >>
提交
39732908
编写于
12月 19, 2019
作者:
E
Eugene Pankov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ivy test
上级
b6c97ffa
变更
34
展开全部
隐藏空白更改
内联
并排
Showing
34 changed file
with
1513 addition
and
463 deletion
+1513
-463
app/lib/index.ts
app/lib/index.ts
+1
-1
app/lib/window.ts
app/lib/window.ts
+1
-1
app/package.json
app/package.json
+11
-10
app/src/app.module.ts
app/src/app.module.ts
+34
-13
app/src/entry.preload.ts
app/src/entry.preload.ts
+69
-0
app/src/entry.ts
app/src/entry.ts
+7
-9
app/src/plugins.ts
app/src/plugins.ts
+1
-46
app/src/root.component.ts
app/src/root.component.ts
+0
-6
app/tsconfig.json
app/tsconfig.json
+11
-3
app/webpack.config.js
app/webpack.config.js
+8
-7
app/yarn.lock
app/yarn.lock
+375
-64
package.json
package.json
+7
-3
scripts/install-deps.js
scripts/install-deps.js
+0
-3
scripts/vars.js
scripts/vars.js
+0
-4
terminus-core/src/components/appRoot.component.pug
terminus-core/src/components/appRoot.component.pug
+1
-1
terminus-core/src/components/appRoot.component.ts
terminus-core/src/components/appRoot.component.ts
+2
-2
terminus-core/src/components/renameTabModal.component.ts
terminus-core/src/components/renameTabModal.component.ts
+1
-1
terminus-core/src/components/safeModeModal.component.ts
terminus-core/src/components/safeModeModal.component.ts
+1
-1
terminus-core/src/components/splitTab.component.ts
terminus-core/src/components/splitTab.component.ts
+1
-1
terminus-core/src/components/splitTabSpanner.component.ts
terminus-core/src/components/splitTabSpanner.component.ts
+1
-1
terminus-core/src/components/startPage.component.ts
terminus-core/src/components/startPage.component.ts
+2
-2
terminus-core/src/components/tabBody.component.ts
terminus-core/src/components/tabBody.component.ts
+3
-3
terminus-core/src/components/tabHeader.component.ts
terminus-core/src/components/tabHeader.component.ts
+2
-2
terminus-core/src/components/titleBar.component.ts
terminus-core/src/components/titleBar.component.ts
+6
-3
terminus-core/src/components/toggle.component.ts
terminus-core/src/components/toggle.component.ts
+1
-1
terminus-core/src/components/welcomeTab.component.ts
terminus-core/src/components/welcomeTab.component.ts
+2
-2
terminus-core/src/components/windowControls.component.ts
terminus-core/src/components/windowControls.component.ts
+2
-2
terminus-core/src/index.ts
terminus-core/src/index.ts
+18
-17
terminus-core/src/tabContextMenu.ts
terminus-core/src/tabContextMenu.ts
+3
-3
terminus-core/tsconfig.json
terminus-core/tsconfig.json
+4
-1
terminus-core/webpack.config.js
terminus-core/webpack.config.js
+29
-16
terminus-ssh/src/components/promptModal.component.ts
terminus-ssh/src/components/promptModal.component.ts
+1
-0
tsconfig.json
tsconfig.json
+5
-1
yarn.lock
yarn.lock
+903
-233
未找到文件。
app/lib/index.ts
浏览文件 @
39732908
...
@@ -3,7 +3,7 @@ import './lru'
...
@@ -3,7 +3,7 @@ import './lru'
import
{
app
,
ipcMain
,
Menu
}
from
'
electron
'
import
{
app
,
ipcMain
,
Menu
}
from
'
electron
'
import
{
parseArgs
}
from
'
./cli
'
import
{
parseArgs
}
from
'
./cli
'
import
{
Application
}
from
'
./app
'
import
{
Application
}
from
'
./app
'
import
electronDebug
=
require
(
'
electron-debug
'
)
import
*
as
electronDebug
from
'
electron-debug
'
if
(
!
process
.
env
.
TERMINUS_PLUGINS
)
{
if
(
!
process
.
env
.
TERMINUS_PLUGINS
)
{
process
.
env
.
TERMINUS_PLUGINS
=
''
process
.
env
.
TERMINUS_PLUGINS
=
''
...
...
app/lib/window.ts
浏览文件 @
39732908
import
{
Subject
,
Observable
}
from
'
rxjs
'
import
{
Subject
,
Observable
}
from
'
rxjs
'
import
{
debounceTime
}
from
'
rxjs/operators
'
import
{
debounceTime
}
from
'
rxjs/operators
'
import
{
BrowserWindow
,
app
,
ipcMain
,
Rectangle
,
screen
}
from
'
electron
'
import
{
BrowserWindow
,
app
,
ipcMain
,
Rectangle
,
screen
}
from
'
electron
'
import
ElectronConfig
=
require
(
'
electron-config
'
)
import
*
as
ElectronConfig
from
'
electron-config
'
import
*
as
os
from
'
os
'
import
*
as
os
from
'
os
'
import
*
as
path
from
'
path
'
import
*
as
path
from
'
path
'
...
...
app/package.json
浏览文件 @
39732908
...
@@ -13,14 +13,14 @@
...
@@ -13,14 +13,14 @@
"watch"
:
"webpack --progress --color --watch"
"watch"
:
"webpack --progress --color --watch"
},
},
"dependencies"
:
{
"dependencies"
:
{
"@angular/animations"
:
"
7.2.8
"
,
"@angular/animations"
:
"
9.0.0-rc.5
"
,
"@angular/common"
:
"
7.2.8
"
,
"@angular/common"
:
"
9.0.0-rc.5
"
,
"@angular/compiler"
:
"
7.2.8
"
,
"@angular/compiler"
:
"
9.0.0-rc.5
"
,
"@angular/core"
:
"
7.2.8
"
,
"@angular/core"
:
"
9.0.0-rc.5
"
,
"@angular/forms"
:
"
7.2.8
"
,
"@angular/forms"
:
"
9.0.0-rc.5
"
,
"@angular/platform-browser"
:
"
7.2.8
"
,
"@angular/platform-browser"
:
"
9.0.0-rc.5
"
,
"@angular/platform-browser-dynamic"
:
"
7.2.8
"
,
"@angular/platform-browser-dynamic"
:
"
9.0.0-rc.5
"
,
"@ng-bootstrap/ng-bootstrap"
:
"^
4.2.2
"
,
"@ng-bootstrap/ng-bootstrap"
:
"^
5.1.4
"
,
"devtron"
:
"1.4.0"
,
"devtron"
:
"1.4.0"
,
"electron-config"
:
"2.0.0"
,
"electron-config"
:
"2.0.0"
,
"electron-debug"
:
"^3.0.1"
,
"electron-debug"
:
"^3.0.1"
,
...
@@ -30,14 +30,14 @@
...
@@ -30,14 +30,14 @@
"js-yaml"
:
"3.13.1"
,
"js-yaml"
:
"3.13.1"
,
"keytar"
:
"^5.0.0"
,
"keytar"
:
"^5.0.0"
,
"mz"
:
"^2.7.0"
,
"mz"
:
"^2.7.0"
,
"ngx-toastr"
:
"^1
0.2.0
"
,
"ngx-toastr"
:
"^1
1.2.1
"
,
"node-pty"
:
"^0.10.0-beta2"
,
"node-pty"
:
"^0.10.0-beta2"
,
"npm"
:
"6.9.0"
,
"npm"
:
"6.9.0"
,
"path"
:
"0.12.7"
,
"path"
:
"0.12.7"
,
"rxjs"
:
"^6.5.3"
,
"rxjs"
:
"^6.5.3"
,
"rxjs-compat"
:
"^6.5.3"
,
"rxjs-compat"
:
"^6.5.3"
,
"yargs"
:
"^15.0.2"
,
"yargs"
:
"^15.0.2"
,
"zone.js"
:
"^0.
8.29
"
"zone.js"
:
"^0.
10.2
"
},
},
"optionalDependencies"
:
{
"optionalDependencies"
:
{
"macos-native-processlist"
:
"^1.0.2"
,
"macos-native-processlist"
:
"^1.0.2"
,
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
"windows-swca"
:
"^2.0.2"
"windows-swca"
:
"^2.0.2"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"@angular/localize"
:
"^9.0.0-rc.7"
,
"@types/mz"
:
"0.0.32"
,
"@types/mz"
:
"0.0.32"
,
"@types/node"
:
"12.7.12"
,
"@types/node"
:
"12.7.12"
,
"node-abi"
:
"^2.13.0"
"node-abi"
:
"^2.13.0"
...
...
app/src/app.module.ts
浏览文件 @
39732908
import
{
NgModule
}
from
'
@angular/core
'
import
{
NgModule
,
Compiler
,
Inject
,
Injector
,
ɵcreateInjector
as
createInjector
}
from
'
@angular/core
'
import
'
@angular/localize/init
'
import
{
CommonModule
}
from
'
@angular/common
'
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
import
{
NgbModule
}
from
'
@ng-bootstrap/ng-bootstrap
'
import
{
NgbModule
}
from
'
@ng-bootstrap/ng-bootstrap
'
import
{
ToastrModule
}
from
'
ngx-toastr
'
import
{
ToastrModule
}
from
'
ngx-toastr
'
export
function
getRootModule
(
plugins
:
any
[])
{
@
NgModule
(
{
const
imports
=
[
imports
:
[
BrowserModule
,
BrowserModule
,
...
plugins
,
CommonModule
,
NgbModule
.
forRoot
()
,
NgbModule
,
ToastrModule
.
forRoot
({
ToastrModule
.
forRoot
({
positionClass
:
'
toast-bottom-center
'
,
positionClass
:
'
toast-bottom-center
'
,
toastClass
:
'
toast
'
,
toastClass
:
'
toast
'
,
preventDuplicates
:
true
,
preventDuplicates
:
true
,
extendedTimeOut
:
5000
,
extendedTimeOut
:
5000
,
}),
}),
]
],
})
export
class
RootModule
{
constructor
(
private
compiler
:
Compiler
,
private
injector
:
Injector
,
@
Inject
(
'
plugins
'
)
private
plugins
:
any
[],
)
{
}
async
ngDoBootstrap
(
app
)
{
console
.
log
(
'
bootstrap
'
,
app
)
for
(
let
plugin
of
this
.
plugins
)
{
console
.
log
(
plugin
)
// try {
const
injector
=
createInjector
(
plugin
,
this
.
injector
)
console
.
log
(
injector
)
const
module
=
await
this
.
compiler
.
compileModuleAsync
(
plugin
)
console
.
log
(
module
)
// } catch (e) {
// console.error('Failed loading', plugin, e)
// }
}
}
}
export
function
setupRootModule
(
plugins
:
any
[])
{
const
bootstrap
=
[
const
bootstrap
=
[
...
plugins
.
filter
(
x
=>
x
.
bootstrap
).
map
(
x
=>
x
.
bootstrap
),
...
plugins
.
filter
(
x
=>
x
.
bootstrap
).
map
(
x
=>
x
.
bootstrap
),
]
]
...
@@ -22,11 +50,4 @@ export function getRootModule (plugins: any[]) {
...
@@ -22,11 +50,4 @@ export function getRootModule (plugins: any[]) {
if
(
bootstrap
.
length
===
0
)
{
if
(
bootstrap
.
length
===
0
)
{
throw
new
Error
(
'
Did not find any bootstrap components. Are there any plugins installed?
'
)
throw
new
Error
(
'
Did not find any bootstrap components. Are there any plugins installed?
'
)
}
}
@
NgModule
({
imports
,
bootstrap
,
})
class
RootModule
{
}
// eslint-disable-line @typescript-eslint/no-extraneous-class
return
RootModule
}
}
app/src/entry.preload.ts
浏览文件 @
39732908
import
'
../lib/lru
'
import
'
../lib/lru
'
import
'
core-js/proposals/reflect-metadata
'
import
'
source-sans-pro/source-sans-pro.css
'
import
'
source-sans-pro/source-sans-pro.css
'
import
'
source-code-pro/source-code-pro.css
'
import
'
source-code-pro/source-code-pro.css
'
import
'
@fortawesome/fontawesome-free/css/solid.css
'
import
'
@fortawesome/fontawesome-free/css/solid.css
'
...
@@ -6,3 +7,71 @@ import '@fortawesome/fontawesome-free/css/brands.css'
...
@@ -6,3 +7,71 @@ import '@fortawesome/fontawesome-free/css/brands.css'
import
'
@fortawesome/fontawesome-free/css/fontawesome.css
'
import
'
@fortawesome/fontawesome-free/css/fontawesome.css
'
import
'
ngx-toastr/toastr.css
'
import
'
ngx-toastr/toastr.css
'
import
'
./preload.scss
'
import
'
./preload.scss
'
import
*
as
path
from
'
path
'
const
nodeModule
=
require
(
'
module
'
)
// eslint-disable-line @typescript-eslint/no-var-requires
const
nodeRequire
=
(
global
as
any
).
require
const
builtinModules
=
[
'
@angular/animations
'
,
'
@angular/common
'
,
'
@angular/compiler
'
,
'
@angular/core
'
,
'
@angular/forms
'
,
'
@angular/localize
'
,
'
@angular/platform-browser
'
,
'
@angular/platform-browser-dynamic
'
,
'
@ng-bootstrap/ng-bootstrap
'
,
'
ngx-toastr
'
,
'
rxjs
'
,
'
rxjs/operators
'
,
'
rxjs/internal/observable/fromEvent
'
,
'
rxjs/internal/observable/merge
'
,
'
rxjs-compat/Subject
'
,
'
zone.js/dist/zone.js
'
,
'
terminus-core
'
,
// 'terminus-settings',
// 'terminus-terminal',
]
const
cachedBuiltinModules
=
{}
if
(
process
.
env
.
TERMINUS_DEV
)
{
console
.
info
(
path
.
dirname
(
require
(
'
electron
'
).
remote
.
app
.
getAppPath
()))
nodeModule
.
globalPaths
.
unshift
(
path
.
dirname
(
require
(
'
electron
'
).
remote
.
app
.
getAppPath
()))
nodeModule
.
globalPaths
.
unshift
(
path
.
join
(
require
(
'
electron
'
).
remote
.
app
.
getAppPath
(),
'
node_modules
'
))
}
const
originalRequire
=
(
global
as
any
).
require
;(
global
as
any
).
require
=
function
(
query
:
string
)
{
if
(
cachedBuiltinModules
[
query
])
{
return
cachedBuiltinModules
[
query
]
}
return
originalRequire
.
apply
(
this
,
arguments
)
}
const
originalModuleRequire
=
nodeModule
.
prototype
.
require
nodeModule
.
prototype
.
require
=
function
(
query
:
string
)
{
if
(
cachedBuiltinModules
[
query
])
{
return
cachedBuiltinModules
[
query
]
}
return
originalModuleRequire
.
call
(
this
,
query
)
}
global
[
'
require
'
].
resolve
=
originalRequire
.
resolve
nodeModule
.
prototype
.
require
.
resolve
=
originalModuleRequire
.
resolve
builtinModules
.
forEach
(
m
=>
{
const
label
=
'
Caching
'
+
m
console
.
time
(
label
)
try
{
console
.
log
(
m
+
'
/__ivy_ngcc__/fesm5/
'
+
m
.
split
(
'
/
'
)[
1
]
+
'
.js
'
)
cachedBuiltinModules
[
m
]
=
nodeRequire
(
m
+
'
/__ivy_ngcc__/fesm5/
'
+
m
.
split
(
'
/
'
)[
1
]
+
'
.js
'
)
console
.
log
(
'
loaded ivy
'
)
}
catch
(
e
)
{
console
.
error
(
e
)
cachedBuiltinModules
[
m
]
=
nodeRequire
(
m
)
}
console
.
timeEnd
(
label
)
})
app/src/entry.ts
浏览文件 @
39732908
import
'
zone.js
'
import
'
core-js/proposals/reflect-metadata
'
import
'
rxjs
'
import
*
as
isDev
from
'
electron-is-dev
'
import
*
as
isDev
from
'
electron-is-dev
'
import
'
./global.scss
'
import
'
./global.scss
'
...
@@ -10,7 +6,7 @@ import './toastr.scss'
...
@@ -10,7 +6,7 @@ import './toastr.scss'
import
{
enableProdMode
,
NgModuleRef
}
from
'
@angular/core
'
import
{
enableProdMode
,
NgModuleRef
}
from
'
@angular/core
'
import
{
platformBrowserDynamic
}
from
'
@angular/platform-browser-dynamic
'
import
{
platformBrowserDynamic
}
from
'
@angular/platform-browser-dynamic
'
import
{
get
RootModule
}
from
'
./app.module
'
import
{
setupRootModule
,
RootModule
}
from
'
./app.module
'
import
{
findPlugins
,
loadPlugins
,
PluginInfo
}
from
'
./plugins
'
import
{
findPlugins
,
loadPlugins
,
PluginInfo
}
from
'
./plugins
'
// Always land on the start view
// Always land on the start view
...
@@ -32,12 +28,14 @@ async function bootstrap (plugins: PluginInfo[], safeMode = false): Promise<NgMo
...
@@ -32,12 +28,14 @@ async function bootstrap (plugins: PluginInfo[], safeMode = false): Promise<NgMo
if
(
safeMode
)
{
if
(
safeMode
)
{
plugins
=
plugins
.
filter
(
x
=>
x
.
isBuiltin
)
plugins
=
plugins
.
filter
(
x
=>
x
.
isBuiltin
)
}
}
const
plugin
s
Modules
=
await
loadPlugins
(
plugins
,
(
current
,
total
)
=>
{
const
pluginModules
=
await
loadPlugins
(
plugins
,
(
current
,
total
)
=>
{
(
document
.
querySelector
(
'
.progress .bar
'
)
as
HTMLElement
).
style
.
width
=
`
${
100
*
current
/
total
}
%`
// eslint-disable-line
(
document
.
querySelector
(
'
.progress .bar
'
)
as
HTMLElement
).
style
.
width
=
`
${
100
*
current
/
total
}
%`
// eslint-disable-line
})
})
const
module
=
getRootModule
(
pluginsModules
)
setupRootModule
(
pluginModules
)
window
[
'
rootModule
'
]
=
module
window
[
'
rootModule
'
]
=
RootModule
return
platformBrowserDynamic
().
bootstrapModule
(
module
)
return
platformBrowserDynamic
([
{
provide
:
'
plugins
'
,
useValue
:
pluginModules
},
]).
bootstrapModule
(
RootModule
)
}
}
findPlugins
().
then
(
async
plugins
=>
{
findPlugins
().
then
(
async
plugins
=>
{
...
...
app/src/plugins.ts
浏览文件 @
39732908
...
@@ -14,9 +14,6 @@ function normalizePath (path: string): string {
...
@@ -14,9 +14,6 @@ function normalizePath (path: string): string {
global
[
'
module
'
].
paths
.
map
((
x
:
string
)
=>
nodeModule
.
globalPaths
.
push
(
normalizePath
(
x
)))
global
[
'
module
'
].
paths
.
map
((
x
:
string
)
=>
nodeModule
.
globalPaths
.
push
(
normalizePath
(
x
)))
if
(
process
.
env
.
TERMINUS_DEV
)
{
nodeModule
.
globalPaths
.
unshift
(
path
.
dirname
(
require
(
'
electron
'
).
remote
.
app
.
getAppPath
()))
}
const
builtinPluginsPath
=
process
.
env
.
TERMINUS_DEV
?
path
.
dirname
(
require
(
'
electron
'
).
remote
.
app
.
getAppPath
())
:
path
.
join
((
process
as
any
).
resourcesPath
,
'
builtin-plugins
'
)
const
builtinPluginsPath
=
process
.
env
.
TERMINUS_DEV
?
path
.
dirname
(
require
(
'
electron
'
).
remote
.
app
.
getAppPath
())
:
path
.
join
((
process
as
any
).
resourcesPath
,
'
builtin-plugins
'
)
...
@@ -52,49 +49,6 @@ export interface PluginInfo {
...
@@ -52,49 +49,6 @@ export interface PluginInfo {
info
?:
any
info
?:
any
}
}
const
builtinModules
=
[
'
@angular/animations
'
,
'
@angular/common
'
,
'
@angular/compiler
'
,
'
@angular/core
'
,
'
@angular/forms
'
,
'
@angular/platform-browser
'
,
'
@angular/platform-browser-dynamic
'
,
'
@ng-bootstrap/ng-bootstrap
'
,
'
ngx-toastr
'
,
'
rxjs
'
,
'
rxjs/operators
'
,
'
rxjs-compat/Subject
'
,
'
terminus-core
'
,
'
terminus-settings
'
,
'
terminus-terminal
'
,
'
zone.js/dist/zone.js
'
,
]
const
cachedBuiltinModules
=
{}
builtinModules
.
forEach
(
m
=>
{
const
label
=
'
Caching
'
+
m
console
.
time
(
label
)
cachedBuiltinModules
[
m
]
=
nodeRequire
(
m
)
console
.
timeEnd
(
label
)
})
const
originalRequire
=
(
global
as
any
).
require
;(
global
as
any
).
require
=
function
(
query
:
string
)
{
if
(
cachedBuiltinModules
[
query
])
{
return
cachedBuiltinModules
[
query
]
}
return
originalRequire
.
apply
(
this
,
arguments
)
}
const
originalModuleRequire
=
nodeModule
.
prototype
.
require
nodeModule
.
prototype
.
require
=
function
(
query
:
string
)
{
if
(
cachedBuiltinModules
[
query
])
{
return
cachedBuiltinModules
[
query
]
}
return
originalModuleRequire
.
call
(
this
,
query
)
}
export
async
function
findPlugins
():
Promise
<
PluginInfo
[]
>
{
export
async
function
findPlugins
():
Promise
<
PluginInfo
[]
>
{
const
paths
=
nodeModule
.
globalPaths
const
paths
=
nodeModule
.
globalPaths
let
foundPlugins
:
PluginInfo
[]
=
[]
let
foundPlugins
:
PluginInfo
[]
=
[]
...
@@ -167,6 +121,7 @@ export async function loadPlugins (foundPlugins: PluginInfo[], progress: Progres
...
@@ -167,6 +121,7 @@ export async function loadPlugins (foundPlugins: PluginInfo[], progress: Progres
progress
(
0
,
1
)
progress
(
0
,
1
)
let
index
=
0
let
index
=
0
for
(
const
foundPlugin
of
foundPlugins
)
{
for
(
const
foundPlugin
of
foundPlugins
)
{
if
(
foundPlugin
.
name
!==
'
core
'
)
continue
console
.
info
(
`Loading
${
foundPlugin
.
name
}
:
${
nodeRequire
.
resolve
(
foundPlugin
.
path
)}
`
)
console
.
info
(
`Loading
${
foundPlugin
.
name
}
:
${
nodeRequire
.
resolve
(
foundPlugin
.
path
)}
`
)
progress
(
index
,
foundPlugins
.
length
)
progress
(
index
,
foundPlugins
.
length
)
try
{
try
{
...
...
app/src/root.component.ts
已删除
100644 → 0
浏览文件 @
b6c97ffa
import
{
Component
}
from
'
@angular/core
'
@
Component
({
template
:
'
<app-root></app-root>
'
,
})
export
class
RootComponent
{
}
// eslint-disable-line @typescript-eslint/no-extraneous-class
app/tsconfig.json
浏览文件 @
39732908
{
{
"compilerOptions"
:
{
"compilerOptions"
:
{
"baseUrl"
:
"./src"
,
"baseUrl"
:
"./src"
,
"module"
:
"commonjs"
,
"module"
:
"es2015"
,
"moduleResolution"
:
"node"
,
"target"
:
"es2015"
,
"target"
:
"es2015"
,
"declaration"
:
false
,
"declaration"
:
false
,
"noImplicitAny"
:
false
,
"noImplicitAny"
:
false
,
...
@@ -19,7 +20,10 @@
...
@@ -19,7 +20,10 @@
"es2015.iterable"
,
"es2015.iterable"
,
"es2017"
,
"es2017"
,
"es7"
"es7"
]
],
"paths"
:
{
"*"
:
[
"../../app/node_modules/*"
]
}
},
},
"compileOnSave"
:
false
,
"compileOnSave"
:
false
,
"exclude"
:
[
"exclude"
:
[
...
@@ -28,5 +32,9 @@
...
@@ -28,5 +32,9 @@
"*/node_modules"
,
"*/node_modules"
,
"terminus*"
,
"terminus*"
,
"platforms"
"platforms"
]
],
"angularCompilerOptions"
:
{
"enableIvy"
:
true
,
"disableTypeScriptVersionCheck"
:
true
}
}
}
app/webpack.config.js
浏览文件 @
39732908
const
path
=
require
(
'
path
'
)
const
path
=
require
(
'
path
'
)
const
webpack
=
require
(
'
webpack
'
)
const
webpack
=
require
(
'
webpack
'
)
const
{
AngularCompilerPlugin
}
=
require
(
'
@ngtools/webpack
'
)
module
.
exports
=
{
module
.
exports
=
{
name
:
'
terminus
'
,
name
:
'
terminus
'
,
...
@@ -28,13 +29,8 @@ module.exports = {
...
@@ -28,13 +29,8 @@ module.exports = {
module
:
{
module
:
{
rules
:
[
rules
:
[
{
{
test
:
/
\.
ts$/
,
test
:
/
(?:\.
ngfactory
\.
js|
\.
ngfactory|
\.
ngstyle
\.
js|
\.
ts
)
$/
,
use
:
{
loader
:
'
@ngtools/webpack
'
,
loader
:
'
awesome-typescript-loader
'
,
options
:
{
configFileName
:
path
.
resolve
(
__dirname
,
'
tsconfig.json
'
),
},
},
},
},
{
test
:
/
\.
scss$/
,
use
:
[
'
style-loader
'
,
'
css-loader
'
,
'
sass-loader
'
]
},
{
test
:
/
\.
scss$/
,
use
:
[
'
style-loader
'
,
'
css-loader
'
,
'
sass-loader
'
]
},
{
test
:
/
\.
css$/
,
use
:
[
'
style-loader
'
,
'
css-loader
'
,
'
sass-loader
'
]
},
{
test
:
/
\.
css$/
,
use
:
[
'
style-loader
'
,
'
css-loader
'
,
'
sass-loader
'
]
},
...
@@ -82,5 +78,10 @@ module.exports = {
...
@@ -82,5 +78,10 @@ module.exports = {
new
webpack
.
DefinePlugin
({
new
webpack
.
DefinePlugin
({
'
process.type
'
:
'
"renderer"
'
'
process.type
'
:
'
"renderer"
'
}),
}),
new
AngularCompilerPlugin
({
tsConfigPath
:
path
.
resolve
(
__dirname
,
'
tsconfig.json
'
),
entryModule
:
'
src/index#default
'
,
sourceMap
:
true
,
}),
],
],
}
}
app/yarn.lock
浏览文件 @
39732908
此差异已折叠。
点击以展开。
package.json
浏览文件 @
39732908
{
{
"devDependencies"
:
{
"devDependencies"
:
{
"
@angular/compiler
"
:
"
9.0.0-rc.5
"
,
"
@angular/compiler-cli
"
:
"
9.0.0-rc.5
"
,
"
@angular/core
"
:
"
9.0.0-rc.5
"
,
"
@fortawesome/fontawesome-free
"
:
"
^5.11.2
"
,
"
@fortawesome/fontawesome-free
"
:
"
^5.11.2
"
,
"
@ngtools/webpack
"
:
"
9.0.0-rc.5
"
,
"
@sentry/cli
"
:
"
^1.49.0
"
,
"
@sentry/cli
"
:
"
^1.49.0
"
,
"
@sentry/electron
"
:
"
^1.0.0
"
,
"
@sentry/electron
"
:
"
^1.0.0
"
,
"
@types/electron-config
"
:
"
^3.2.2
"
,
"
@types/electron-config
"
:
"
^3.2.2
"
,
...
@@ -14,7 +18,7 @@
...
@@ -14,7 +18,7 @@
"
awesome-typescript-loader
"
:
"
^5.0.0
"
,
"
awesome-typescript-loader
"
:
"
^5.0.0
"
,
"
core-js
"
:
"
^3.4.2
"
,
"
core-js
"
:
"
^3.4.2
"
,
"
cross-env
"
:
"
6.0.3
"
,
"
cross-env
"
:
"
6.0.3
"
,
"
css-loader
"
:
"
3.
2.1
"
,
"
css-loader
"
:
"
3.
4.0
"
,
"
electron
"
:
"
^7.1.3
"
,
"
electron
"
:
"
^7.1.3
"
,
"
electron-builder
"
:
"
22.1.0
"
,
"
electron-builder
"
:
"
22.1.0
"
,
"
electron-download
"
:
"
^4.1.1
"
,
"
electron-download
"
:
"
^4.1.1
"
,
...
@@ -49,8 +53,8 @@
...
@@ -49,8 +53,8 @@
"
typedoc
"
:
"
^0.15.3
"
,
"
typedoc
"
:
"
^0.15.3
"
,
"
typescript
"
:
"
^3.7.3
"
,
"
typescript
"
:
"
^3.7.3
"
,
"
url-loader
"
:
"
^3.0.0
"
,
"
url-loader
"
:
"
^3.0.0
"
,
"
val-loader
"
:
"
2.
0.1
"
,
"
val-loader
"
:
"
2.
1.0
"
,
"
webpack
"
:
"
^5.0.0-beta.7
"
,
"
webpack
"
:
"
4
"
,
"
webpack-cli
"
:
"
^3.3.10
"
,
"
webpack-cli
"
:
"
^3.3.10
"
,
"
yaml-loader
"
:
"
0.5.0
"
"
yaml-loader
"
:
"
0.5.0
"
},
},
...
...
scripts/install-deps.js
浏览文件 @
39732908
...
@@ -25,8 +25,5 @@ if (['darwin', 'linux'].includes(process.platform)) {
...
@@ -25,8 +25,5 @@ if (['darwin', 'linux'].includes(process.platform)) {
for
(
let
x
of
vars
.
builtinPlugins
)
{
for
(
let
x
of
vars
.
builtinPlugins
)
{
sh
.
ln
(
'
-fs
'
,
'
../
'
+
x
,
x
)
sh
.
ln
(
'
-fs
'
,
'
../
'
+
x
,
x
)
}
}
for
(
let
x
of
vars
.
bundledModules
)
{
sh
.
ln
(
'
-fs
'
,
'
../app/node_modules/
'
+
x
,
x
)
}
sh
.
cd
(
'
..
'
)
sh
.
cd
(
'
..
'
)
}
}
scripts/vars.js
浏览文件 @
39732908
...
@@ -22,8 +22,4 @@ exports.builtinPlugins = [
...
@@ -22,8 +22,4 @@ exports.builtinPlugins = [
'
terminus-plugin-manager
'
,
'
terminus-plugin-manager
'
,
'
terminus-ssh
'
,
'
terminus-ssh
'
,
]
]
exports
.
bundledModules
=
[
'
@angular
'
,
'
@ng-bootstrap
'
,
]
exports
.
electronVersion
=
electronInfo
.
version
exports
.
electronVersion
=
electronInfo
.
version
terminus-core/src/components/appRoot.component.pug
浏览文件 @
39732908
...
@@ -10,8 +10,8 @@ title-bar(
...
@@ -10,8 +10,8 @@ title-bar(
.inset.background(*ngIf='hostApp.platform == Platform.macOS && config.store.appearance.frame == "thin" && config.store.appearance.tabsLocation == "top"')
.inset.background(*ngIf='hostApp.platform == Platform.macOS && config.store.appearance.frame == "thin" && config.store.appearance.tabsLocation == "top"')
.tabs(
.tabs(
dnd-sortable-container,
dnd-sortable-container,
[sortableData]='app.tabs',
)
)
//- [sortableData]='app.tabs',
tab-header(
tab-header(
*ngFor='let tab of app.tabs; let idx = index',
*ngFor='let tab of app.tabs; let idx = index',
dnd-sortable,
dnd-sortable,
...
...
terminus-core/src/components/appRoot.component.ts
浏览文件 @
39732908
...
@@ -20,8 +20,8 @@ import { AppService, ToolbarButton, ToolbarButtonProvider } from '../api'
...
@@ -20,8 +20,8 @@ import { AppService, ToolbarButton, ToolbarButtonProvider } from '../api'
/** @hidden */
/** @hidden */
@
Component
({
@
Component
({
selector
:
'
app-root
'
,
selector
:
'
app-root
'
,
template
:
require
(
'
./appRoot.component.pug
'
)
,
template
Url
:
'
./appRoot.component.pug
'
,
style
s
:
[
require
(
'
./appRoot.component.scss
'
)
],
style
Urls
:
[
'
./appRoot.component.scss
'
],
animations
:
[
animations
:
[
trigger
(
'
animateTab
'
,
[
trigger
(
'
animateTab
'
,
[
state
(
'
in
'
,
style
({
state
(
'
in
'
,
style
({
...
...
terminus-core/src/components/renameTabModal.component.ts
浏览文件 @
39732908
...
@@ -4,7 +4,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
...
@@ -4,7 +4,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
/** @hidden */
/** @hidden */
@
Component
({
@
Component
({
selector
:
'
rename-tab-modal
'
,
selector
:
'
rename-tab-modal
'
,
template
:
require
(
'
./renameTabModal.component.pug
'
)
,
template
Url
:
'
./renameTabModal.component.pug
'
,
})
})
export
class
RenameTabModalComponent
{
export
class
RenameTabModalComponent
{
@
Input
()
value
:
string
@
Input
()
value
:
string
...
...
terminus-core/src/components/safeModeModal.component.ts
浏览文件 @
39732908
...
@@ -3,7 +3,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
...
@@ -3,7 +3,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
/** @hidden */
/** @hidden */
@
Component
({
@
Component
({
template
:
require
(
'
./safeModeModal.component.pug
'
)
,
template
Url
:
'
./safeModeModal.component.pug
'
,
})
})
export
class
SafeModeModalComponent
{
export
class
SafeModeModalComponent
{
@
Input
()
error
:
Error
@
Input
()
error
:
Error
...
...
terminus-core/src/components/splitTab.component.ts
浏览文件 @
39732908
...
@@ -138,7 +138,7 @@ export interface SplitSpannerInfo {
...
@@ -138,7 +138,7 @@ export interface SplitSpannerInfo {
(change)='onSpannerAdjusted(spanner)'
(change)='onSpannerAdjusted(spanner)'
></split-tab-spanner>
></split-tab-spanner>
`
,
`
,
style
s
:
[
require
(
'
./splitTab.component.scss
'
)
],
style
Urls
:
[
'
./splitTab.component.scss
'
],
})
})
export
class
SplitTabComponent
extends
BaseTabComponent
implements
OnInit
,
OnDestroy
{
export
class
SplitTabComponent
extends
BaseTabComponent
implements
OnInit
,
OnDestroy
{
/** @hidden */
/** @hidden */
...
...
terminus-core/src/components/splitTabSpanner.component.ts
浏览文件 @
39732908
...
@@ -5,7 +5,7 @@ import { SplitContainer } from './splitTab.component'
...
@@ -5,7 +5,7 @@ import { SplitContainer } from './splitTab.component'
@
Component
({
@
Component
({
selector
:
'
split-tab-spanner
'
,
selector
:
'
split-tab-spanner
'
,
template
:
''
,
template
:
''
,
style
s
:
[
require
(
'
./splitTabSpanner.component.scss
'
)
],
style
Urls
:
[
'
./splitTabSpanner.component.scss
'
],
})
})
export
class
SplitTabSpannerComponent
{
export
class
SplitTabSpannerComponent
{
@
Input
()
container
:
SplitContainer
@
Input
()
container
:
SplitContainer
...
...
terminus-core/src/components/startPage.component.ts
浏览文件 @
39732908
...
@@ -7,8 +7,8 @@ import { ToolbarButton, ToolbarButtonProvider } from '../api'
...
@@ -7,8 +7,8 @@ import { ToolbarButton, ToolbarButtonProvider } from '../api'
/** @hidden */
/** @hidden */
@
Component
({
@
Component
({
selector
:
'
start-page
'
,
selector
:
'
start-page
'
,
template
:
require
(
'
./startPage.component.pug
'
)
,
template
Url
:
'
./startPage.component.pug
'
,
style
s
:
[
require
(
'
./startPage.component.scss
'
)
],
style
Urls
:
[
'
./startPage.component.scss
'
],
})
})
export
class
StartPageComponent
{
export
class
StartPageComponent
{
version
:
string
version
:
string
...
...
terminus-core/src/components/tabBody.component.ts
浏览文件 @
39732908
...
@@ -10,9 +10,9 @@ import { BaseTabComponent } from '../components/baseTab.component'
...
@@ -10,9 +10,9 @@ import { BaseTabComponent } from '../components/baseTab.component'
</perfect-scrollbar-->
</perfect-scrollbar-->
<ng-template #placeholder></ng-template>
<ng-template #placeholder></ng-template>
`
,
`
,
styles
:
[
style
Url
s
:
[
require
(
'
./tabBody.component.scss
'
)
,
'
./tabBody.component.scss
'
,
require
(
'
./tabBody.deep.component.css
'
)
,
'
./tabBody.deep.component.css
'
,
],
],
})
})
export
class
TabBodyComponent
implements
OnChanges
{
export
class
TabBodyComponent
implements
OnChanges
{
...
...
terminus-core/src/components/tabHeader.component.ts
浏览文件 @
39732908
...
@@ -17,8 +17,8 @@ export interface SortableComponentProxy {
...
@@ -17,8 +17,8 @@ export interface SortableComponentProxy {
/** @hidden */
/** @hidden */
@
Component
({
@
Component
({
selector
:
'
tab-header
'
,
selector
:
'
tab-header
'
,
template
:
require
(
'
./tabHeader.component.pug
'
)
,
template
Url
:
'
./tabHeader.component.pug
'
,
style
s
:
[
require
(
'
./tabHeader.component.scss
'
)
],
style
Urls
:
[
'
./tabHeader.component.scss
'
],
})
})
export
class
TabHeaderComponent
{
export
class
TabHeaderComponent
{
@
Input
()
index
:
number
@
Input
()
index
:
number
...
...
terminus-core/src/components/titleBar.component.ts
浏览文件 @
39732908
import
{
Component
}
from
'
@angular/core
'
import
{
Component
}
from
'
@angular/core
'
import
{
HostAppService
}
from
'
../services/hostApp.service
'
/** @hidden */
/** @hidden */
@
Component
({
@
Component
({
selector
:
'
title-bar
'
,
selector
:
'
title-bar
'
,
template
:
require
(
'
./titleBar.component.pug
'
)
,
template
Url
:
'
./titleBar.component.pug
'
,
style
s
:
[
require
(
'
./titleBar.component.scss
'
)
],
style
Urls
:
[
'
./titleBar.component.scss
'
],
})
})
export
class
TitleBarComponent
{
}
// eslint-disable-line @typescript-eslint/no-extraneous-class
export
class
TitleBarComponent
{
constructor
(
public
hostApp
:
HostAppService
)
{
}
}
terminus-core/src/components/toggle.component.ts
浏览文件 @
39732908
...
@@ -11,7 +11,7 @@ import { CheckboxComponent } from './checkbox.component'
...
@@ -11,7 +11,7 @@ import { CheckboxComponent } from './checkbox.component'
<label class="custom-control-label"></label>
<label class="custom-control-label"></label>
</div>
</div>
`
,
`
,
style
s
:
[
require
(
'
./toggle.component.scss
'
)
],
style
Urls
:
[
'
./toggle.component.scss
'
],
providers
:
[
providers
:
[
{
provide
:
NG_VALUE_ACCESSOR
,
useExisting
:
ToggleComponent
,
multi
:
true
},
{
provide
:
NG_VALUE_ACCESSOR
,
useExisting
:
ToggleComponent
,
multi
:
true
},
],
],
...
...
terminus-core/src/components/welcomeTab.component.ts
浏览文件 @
39732908
...
@@ -6,8 +6,8 @@ import { AppService } from '../services/app.service'
...
@@ -6,8 +6,8 @@ import { AppService } from '../services/app.service'
/** @hidden */
/** @hidden */
@
Component
({
@
Component
({
selector
:
'
welcome-page
'
,
selector
:
'
welcome-page
'
,
template
:
require
(
'
./welcomeTab.component.pug
'
)
,
template
Url
:
'
./welcomeTab.component.pug
'
,
style
s
:
[
require
(
'
./welcomeTab.component.scss
'
)
],
style
Urls
:
[
'
./welcomeTab.component.scss
'
],
})
})
export
class
WelcomeTabComponent
extends
BaseTabComponent
{
export
class
WelcomeTabComponent
extends
BaseTabComponent
{
constructor
(
constructor
(
...
...
terminus-core/src/components/windowControls.component.ts
浏览文件 @
39732908
...
@@ -5,8 +5,8 @@ import { AppService } from '../services/app.service'
...
@@ -5,8 +5,8 @@ import { AppService } from '../services/app.service'
/** @hidden */
/** @hidden */
@
Component
({
@
Component
({
selector
:
'
window-controls
'
,
selector
:
'
window-controls
'
,
template
:
require
(
'
./windowControls.component.pug
'
)
,
template
Url
:
'
./windowControls.component.pug
'
,
style
s
:
[
require
(
'
./windowControls.component.scss
'
)
],
style
Urls
:
[
'
./windowControls.component.scss
'
],
})
})
export
class
WindowControlsComponent
{
export
class
WindowControlsComponent
{
constructor
(
public
hostApp
:
HostAppService
,
public
app
:
AppService
)
{
}
constructor
(
public
hostApp
:
HostAppService
,
public
app
:
AppService
)
{
}
...
...
terminus-core/src/index.ts
浏览文件 @
39732908
import
{
NgModule
,
ModuleWithProviders
}
from
'
@angular/core
'
import
{
NgModule
}
from
'
@angular/core
'
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
import
{
BrowserAnimationsModule
}
from
'
@angular/platform-browser/animations
'
import
{
BrowserAnimationsModule
}
from
'
@angular/platform-browser/animations
'
import
{
platformBrowserDynamic
}
from
'
@angular/platform-browser-dynamic
'
import
{
FormsModule
}
from
'
@angular/forms
'
import
{
FormsModule
}
from
'
@angular/forms
'
import
{
NgbModule
}
from
'
@ng-bootstrap/ng-bootstrap
'
import
{
NgbModule
}
from
'
@ng-bootstrap/ng-bootstrap
'
import
{
PerfectScrollbarModule
,
PERFECT_SCROLLBAR_CONFIG
}
from
'
ngx-perfect-scrollbar
'
import
{
PerfectScrollbarModule
,
PERFECT_SCROLLBAR_CONFIG
}
from
'
ngx-perfect-scrollbar
'
import
{
DndModule
}
from
'
ng2-dnd
'
//
import { DndModule } from 'ng2-dnd'
import
{
AppRootComponent
}
from
'
./components/appRoot.component
'
import
{
AppRootComponent
}
from
'
./components/appRoot.component
'
import
{
CheckboxComponent
}
from
'
./components/checkbox.component
'
import
{
CheckboxComponent
}
from
'
./components/checkbox.component
'
...
@@ -25,7 +26,7 @@ import { AutofocusDirective } from './directives/autofocus.directive'
...
@@ -25,7 +26,7 @@ import { AutofocusDirective } from './directives/autofocus.directive'
import
{
HotkeyProvider
}
from
'
./api/hotkeyProvider
'
import
{
HotkeyProvider
}
from
'
./api/hotkeyProvider
'
import
{
ConfigProvider
}
from
'
./api/configProvider
'
import
{
ConfigProvider
}
from
'
./api/configProvider
'
import
{
Theme
}
from
'
./api/theme
'
import
{
Theme
}
from
'
./api/theme
'
import
{
TabContextMenuItemProvider
}
from
'
./api/tabContextMenuProvider
'
//
import { TabContextMenuItemProvider } from './api/tabContextMenuProvider'
import
{
TabRecoveryProvider
}
from
'
./api/tabRecovery
'
import
{
TabRecoveryProvider
}
from
'
./api/tabRecovery
'
import
{
AppService
}
from
'
./services/app.service
'
import
{
AppService
}
from
'
./services/app.service
'
...
@@ -34,7 +35,7 @@ import { ConfigService } from './services/config.service'
...
@@ -34,7 +35,7 @@ import { ConfigService } from './services/config.service'
import
{
StandardTheme
,
StandardCompactTheme
,
PaperTheme
}
from
'
./theme
'
import
{
StandardTheme
,
StandardCompactTheme
,
PaperTheme
}
from
'
./theme
'
import
{
CoreConfigProvider
}
from
'
./config
'
import
{
CoreConfigProvider
}
from
'
./config
'
import
{
AppHotkeyProvider
}
from
'
./hotkeys
'
import
{
AppHotkeyProvider
}
from
'
./hotkeys
'
import
{
TaskCompletionContextMenu
,
CommonOptionsContextMenu
,
CloseContextMenu
}
from
'
./tabContextMenu
'
//
import { TaskCompletionContextMenu, CommonOptionsContextMenu, CloseContextMenu } from './tabContextMenu'
import
'
perfect-scrollbar/css/perfect-scrollbar.css
'
import
'
perfect-scrollbar/css/perfect-scrollbar.css
'
import
'
ng2-dnd/bundles/style.css
'
import
'
ng2-dnd/bundles/style.css
'
...
@@ -51,9 +52,9 @@ const PROVIDERS = [
...
@@ -51,9 +52,9 @@ const PROVIDERS = [
{
provide
:
Theme
,
useClass
:
StandardCompactTheme
,
multi
:
true
},
{
provide
:
Theme
,
useClass
:
StandardCompactTheme
,
multi
:
true
},
{
provide
:
Theme
,
useClass
:
PaperTheme
,
multi
:
true
},
{
provide
:
Theme
,
useClass
:
PaperTheme
,
multi
:
true
},
{
provide
:
ConfigProvider
,
useClass
:
CoreConfigProvider
,
multi
:
true
},
{
provide
:
ConfigProvider
,
useClass
:
CoreConfigProvider
,
multi
:
true
},
{
provide
:
TabContextMenuItemProvider
,
useClass
:
CommonOptionsContextMenu
,
multi
:
true
},
//
{ provide: TabContextMenuItemProvider, useClass: CommonOptionsContextMenu, multi: true },
{
provide
:
TabContextMenuItemProvider
,
useClass
:
CloseContextMenu
,
multi
:
true
},
//
{ provide: TabContextMenuItemProvider, useClass: CloseContextMenu, multi: true },
{
provide
:
TabContextMenuItemProvider
,
useClass
:
TaskCompletionContextMenu
,
multi
:
true
},
//
{ provide: TabContextMenuItemProvider, useClass: TaskCompletionContextMenu, multi: true },
{
provide
:
TabRecoveryProvider
,
useClass
:
SplitTabRecoveryProvider
,
multi
:
true
},
{
provide
:
TabRecoveryProvider
,
useClass
:
SplitTabRecoveryProvider
,
multi
:
true
},
{
provide
:
PERFECT_SCROLLBAR_CONFIG
,
useValue
:
{
suppressScrollX
:
true
}
},
{
provide
:
PERFECT_SCROLLBAR_CONFIG
,
useValue
:
{
suppressScrollX
:
true
}
},
]
]
...
@@ -64,10 +65,11 @@ const PROVIDERS = [
...
@@ -64,10 +65,11 @@ const PROVIDERS = [
BrowserModule
,
BrowserModule
,
BrowserAnimationsModule
,
BrowserAnimationsModule
,
FormsModule
,
FormsModule
,
NgbModule
.
forRoot
()
,
NgbModule
,
PerfectScrollbarModule
,
PerfectScrollbarModule
,
DndModule
.
forRoot
()
,
// DndModule
,
],
],
providers
:
PROVIDERS
,
declarations
:
[
declarations
:
[
AppRootComponent
as
any
,
AppRootComponent
as
any
,
CheckboxComponent
,
CheckboxComponent
,
...
@@ -96,7 +98,7 @@ const PROVIDERS = [
...
@@ -96,7 +98,7 @@ const PROVIDERS = [
AutofocusDirective
,
AutofocusDirective
,
],
],
})
})
export
default
class
AppModule
{
// eslint-disable-line @typescript-eslint/no-extraneous-class
export
class
AppModule
{
// eslint-disable-line @typescript-eslint/no-extraneous-class
constructor
(
app
:
AppService
,
config
:
ConfigService
)
{
constructor
(
app
:
AppService
,
config
:
ConfigService
)
{
app
.
ready$
.
subscribe
(()
=>
{
app
.
ready$
.
subscribe
(()
=>
{
if
(
config
.
store
.
enableWelcomeTab
)
{
if
(
config
.
store
.
enableWelcomeTab
)
{
...
@@ -104,18 +106,17 @@ export default class AppModule { // eslint-disable-line @typescript-eslint/no-ex
...
@@ -104,18 +106,17 @@ export default class AppModule { // eslint-disable-line @typescript-eslint/no-ex
}
}
})
})
}
}
static
forRoot
():
ModuleWithProviders
{
return
{
ngModule
:
AppModule
,
providers
:
PROVIDERS
,
}
}
}
}
export
default
AppModule
export
{
AppRootComponent
as
bootstrap
}
export
{
AppRootComponent
as
bootstrap
}
export
*
from
'
./api
'
export
*
from
'
./api
'
// Deprecations
// Deprecations
export
{
ToolbarButton
as
IToolbarButton
}
from
'
./api
'
export
{
ToolbarButton
as
IToolbarButton
}
from
'
./api
'
export
{
HotkeyDescription
as
IHotkeyDescription
}
from
'
./api
'
export
{
HotkeyDescription
as
IHotkeyDescription
}
from
'
./api
'
export
function
fakeBootstrap
()
{
return
platformBrowserDynamic
().
bootstrapModule
(
AppModule
)
}
terminus-core/src/tabContextMenu.ts
浏览文件 @
39732908
...
@@ -5,7 +5,7 @@ import { TabHeaderComponent } from './components/tabHeader.component'
...
@@ -5,7 +5,7 @@ import { TabHeaderComponent } from './components/tabHeader.component'
import
{
TabContextMenuItemProvider
}
from
'
./api/tabContextMenuProvider
'
import
{
TabContextMenuItemProvider
}
from
'
./api/tabContextMenuProvider
'
/** @hidden */
/** @hidden */
@
Injectable
()
@
Injectable
(
{
providedIn
:
'
root
'
}
)
export
class
CloseContextMenu
extends
TabContextMenuItemProvider
{
export
class
CloseContextMenu
extends
TabContextMenuItemProvider
{
weight
=
-
5
weight
=
-
5
...
@@ -63,7 +63,7 @@ const COLORS = [
...
@@ -63,7 +63,7 @@ const COLORS = [
]
]
/** @hidden */
/** @hidden */
@
Injectable
()
@
Injectable
(
{
providedIn
:
'
root
'
}
)
export
class
CommonOptionsContextMenu
extends
TabContextMenuItemProvider
{
export
class
CommonOptionsContextMenu
extends
TabContextMenuItemProvider
{
weight
=
-
1
weight
=
-
1
...
@@ -101,7 +101,7 @@ export class CommonOptionsContextMenu extends TabContextMenuItemProvider {
...
@@ -101,7 +101,7 @@ export class CommonOptionsContextMenu extends TabContextMenuItemProvider {
}
}
/** @hidden */
/** @hidden */
@
Injectable
()
@
Injectable
(
{
providedIn
:
'
root
'
}
)
export
class
TaskCompletionContextMenu
extends
TabContextMenuItemProvider
{
export
class
TaskCompletionContextMenu
extends
TabContextMenuItemProvider
{
constructor
(
constructor
(
private
app
:
AppService
,
private
app
:
AppService
,
...
...
terminus-core/tsconfig.json
浏览文件 @
39732908
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
"extends"
:
"../tsconfig.json"
,
"extends"
:
"../tsconfig.json"
,
"exclude"
:
[
"node_modules"
,
"dist"
],
"exclude"
:
[
"node_modules"
,
"dist"
],
"compilerOptions"
:
{
"compilerOptions"
:
{
"baseUrl"
:
"src"
"baseUrl"
:
"src"
,
"paths"
:
{
"*"
:
[
"../../app/node_modules/*"
]
}
}
}
}
}
terminus-core/webpack.config.js
浏览文件 @
39732908
const
path
=
require
(
'
path
'
)
const
path
=
require
(
'
path
'
)
const
{
AngularCompilerPlugin
}
=
require
(
'
@ngtools/webpack
'
)
module
.
exports
=
{
module
.
exports
=
{
target
:
'
node
'
,
target
:
'
node
'
,
entry
:
'
src/index.ts
'
,
entry
:
'
src/index.ts
'
,
context
:
__dirname
,
context
:
__dirname
,
devtool
:
'
eval-
cheap-module-source-map
'
,
devtool
:
'
cheap-module-source-map
'
,
output
:
{
output
:
{
path
:
path
.
resolve
(
__dirname
,
'
dist
'
),
path
:
path
.
resolve
(
__dirname
,
'
dist
'
),
filename
:
'
index.js
'
,
filename
:
'
index.js
'
,
...
@@ -23,22 +24,26 @@ module.exports = {
...
@@ -23,22 +24,26 @@ module.exports = {
module
:
{
module
:
{
rules
:
[
rules
:
[
{
{
test
:
/
\.
ts$/
,
test
:
/
(?:\.
ngfactory
\.
js|
\.
ngfactory|
\.
ngstyle
\.
js|
\.
ts
)
$/
,
use
:
{
loader
:
'
@ngtools/webpack
'
,
loader
:
'
awesome-typescript-loader
'
,
options
:
{
configFileName
:
path
.
resolve
(
__dirname
,
'
tsconfig.json
'
),
typeRoots
:
[
path
.
resolve
(
__dirname
,
'
node_modules/@types
'
),
path
.
resolve
(
__dirname
,
'
../node_modules/@types
'
),
],
paths
:
{
"
terminus-*
"
:
[
path
.
resolve
(
__dirname
,
'
../terminus-*
'
)],
"
*
"
:
[
path
.
resolve
(
__dirname
,
'
../app/node_modules/*
'
)],
},
},
},
},
},
// {
// test: /\.ts$/,
// use: {
// loader: 'awesome-typescript-loader',
// options: {
// configFileName: path.resolve(__dirname, 'tsconfig.json'),
// typeRoots: [
// path.resolve(__dirname, 'node_modules/@types'),
// path.resolve(__dirname, '../node_modules/@types'),
// ],
// paths: {
// "terminus-*": [path.resolve(__dirname, '../terminus-*')],
// "*": [path.resolve(__dirname, '../app/node_modules/*')],
// },
// },
// },
// },
{
test
:
/
\.
pug$/
,
use
:
[
'
apply-loader
'
,
'
pug-loader
'
]
},
{
test
:
/
\.
pug$/
,
use
:
[
'
apply-loader
'
,
'
pug-loader
'
]
},
{
test
:
/
\.
scss$/
,
use
:
[
'
to-string-loader
'
,
'
css-loader
'
,
'
sass-loader
'
]
},
{
test
:
/
\.
scss$/
,
use
:
[
'
to-string-loader
'
,
'
css-loader
'
,
'
sass-loader
'
]
},
{
test
:
/
\.
css$/
,
use
:
[
'
to-string-loader
'
,
'
css-loader
'
],
include
:
/component
\.
css/
},
{
test
:
/
\.
css$/
,
use
:
[
'
to-string-loader
'
,
'
css-loader
'
],
include
:
/component
\.
css/
},
...
@@ -57,4 +62,12 @@ module.exports = {
...
@@ -57,4 +62,12 @@ module.exports = {
/^@angular/
,
/^@angular/
,
/^@ng-bootstrap/
,
/^@ng-bootstrap/
,
],
],
plugins
:
[
new
AngularCompilerPlugin
({
tsConfigPath
:
path
.
resolve
(
__dirname
,
'
tsconfig.json
'
),
entryModule
:
'
./terminus-core/src/index#AppModule
'
,
sourceMap
:
true
,
directTemplateLoading
:
true
,
}),
],
}
}
terminus-ssh/src/components/promptModal.component.ts
浏览文件 @
39732908
...
@@ -6,6 +6,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
...
@@ -6,6 +6,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
template
:
require
(
'
./promptModal.component.pug
'
),
template
:
require
(
'
./promptModal.component.pug
'
),
})
})
export
class
PromptModalComponent
{
export
class
PromptModalComponent
{
@
Input
()
prompt
:
string
@
Input
()
value
:
string
@
Input
()
value
:
string
@
Input
()
password
:
boolean
@
Input
()
password
:
boolean
@
Input
()
remember
:
boolean
@
Input
()
remember
:
boolean
...
...
tsconfig.json
浏览文件 @
39732908
{
{
"compilerOptions"
:
{
"compilerOptions"
:
{
"module"
:
"es2015"
,
"module"
:
"es2015"
,
"target"
:
"es
2016
"
,
"target"
:
"es
5
"
,
"moduleResolution"
:
"node"
,
"moduleResolution"
:
"node"
,
"noImplicitAny"
:
false
,
"noImplicitAny"
:
false
,
"removeComments"
:
false
,
"removeComments"
:
false
,
...
@@ -25,5 +25,9 @@
...
@@ -25,5 +25,9 @@
"es2015"
,
"es2015"
,
"es2017"
"es2017"
]
]
},
"angularCompilerOptions"
:
{
"enableIvy"
:
true
,
"disableTypeScriptVersionCheck"
:
true
}
}
}
}
yarn.lock
浏览文件 @
39732908
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录