Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Tabby
提交
8b5b53ab
T
Tabby
项目概览
后端镜像
/
Tabby
通知
27
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 搜索 >>
未验证
提交
8b5b53ab
编写于
1月 30, 2022
作者:
E
Eugene Pankov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added drag handles to toolbars
上级
448fe29f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
56 addition
and
12 deletion
+56
-12
tabby-core/src/index.ts
tabby-core/src/index.ts
+1
-0
tabby-terminal/src/components/terminalToolbar.component.pug
tabby-terminal/src/components/terminalToolbar.component.pug
+22
-10
tabby-terminal/src/components/terminalToolbar.component.scss
tabby-terminal/src/components/terminalToolbar.component.scss
+12
-2
tabby-terminal/src/components/terminalToolbar.component.ts
tabby-terminal/src/components/terminalToolbar.component.ts
+21
-0
未找到文件。
tabby-core/src/index.ts
浏览文件 @
8b5b53ab
...
...
@@ -149,6 +149,7 @@ const PROVIDERS = [
SortablejsModule
,
DragDropModule
,
TranslateModule
,
CdkAutoDropGroup
,
],
})
export
default
class
AppModule
{
// eslint-disable-line @typescript-eslint/no-extraneous-class
...
...
tabby-terminal/src/components/terminalToolbar.component.pug
浏览文件 @
8b5b53ab
ng-content
button.btn.btn-sm.btn-link(
*ngIf='tab.enableToolbar',
(click)='tab.togglePinToolbar()',
(mouseenter)='tab.showToolbar()',
(mouseleave)='tab.hideToolbar()'
.content(
cdkDropList
cdkAutoDropGroup='app-tabs'
)
i.fas.fa-thumbtack
span(*ngIf='tab.pinToolbar', translate) Unpin
span(*ngIf='!tab.pinToolbar', translate) Pin
i.fas.fa-grip-vertical.drag-handle(
*ngIf='shouldShowDragHandle',
cdkDrag,
[cdkDragData]='tab',
(cdkDragStarted)='onTabDragStart()',
(cdkDragEnded)='onTabDragEnd()'
)
ng-content
button.btn.btn-sm.btn-link(
*ngIf='tab.enableToolbar',
(click)='tab.togglePinToolbar()',
(mouseenter)='tab.showToolbar()',
(mouseleave)='tab.hideToolbar()'
)
i.fas.fa-thumbtack
span(*ngIf='tab.pinToolbar', translate) Unpin
span(*ngIf='!tab.pinToolbar', translate) Pin
tabby-terminal/src/components/terminalToolbar.component.scss
浏览文件 @
8b5b53ab
:host
{
background
:
rgba
(
0
,
0
,
0
,
.75
)
;
background
:
#000000
bf
;
padding
:
5px
15px
5px
15px
;
display
:
flex
;
z-index
:
3
;
}
.content
{
flex-grow
:
1
;
display
:
flex
;
align-items
:
center
;
z-index
:
3
;
}
.drag-handle
{
margin
:
0
10px
0
0
;
cursor
:
move
;
opacity
:
.3
;
}
::ng-deep
.btn
{
...
...
tabby-terminal/src/components/terminalToolbar.component.ts
浏览文件 @
8b5b53ab
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import
{
Component
,
HostListener
,
Input
}
from
'
@angular/core
'
import
{
AppService
,
SplitTabComponent
}
from
'
tabby-core
'
import
{
BaseTerminalTabComponent
}
from
'
../api/baseTerminalTab.component
'
/** @hidden */
...
...
@@ -11,6 +12,26 @@ import { BaseTerminalTabComponent } from '../api/baseTerminalTab.component'
export
class
TerminalToolbarComponent
{
@
Input
()
tab
:
BaseTerminalTabComponent
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
constructor
(
private
app
:
AppService
,
)
{
}
onTabDragStart
():
void
{
this
.
app
.
emitTabDragStarted
(
this
.
tab
)
}
onTabDragEnd
():
void
{
setTimeout
(()
=>
{
this
.
app
.
emitTabDragEnded
()
this
.
app
.
emitTabsChanged
()
})
}
get
shouldShowDragHandle
():
boolean
{
return
this
.
tab
.
parent
instanceof
SplitTabComponent
&&
this
.
tab
.
parent
.
getAllTabs
().
length
>
1
}
@
HostListener
(
'
mouseenter
'
)
onMouseEnter
()
{
this
.
tab
.
showToolbar
()
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录