Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Tabby
提交
c3cc57f8
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 搜索 >>
提交
c3cc57f8
编写于
4月 14, 2017
作者:
E
Eugene Pankov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
.
上级
00ff63f1
变更
24
隐藏空白更改
内联
并排
Showing
24 changed file
with
92 addition
and
131 deletion
+92
-131
terminus-core/@angular/animations.ts
terminus-core/@angular/animations.ts
+0
-1
terminus-core/@angular/common.ts
terminus-core/@angular/common.ts
+0
-1
terminus-core/@angular/compiler.ts
terminus-core/@angular/compiler.ts
+0
-1
terminus-core/@angular/core.ts
terminus-core/@angular/core.ts
+0
-1
terminus-core/@angular/forms.ts
terminus-core/@angular/forms.ts
+0
-1
terminus-core/@angular/platform-browser-dynamic.ts
terminus-core/@angular/platform-browser-dynamic.ts
+0
-1
terminus-core/@angular/platform-browser.ts
terminus-core/@angular/platform-browser.ts
+0
-1
terminus-core/@ng-bootstrap/ng-bootstrap.ts
terminus-core/@ng-bootstrap/ng-bootstrap.ts
+0
-1
terminus-core/src/api/index.ts
terminus-core/src/api/index.ts
+1
-0
terminus-core/src/api/theme.ts
terminus-core/src/api/theme.ts
+5
-0
terminus-core/src/components/appRoot.ts
terminus-core/src/components/appRoot.ts
+2
-4
terminus-core/src/components/tabHeader.scss
terminus-core/src/components/tabHeader.scss
+1
-1
terminus-core/src/components/titleBar.scss
terminus-core/src/components/titleBar.scss
+0
-2
terminus-core/src/defaultConfigValues.yaml
terminus-core/src/defaultConfigValues.yaml
+1
-0
terminus-core/src/global.scss
terminus-core/src/global.scss
+0
-97
terminus-core/src/index.ts
terminus-core/src/index.ts
+6
-1
terminus-core/src/overrides.scss
terminus-core/src/overrides.scss
+0
-3
terminus-core/src/services/themes.ts
terminus-core/src/services/themes.ts
+40
-0
terminus-core/src/theme.scss
terminus-core/src/theme.scss
+9
-4
terminus-core/src/theme.ts
terminus-core/src/theme.ts
+10
-0
terminus-core/src/variables.scss
terminus-core/src/variables.scss
+0
-1
terminus-core/webpack.config.js
terminus-core/webpack.config.js
+1
-3
terminus-settings/src/components/settingsTab.pug
terminus-settings/src/components/settingsTab.pug
+13
-5
terminus-settings/src/components/settingsTab.ts
terminus-settings/src/components/settingsTab.ts
+3
-2
未找到文件。
terminus-core/@angular/animations.ts
已删除
100644 → 0
浏览文件 @
00ff63f1
export
*
from
'
@angular/animations
'
terminus-core/@angular/common.ts
已删除
100644 → 0
浏览文件 @
00ff63f1
export
*
from
'
@angular/common
'
terminus-core/@angular/compiler.ts
已删除
100644 → 0
浏览文件 @
00ff63f1
export
*
from
'
@angular/compiler
'
terminus-core/@angular/core.ts
已删除
100644 → 0
浏览文件 @
00ff63f1
export
*
from
'
@angular/core
'
terminus-core/@angular/forms.ts
已删除
100644 → 0
浏览文件 @
00ff63f1
export
*
from
'
@angular/forms
'
terminus-core/@angular/platform-browser-dynamic.ts
已删除
100644 → 0
浏览文件 @
00ff63f1
export
*
from
'
@angular/platform-browser-dynamic
'
terminus-core/@angular/platform-browser.ts
已删除
100644 → 0
浏览文件 @
00ff63f1
export
*
from
'
@angular/platform-browser
'
terminus-core/@ng-bootstrap/ng-bootstrap.ts
已删除
100644 → 0
浏览文件 @
00ff63f1
export
*
from
'
@ng-bootstrap/ng-bootstrap
'
terminus-core/src/api/index.ts
浏览文件 @
c3cc57f8
...
...
@@ -4,6 +4,7 @@ export { ToolbarButtonProvider, IToolbarButton } from './toolbarButtonProvider'
export
{
ConfigProvider
}
from
'
./configProvider
'
export
{
HotkeyProvider
,
IHotkeyDescription
}
from
'
./hotkeyProvider
'
export
{
DefaultTabProvider
}
from
'
./defaultTabProvider
'
export
{
Theme
}
from
'
./theme
'
export
{
AppService
}
from
'
../services/app
'
export
{
ConfigService
}
from
'
../services/config
'
...
...
terminus-core/src/api/theme.ts
0 → 100644
浏览文件 @
c3cc57f8
export
abstract
class
Theme
{
name
:
string
css
:
string
terminalBackground
:
string
}
terminus-core/src/components/appRoot.ts
浏览文件 @
c3cc57f8
...
...
@@ -10,13 +10,10 @@ import { QuitterService } from '../services/quitter'
import
{
ConfigService
}
from
'
../services/config
'
import
{
DockingService
}
from
'
../services/docking
'
import
{
TabRecoveryService
}
from
'
../services/tabRecovery
'
import
{
ThemesService
}
from
'
../services/themes
'
import
{
AppService
,
IToolbarButton
,
ToolbarButtonProvider
}
from
'
../api
'
import
'
angular2-toaster/toaster.css
'
import
'
overrides.scss
'
import
'
theme.scss
'
@
Component
({
selector
:
'
app-root
'
,
...
...
@@ -55,6 +52,7 @@ export class AppRootComponent {
public
app
:
AppService
,
@
Inject
(
ToolbarButtonProvider
)
private
toolbarButtonProviders
:
ToolbarButtonProvider
[],
log
:
LogService
,
_themes
:
ThemesService
,
_quitter
:
QuitterService
,
)
{
(
<
any
>
console
).
timeStamp
(
'
AppComponent ctor
'
)
...
...
terminus-core/src/components/tabHeader.scss
浏览文件 @
c3cc57f8
@import
'~variables.scss'
;
$tabs-height
:
40px
;
:host
{
line-height
:
$tabs-height
-
2px
;
...
...
terminus-core/src/components/titleBar.scss
浏览文件 @
c3cc57f8
@import
'~variables.scss'
;
$titlebar-height
:
30px
;
:host
{
...
...
terminus-core/src/defaultConfigValues.yaml
浏览文件 @
c3cc57f8
...
...
@@ -3,6 +3,7 @@ appearance:
dockScreen
:
'
current'
dockFill
:
50
tabsOnTop
:
true
theme
:
'
Standard'
useNativeFrame
:
false
hotkeys
:
close-tab
:
...
...
terminus-core/src/global.scss
已删除
100644 → 0
浏览文件 @
00ff63f1
html
.platform-win32
{
body
.focused
{
//border: 1px solid #9c9c00 !important;
}
}
body
{
border
:
1px
solid
#131313
;
transition
:
0
.5s
border
;
overflow
:
hidden
;
min-height
:
100vh
;
cursor
:
default
;
}
.no-drag
,
a
,
button
,
checkbox
,
.form-control
,
#toast-container
{
-webkit-app-region
:
no-drag
;
outline
:
0
!
important
;
*
{
outline
:
0
!
important
;
-webkit-app-region
:
no-drag
;
}
}
.window-resizer
{
-webkit-app-region
:
no-drag
;
position
:
fixed
;
width
:
10px
;
height
:
10px
;
}
.window-resizer-tl
{
left
:
0
;
top
:
0
;
}
.no-wrap
{
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.word-wrap
{
word-wrap
:
break-word
;
word-break
:
break-all
;
}
#toast-container
.toast-top-full-width
{
width
:
100%
;
top
:
50px
;
>
div
{
width
:
100%
;
border-radius
:
0
;
box-shadow
:
0
0
2px
rgba
(
0
,
0
,
0
,.
75
);
opacity
:
1
;
filter
:
none
;
}
}
.btn
{
i
+
*
{
margin-left
:
5px
;
}
}
.list-group-item
{
margin
:
none
;
>
.btn
{
float
:
right
;
margin
:
-7px
-11px
0
0
;
background
:
transparent
;
box-shadow
:
none
;
&
:hover
{
background
:
rgba
(
0
,
0
,
0
,.
25
);
}
}
}
ngb-typeahead-window
{
max-height
:
200px
;
overflow-y
:
auto
;
>
button
{
display
:
block
;
width
:
100%
;
-webkit-appearance
:
none
;
//border-bottom: 1px solid @dark-border;
}
}
terminus-core/src/index.ts
浏览文件 @
c3cc57f8
...
...
@@ -17,6 +17,7 @@ import { PluginsService } from './services/plugins'
import
{
QuitterService
}
from
'
./services/quitter
'
import
{
DockingService
}
from
'
./services/docking
'
import
{
TabRecoveryService
}
from
'
./services/tabRecovery
'
import
{
ThemesService
}
from
'
./services/themes
'
import
{
AppRootComponent
}
from
'
./components/appRoot
'
import
{
TabBodyComponent
}
from
'
./components/tabBody
'
...
...
@@ -24,6 +25,9 @@ import { TabHeaderComponent } from './components/tabHeader'
import
{
TitleBarComponent
}
from
'
./components/titleBar
'
import
{
HotkeyProvider
}
from
'
./api/hotkeyProvider
'
import
{
Theme
}
from
'
./api/theme
'
import
{
StandardTheme
}
from
'
./theme
'
const
PROVIDERS
=
[
...
...
@@ -37,8 +41,10 @@ const PROVIDERS = [
NotifyService
,
PluginsService
,
TabRecoveryService
,
ThemesService
,
QuitterService
,
{
provide
:
HotkeyProvider
,
useClass
:
AppHotkeyProvider
,
multi
:
true
},
{
provide
:
Theme
,
useClass
:
StandardTheme
,
multi
:
true
},
]
...
...
@@ -50,7 +56,6 @@ const PROVIDERS = [
ToasterModule
,
NgbModule
,
],
providers
:
PROVIDERS
,
declarations
:
[
AppRootComponent
,
TabBodyComponent
,
...
...
terminus-core/src/overrides.scss
已删除
100644 → 0
浏览文件 @
00ff63f1
.form-group
label
{
margin-bottom
:
2px
;
}
terminus-core/src/services/themes.ts
0 → 100644
浏览文件 @
c3cc57f8
import
{
Inject
,
Injectable
}
from
'
@angular/core
'
import
{
ConfigService
}
from
'
../services/config
'
import
{
Theme
}
from
'
../api/theme
'
@
Injectable
()
export
class
ThemesService
{
private
styleElement
:
HTMLElement
=
null
constructor
(
private
config
:
ConfigService
,
@
Inject
(
Theme
)
private
themes
:
Theme
[],
)
{
this
.
applyCurrentTheme
()
config
.
change
.
subscribe
(()
=>
{
this
.
applyCurrentTheme
()
})
}
findTheme
(
name
:
string
):
Theme
{
return
this
.
themes
.
find
(
x
=>
x
.
name
===
name
)
}
applyTheme
(
theme
:
Theme
):
void
{
if
(
!
this
.
styleElement
)
{
this
.
styleElement
=
document
.
createElement
(
'
style
'
)
this
.
styleElement
.
setAttribute
(
'
id
'
,
'
theme
'
)
document
.
querySelector
(
'
head
'
).
appendChild
(
this
.
styleElement
)
}
this
.
styleElement
.
textContent
=
theme
.
css
}
applyCurrentTheme
():
void
{
let
theme
=
this
.
findTheme
(
this
.
config
.
full
().
appearance
.
theme
)
if
(
!
theme
)
{
theme
=
this
.
findTheme
(
'
Standard
'
)
}
this
.
applyTheme
(
theme
)
}
}
terminus-core/src/theme.scss
浏览文件 @
c3cc57f8
$tab-border-radius
:
5px
;
$button-hover-bg
:
rgba
(
0
,
0
,
0
,
.25
);
$button-active-bg
:
rgba
(
0
,
0
,
0
,
.5
);
$white
:
#fff
!
default
;
$black
:
#000
!
default
;
$red
:
#d9534f
!
default
;
...
...
@@ -73,10 +78,6 @@ ngb-tabset .tab-content {
background
:
$blue
;
}
$tab-border-radius
:
5px
;
$button-hover-bg
:
rgba
(
0
,
0
,
0
,
.25
);
$button-active-bg
:
rgba
(
0
,
0
,
0
,
.5
);
title-bar
{
background
:
$body-bg2
;
...
...
@@ -291,3 +292,7 @@ hotkey-input-modal {
}
}
}
.form-group
label
{
margin-bottom
:
2px
;
}
terminus-core/src/theme.ts
0 → 100644
浏览文件 @
c3cc57f8
import
{
Injectable
}
from
'
@angular/core
'
import
{
Theme
}
from
'
./api
'
@
Injectable
()
export
class
StandardTheme
extends
Theme
{
name
=
'
Standard
'
css
=
require
(
'
./theme.scss
'
)
terminalBackground
=
'
#1D272D
'
}
terminus-core/src/variables.scss
已删除
100644 → 0
浏览文件 @
00ff63f1
$tabs-height
:
40px
;
terminus-core/webpack.config.js
浏览文件 @
c3cc57f8
...
...
@@ -29,9 +29,7 @@ module.exports = {
}
},
{
test
:
/
\.
pug$/
,
use
:
[
'
apply-loader
'
,
'
pug-loader
'
]
},
{
test
:
/
\.
scss$/
,
use
:
[
'
style-loader
'
,
'
css-loader
'
,
'
sass-loader
'
],
exclude
:
/components
\/
/
},
{
test
:
/
\.
scss$/
,
use
:
[
'
to-string-loader
'
,
'
css-loader
'
,
'
sass-loader
'
],
include
:
/components
\/
/
},
{
test
:
/
\.
css$/
,
use
:
[
'
to-string-loader
'
,
'
css-loader
'
,
'
sass-loader
'
]
},
{
test
:
/
\.
scss$/
,
use
:
[
'
to-string-loader
'
,
'
css-loader
'
,
'
sass-loader
'
]
},
{
test
:
/
\.
yaml$/
,
use
:
[
'
json-loader
'
,
'
yaml-loader
'
]
},
]
},
...
...
terminus-settings/src/components/settingsTab.pug
浏览文件 @
c3cc57f8
button.btn.btn-outline-warning.btn-block(*ngIf='config.restartRequested', '(click)'='restartApp()') Restart the app to apply changes
ngb-tabset.vertical(type='tabs')
ngb-tab(*ngFor='let provider of settingsProviders')
template(ngbTabTitle)
| {{provider.title}}
template(ngbTabContent)
settings-tab-body([provider]='provider')
ngb-tab
template(ngbTabTitle)
| Application
template(ngbTabContent)
.row
.col.col-lg-6
.form-group
label Theme
select.form-control(
'[(ngModel)]'='config.store.appearance.theme',
(ngModelChange)='config.save()',
)
option(*ngFor='let theme of themes', [ngValue]='theme.name') {{theme.name}}
.form-group
label Show tabs
br
...
...
@@ -144,3 +147,8 @@ ngb-tabset.vertical(type='tabs')
td
multi-hotkey-input('[(model)]'='config.store.hotkeys[hotkey.id]')
ngb-tab(*ngFor='let provider of settingsProviders')
template(ngbTabTitle)
| {{provider.title}}
template(ngbTabContent)
settings-tab-body([provider]='provider')
terminus-settings/src/components/settingsTab.ts
浏览文件 @
c3cc57f8
import
{
Component
,
Inject
}
from
'
@angular/core
'
import
{
ElectronService
,
DockingService
,
ConfigService
,
IHotkeyDescription
,
HotkeyProvider
,
BaseTabComponent
}
from
'
terminus-core
'
import
{
ElectronService
,
DockingService
,
ConfigService
,
IHotkeyDescription
,
HotkeyProvider
,
BaseTabComponent
,
Theme
}
from
'
terminus-core
'
import
{
SettingsTabProvider
}
from
'
../api
'
...
...
@@ -21,7 +21,8 @@ export class SettingsTabComponent extends BaseTabComponent {
private
electron
:
ElectronService
,
public
docking
:
DockingService
,
@
Inject
(
HotkeyProvider
)
hotkeyProviders
:
HotkeyProvider
[],
@
Inject
(
SettingsTabProvider
)
public
settingsProviders
:
SettingsTabProvider
[]
@
Inject
(
SettingsTabProvider
)
public
settingsProviders
:
SettingsTabProvider
[],
@
Inject
(
Theme
)
public
themes
:
Theme
[],
)
{
super
()
this
.
hotkeyDescriptions
=
hotkeyProviders
.
map
(
x
=>
x
.
hotkeys
).
reduce
((
a
,
b
)
=>
a
.
concat
(
b
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录