Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Tabby
提交
63374f53
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 搜索 >>
未验证
提交
63374f53
编写于
1月 29, 2022
作者:
E
Eugene Pankov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleaned up terminal toolbar implementation
上级
c57fe48e
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
76 addition
and
53 deletion
+76
-53
tabby-core/src/theme.paper.scss
tabby-core/src/theme.paper.scss
+2
-2
tabby-core/src/theme.scss
tabby-core/src/theme.scss
+1
-1
tabby-serial/src/components/serialTab.component.pug
tabby-serial/src/components/serialTab.component.pug
+1
-4
tabby-ssh/src/components/sshTab.component.pug
tabby-ssh/src/components/sshTab.component.pug
+3
-6
tabby-telnet/src/components/telnetTab.component.pug
tabby-telnet/src/components/telnetTab.component.pug
+1
-4
tabby-terminal/src/api/baseTerminalTab.component.ts
tabby-terminal/src/api/baseTerminalTab.component.ts
+4
-7
tabby-terminal/src/components/baseTerminalTab.component.pug
tabby-terminal/src/components/baseTerminalTab.component.pug
+2
-5
tabby-terminal/src/components/baseTerminalTab.component.scss
tabby-terminal/src/components/baseTerminalTab.component.scss
+13
-24
tabby-terminal/src/components/terminalToolbar.component.pug
tabby-terminal/src/components/terminalToolbar.component.pug
+11
-0
tabby-terminal/src/components/terminalToolbar.component.scss
tabby-terminal/src/components/terminalToolbar.component.scss
+14
-0
tabby-terminal/src/components/terminalToolbar.component.ts
tabby-terminal/src/components/terminalToolbar.component.ts
+21
-0
tabby-terminal/src/index.ts
tabby-terminal/src/index.ts
+3
-0
未找到文件。
tabby-core/src/theme.paper.scss
浏览文件 @
63374f53
...
...
@@ -382,11 +382,11 @@ start-page footer {
background
:
$white
!
important
;
}
.
terminal-toolbar
{
terminal-toolbar
{
background
:
#ffffff
4a
!
important
;
border-bottom
:
1px
solid
#000000
26
!
important
;
}
.bg-dark
{
background-color
:
$base2
!
important
;
}
\ No newline at end of file
}
tabby-core/src/theme.scss
浏览文件 @
63374f53
...
...
@@ -138,7 +138,7 @@ app-root {
tab-body
{
background
:
$content-bg
;
.
terminal-toolbar
.btn
,
.toolbar-pin-button
{
terminal-toolbar
.btn
,
.toolbar-pin-button
{
font-weight
:
bold
;
}
}
...
...
tabby-serial/src/components/serialTab.component.pug
浏览文件 @
63374f53
.terminal-toolbar(
(mouseenter)='showToolbar()',
(mouseleave)='hideToolbar()'
)
terminal-toolbar([tab]='this')
i.fas.fa-xs.fa-circle.text-success.mr-2(*ngIf='session && session.open')
i.fas.fa-xs.fa-circle.text-danger.mr-2(*ngIf='!session || !session.open')
strong {{profile.options.port}} ({{profile.options.baudrate}})
...
...
tabby-ssh/src/components/sshTab.component.pug
浏览文件 @
63374f53
.terminal-toolbar(
(mouseenter)='showToolbar()',
(mouseleave)='hideToolbar()'
)
terminal-toolbar([tab]='this')
i.fas.fa-xs.fa-circle.text-success.mr-2(*ngIf='session && session.open')
i.fas.fa-xs.fa-circle.text-danger.mr-2(*ngIf='!session || !session.open')
strong.mr-auto {{profile.options.user}}@{{profile.options.host}}:{{profile.options.port}}
...
...
@@ -10,10 +7,10 @@
ngbDropdown,
container='body',
*ngIf='session && !session.supportsWorkingDirectory()',
placement='bottom-right'
placement='bottom-right
bottom-left bottom
'
)
button.btn.btn-sm.btn-link(ngbDropdownToggle)
i.far.fa-lightbulb
i.far.fa-lightbulb
.text-primary
.bg-dark(ngbDropdownMenu)
a.d-flex.align-items-center(ngbDropdownItem, (click)='platform.openExternal("https://tabby.sh/go/cwd-detection")')
.mr-auto
...
...
tabby-telnet/src/components/telnetTab.component.pug
浏览文件 @
63374f53
.terminal-toolbar(
(mouseenter)='showToolbar()',
(mouseleave)='hideToolbar()'
)
terminal-toolbar([tab]='this')
i.fas.fa-xs.fa-circle.text-success.mr-2(*ngIf='session && session.open')
i.fas.fa-xs.fa-circle.text-danger.mr-2(*ngIf='!session || !session.open')
strong.mr-auto {{profile.options.host}}:{{profile.options.port}}
...
...
tabby-terminal/src/api/baseTerminalTab.component.ts
浏览文件 @
63374f53
...
...
@@ -71,9 +71,6 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
/** @hidden */
@
HostBinding
(
'
style.background-color
'
)
backgroundColor
:
string
|
null
=
null
/** @hidden */
@
HostBinding
(
'
class.top-padded
'
)
topPadded
:
boolean
/** @hidden */
@
HostBinding
(
'
class.toolbar-enabled
'
)
enableToolbar
=
false
...
...
@@ -478,10 +475,6 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
configure
():
void
{
this
.
frontend
?.
configure
()
this
.
topPadded
=
this
.
hostApp
.
platform
===
Platform
.
macOS
&&
this
.
config
.
store
.
appearance
.
frame
===
'
thin
'
&&
this
.
config
.
store
.
appearance
.
tabsLocation
!==
'
top
'
if
(
this
.
config
.
store
.
terminal
.
background
===
'
colorScheme
'
)
{
if
(
this
.
config
.
store
.
terminal
.
colorScheme
.
background
)
{
this
.
backgroundColor
=
this
.
config
.
store
.
terminal
.
colorScheme
.
background
...
...
@@ -714,6 +707,10 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
window
.
localStorage
.
pinTerminalToolbar
=
this
.
pinToolbar
}
@
HostBinding
(
'
class.with-title-inset
'
)
get
hasTitleInset
():
boolean
{
return
this
.
hostApp
.
platform
===
Platform
.
macOS
&&
this
.
config
.
store
.
appearance
.
tabsLocation
!==
'
top
'
&&
this
.
config
.
store
.
appearance
.
frame
===
'
thin
'
}
protected
attachSessionHandler
<
T
>
(
observable
:
Observable
<
T
>
,
handler
:
(
v
:
T
)
=>
void
):
void
{
this
.
sessionHandlers
.
subscribe
(
observable
,
handler
)
}
...
...
tabby-terminal/src/components/baseTerminalTab.component.pug
浏览文件 @
63374f53
...
...
@@ -8,12 +8,9 @@ search-panel(
)
button.btn.btn-sm.btn-link.toolbar-pin-button(
*ngIf='enableToolbar',
*ngIf='enableToolbar
&& !pinToolbar
',
(click)='togglePinToolbar()',
(mouseenter)='showToolbar()',
(mouseleave)='hideToolbar()'
)
i.fas.fa-thumbtack(*ngIf='revealToolbar || pinToolbar')
i.fas.fa-wrench.mr-3(*ngIf='!revealToolbar && !pinToolbar')
span(*ngIf='pinToolbar', translate) Unpin
span(*ngIf='!pinToolbar && revealToolbar', translate) Pin
i.fas.fa-wrench
tabby-terminal/src/components/baseTerminalTab.component.scss
浏览文件 @
63374f53
...
...
@@ -5,10 +5,6 @@
overflow
:
hidden
;
position
:
relative
;
&
.top-padded
{
padding-top
:
20px
;
}
&
>
.content
{
flex
:
auto
;
position
:
relative
;
...
...
@@ -26,45 +22,34 @@
$toolbarHeight
:
40px
;
&
>
.
terminal-toolbar
{
>
terminal-toolbar
{
position
:
absolute
;
top
:
0
;
left
:
0
;
right
:
0
;
z-index
:
4
;
height
:
$toolbarHeight
;
opacity
:
0
;
background
:
rgba
(
0
,
0
,
0
,
.75
);
padding
:
5px
85px
5px
15px
;
transition
:
0
.25s
opacity
;
display
:
flex
;
align-items
:
center
;
z-index
:
3
;
will-change
:
transform
;
transform
:
translate
(
0
,
-100px
);
transition
:
0
.25s
transform
ease-out
;
>
.btn
{
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
height
:
$toolbarHeight
;
}
&
.toolbar-revealed
,
&
.toolbar-pinned
{
>
.
terminal-toolbar
{
>
terminal-toolbar
{
opacity
:
1
;
transform
:
translate
(
0
,
0
);
}
}
&
>
.toolbar-pin-button
{
>
.toolbar-pin-button
{
position
:
absolute
;
right
:
10
px
;
top
:
2
px
;
right
:
34
px
;
top
:
5
px
;
z-index
:
4
;
background
:
#000000
47
;
}
&
.toolbar-pinned
>
.terminal-toolbar-spacer
{
...
...
@@ -73,6 +58,10 @@
}
}
:host-context
(
.platform-darwin
)
.terminal-toolbar
{
padding-left
:
90px
;
:host-context
(
.with-title-inset
)
{
padding-top
:
20px
;
terminal-toolbar
{
padding-left
:
90px
;
}
}
tabby-terminal/src/components/terminalToolbar.component.pug
0 → 100644
浏览文件 @
63374f53
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
0 → 100644
浏览文件 @
63374f53
:host
{
background
:
rgba
(
0
,
0
,
0
,
.75
);
padding
:
5px
15px
5px
15px
;
display
:
flex
;
align-items
:
center
;
z-index
:
3
;
}
::ng-deep
.btn
{
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
tabby-terminal/src/components/terminalToolbar.component.ts
0 → 100644
浏览文件 @
63374f53
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import
{
Component
,
HostListener
,
Input
}
from
'
@angular/core
'
import
{
BaseTerminalTabComponent
}
from
'
../api/baseTerminalTab.component
'
/** @hidden */
@
Component
({
selector
:
'
terminal-toolbar
'
,
template
:
require
(
'
./terminalToolbar.component.pug
'
),
styles
:
[
require
(
'
./terminalToolbar.component.scss
'
)],
})
export
class
TerminalToolbarComponent
{
@
Input
()
tab
:
BaseTerminalTabComponent
@
HostListener
(
'
mouseenter
'
)
onMouseEnter
()
{
this
.
tab
.
showToolbar
()
}
@
HostListener
(
'
mouseleave
'
)
onMouseLeave
()
{
this
.
tab
.
hideToolbar
()
}
}
tabby-terminal/src/index.ts
浏览文件 @
63374f53
...
...
@@ -15,6 +15,7 @@ import { ColorSchemePreviewComponent } from './components/colorSchemePreview.com
import
{
SearchPanelComponent
}
from
'
./components/searchPanel.component
'
import
{
StreamProcessingSettingsComponent
}
from
'
./components/streamProcessingSettings.component
'
import
{
LoginScriptsSettingsComponent
}
from
'
./components/loginScriptsSettings.component
'
import
{
TerminalToolbarComponent
}
from
'
./components/terminalToolbar.component
'
import
{
TerminalDecorator
}
from
'
./api/decorator
'
import
{
TerminalContextMenuItemProvider
}
from
'
./api/contextMenuProvider
'
...
...
@@ -71,12 +72,14 @@ import { TerminalCLIHandler } from './cli'
SearchPanelComponent
,
StreamProcessingSettingsComponent
,
LoginScriptsSettingsComponent
,
TerminalToolbarComponent
,
],
exports
:
[
ColorPickerComponent
,
SearchPanelComponent
,
StreamProcessingSettingsComponent
,
LoginScriptsSettingsComponent
,
TerminalToolbarComponent
,
],
})
export
default
class
TerminalModule
{
}
// eslint-disable-line @typescript-eslint/no-extraneous-class
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录