Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Tabby
提交
2b4d3e99
T
Tabby
项目概览
后端镜像
/
Tabby
通知
33
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,发现更多精彩内容 >>
提交
2b4d3e99
编写于
10月 26, 2018
作者:
E
Eugene Pankov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
multi-window fixes
上级
39458730
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
57 addition
and
15 deletion
+57
-15
app/lib/window.ts
app/lib/window.ts
+39
-9
terminus-terminal/package.json
terminus-terminal/package.json
+1
-1
terminus-terminal/src/frontends/xtermFrontend.ts
terminus-terminal/src/frontends/xtermFrontend.ts
+13
-1
terminus-terminal/yarn.lock
terminus-terminal/yarn.lock
+4
-4
未找到文件。
app/lib/window.ts
浏览文件 @
2b4d3e99
...
...
@@ -117,6 +117,9 @@ export class Window {
}
send
(
event
,
...
args
)
{
if
(
!
this
.
window
)
{
return
}
this
.
window
.
webContents
.
send
(
event
,
...
args
)
}
...
...
@@ -154,19 +157,31 @@ export class Window {
}
})
ipcMain
.
on
(
'
window-focus
'
,
()
=>
{
ipcMain
.
on
(
'
window-focus
'
,
event
=>
{
if
(
event
.
sender
!==
this
.
window
.
webContents
)
{
return
}
this
.
window
.
focus
()
})
ipcMain
.
on
(
'
window-maximize
'
,
()
=>
{
ipcMain
.
on
(
'
window-maximize
'
,
event
=>
{
if
(
event
.
sender
!==
this
.
window
.
webContents
)
{
return
}
this
.
window
.
maximize
()
})
ipcMain
.
on
(
'
window-unmaximize
'
,
()
=>
{
ipcMain
.
on
(
'
window-unmaximize
'
,
event
=>
{
if
(
event
.
sender
!==
this
.
window
.
webContents
)
{
return
}
this
.
window
.
unmaximize
()
})
ipcMain
.
on
(
'
window-toggle-maximize
'
,
()
=>
{
ipcMain
.
on
(
'
window-toggle-maximize
'
,
event
=>
{
if
(
event
.
sender
!==
this
.
window
.
webContents
)
{
return
}
if
(
this
.
window
.
isMaximized
())
{
this
.
window
.
unmaximize
()
}
else
{
...
...
@@ -174,23 +189,38 @@ export class Window {
}
})
ipcMain
.
on
(
'
window-minimize
'
,
()
=>
{
ipcMain
.
on
(
'
window-minimize
'
,
event
=>
{
if
(
event
.
sender
!==
this
.
window
.
webContents
)
{
return
}
this
.
window
.
minimize
()
})
ipcMain
.
on
(
'
window-set-bounds
'
,
(
_event
,
bounds
)
=>
{
ipcMain
.
on
(
'
window-set-bounds
'
,
(
event
,
bounds
)
=>
{
if
(
event
.
sender
!==
this
.
window
.
webContents
)
{
return
}
this
.
window
.
setBounds
(
bounds
)
})
ipcMain
.
on
(
'
window-set-always-on-top
'
,
(
_event
,
flag
)
=>
{
ipcMain
.
on
(
'
window-set-always-on-top
'
,
(
event
,
flag
)
=>
{
if
(
event
.
sender
!==
this
.
window
.
webContents
)
{
return
}
this
.
window
.
setAlwaysOnTop
(
flag
)
})
ipcMain
.
on
(
'
window-set-vibrancy
'
,
(
_event
,
enabled
,
type
)
=>
{
ipcMain
.
on
(
'
window-set-vibrancy
'
,
(
event
,
enabled
,
type
)
=>
{
if
(
event
.
sender
!==
this
.
window
.
webContents
)
{
return
}
this
.
setVibrancy
(
enabled
,
type
)
})
ipcMain
.
on
(
'
window-set-title
'
,
(
_event
,
title
)
=>
{
ipcMain
.
on
(
'
window-set-title
'
,
(
event
,
title
)
=>
{
if
(
event
.
sender
!==
this
.
window
.
webContents
)
{
return
}
this
.
window
.
setTitle
(
title
)
})
...
...
terminus-terminal/package.json
浏览文件 @
2b4d3e99
...
...
@@ -26,7 +26,7 @@
"file-loader"
:
"^0.11.2"
,
"rage-edit-tmp"
:
"^1.1.0"
,
"uuid"
:
"^3.3.2"
,
"xterm"
:
"^3.
6
.0"
"xterm"
:
"^3.
8
.0"
},
"peerDependencies"
:
{
"@angular/common"
:
"4.0.1"
,
...
...
terminus-terminal/src/frontends/xtermFrontend.ts
浏览文件 @
2b4d3e99
...
...
@@ -20,6 +20,18 @@ export class XTermFrontend extends Frontend {
allowTransparency
:
true
,
enableBold
:
true
,
})
const
initGlobal
=
(
this
.
xterm
as
any
).
_core
.
_initGlobal
.
bind
((
this
.
xterm
as
any
).
_core
);
(
this
.
xterm
as
any
).
_core
.
_initGlobal
=
()
=>
{
this
.
xterm
.
textarea
.
addEventListener
(
'
paste
'
,
e
=>
{
e
.
clipboardData
=
null
})
this
.
xterm
.
element
.
addEventListener
(
'
paste
'
,
e
=>
{
e
.
clipboardData
=
null
})
initGlobal
()
}
this
.
xterm
.
on
(
'
data
'
,
data
=>
{
this
.
input
.
next
(
data
)
})
...
...
@@ -34,7 +46,7 @@ export class XTermFrontend extends Frontend {
attach
(
host
:
HTMLElement
):
void
{
this
.
xterm
.
open
(
host
)
this
.
ready
.
next
(
null
)
this
.
ready
.
complete
()
this
.
ready
.
complete
()
;
this
.
resizeHandler
=
()
=>
(
this
.
xterm
as
any
).
fit
()
window
.
addEventListener
(
'
resize
'
,
this
.
resizeHandler
)
...
...
terminus-terminal/yarn.lock
浏览文件 @
2b4d3e99
...
...
@@ -173,7 +173,7 @@ uuid@^3.3.2:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==
xterm@^3.
6
.0:
version "3.
6
.0"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.
6.0.tgz#9b95cd23a338e5842343aec1a104f094c5153e7c
"
integrity sha512-
D/7/fm7oGzZksLFQdpn1TD63V+T4Ad3LZR2JfZ1QrPZ1yDjKedIKWAZXgzeHQw8S/5HYD08GdkLnjeLm/e6Yog
==
xterm@^3.
8
.0:
version "3.
8
.0"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.
8.0.tgz#55d1de518bdc9c9793823f5e4e97d6898972938d
"
integrity sha512-
rS3HLryuMWbLsv98+jVVSUXCxmoyXPwqwJNC0ad0VSMdXgl65LefPztQVwfurkaF7kM7ZSgM8eJjnJ9kkdoR1w
==
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录