Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Tabby
提交
2e558e2a
T
Tabby
项目概览
后端镜像
/
Tabby
通知
37
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,发现更多精彩内容 >>
提交
2e558e2a
编写于
8月 26, 2018
作者:
E
Eugene Pankov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added config file editor
上级
a98f2ce1
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
420 addition
and
9 deletion
+420
-9
terminus-core/package.json
terminus-core/package.json
+2
-1
terminus-core/src/components/startPage.component.ts
terminus-core/src/components/startPage.component.ts
+1
-1
terminus-core/src/configDefaults.yaml
terminus-core/src/configDefaults.yaml
+1
-0
terminus-core/src/services/config.service.ts
terminus-core/src/services/config.service.ts
+15
-0
terminus-core/src/services/homeBase.service.ts
terminus-core/src/services/homeBase.service.ts
+15
-1
terminus-core/src/theme.scss
terminus-core/src/theme.scss
+1
-1
terminus-core/yarn.lock
terminus-core/yarn.lock
+313
-1
terminus-settings/src/components/settingsTab.component.pug
terminus-settings/src/components/settingsTab.component.pug
+35
-2
terminus-settings/src/components/settingsTab.component.scss
terminus-settings/src/components/settingsTab.component.scss
+1
-1
terminus-settings/src/components/settingsTab.component.ts
terminus-settings/src/components/settingsTab.component.ts
+27
-0
terminus-settings/src/components/settingsTab.deep.component.css
...us-settings/src/components/settingsTab.deep.component.css
+7
-1
terminus-settings/src/index.ts
terminus-settings/src/index.ts
+2
-0
未找到文件。
terminus-core/package.json
浏览文件 @
2e558e2a
...
...
@@ -26,7 +26,8 @@
"core-js"
:
"^2.4.1"
,
"electron-updater"
:
"^2.8.9"
,
"ng2-dnd"
:
"^5.0.2"
,
"ngx-perfect-scrollbar"
:
"^6.0.0"
"ngx-perfect-scrollbar"
:
"^6.0.0"
,
"universal-analytics"
:
"^0.4.17"
},
"peerDependencies"
:
{
"@angular/animations"
:
"4.0.1"
,
...
...
terminus-core/src/components/startPage.component.ts
浏览文件 @
2e558e2a
...
...
@@ -13,7 +13,7 @@ export class StartPageComponent {
constructor
(
private
config
:
ConfigService
,
p
rivate
homeBase
:
HomeBaseService
,
p
ublic
homeBase
:
HomeBaseService
,
@
Inject
(
ToolbarButtonProvider
)
private
toolbarButtonProviders
:
ToolbarButtonProvider
[],
)
{
}
...
...
terminus-core/src/configDefaults.yaml
浏览文件 @
2e558e2a
...
...
@@ -9,3 +9,4 @@ appearance:
css
:
'
/*
*
{
color:
blue
!important;
}
*/'
opacity
:
1.0
vibrancy
:
false
enableAnalytics
:
true
terminus-core/src/services/config.service.ts
浏览文件 @
2e558e2a
...
...
@@ -80,6 +80,10 @@ export class ConfigService {
this
.
load
()
}
getDefaults
()
{
return
this
.
defaults
}
load
():
void
{
if
(
fs
.
existsSync
(
this
.
path
))
{
this
.
_store
=
yaml
.
safeLoad
(
fs
.
readFileSync
(
this
.
path
,
'
utf8
'
))
...
...
@@ -94,6 +98,17 @@ export class ConfigService {
this
.
emitChange
()
}
readRaw
():
string
{
return
yaml
.
safeDump
(
this
.
_store
)
}
writeRaw
(
data
:
string
):
void
{
this
.
_store
=
yaml
.
safeLoad
(
data
)
this
.
save
()
this
.
load
()
this
.
emitChange
()
}
emitChange
():
void
{
this
.
changed
.
next
()
}
...
...
terminus-core/src/services/homeBase.service.ts
浏览文件 @
2e558e2a
import
*
as
os
from
'
os
'
import
{
Inject
,
Inject
able
}
from
'
@angular/core
'
import
{
Injectable
}
from
'
@angular/core
'
import
{
ElectronService
}
from
'
./electron.service
'
import
{
ConfigService
}
from
'
./config.service
'
import
ua
=
require
(
'
universal-analytics
'
)
@
Injectable
()
export
class
HomeBaseService
{
...
...
@@ -8,8 +10,13 @@ export class HomeBaseService {
constructor
(
private
electron
:
ElectronService
,
private
config
:
ConfigService
,
)
{
this
.
appVersion
=
electron
.
app
.
getVersion
()
if
(
this
.
config
.
store
.
enableAnalytics
)
{
this
.
enableAnalytics
()
}
}
openGitHub
()
{
...
...
@@ -26,4 +33,11 @@ export class HomeBaseService {
}[
os
.
platform
()]
this
.
electron
.
shell
.
openExternal
(
`https://github.com/eugeny/terminus/issues/new?body=
${
encodeURIComponent
(
body
)}
&labels=
${
label
}
`
)
}
enableAnalytics
()
{
const
session
=
ua
(
'
UA-3278102-20
'
)
session
.
set
(
'
cd1
'
,
this
.
appVersion
)
session
.
set
(
'
cd2
'
,
process
.
platform
)
session
.
pageview
(
'
/
'
).
send
()
}
}
terminus-core/src/theme.scss
浏览文件 @
2e558e2a
...
...
@@ -46,7 +46,7 @@ $nav-tabs-active-link-hover-border-color: darken($blue, 30%);
$nav-pills-border-radius
:
0
;
$input-bg
:
#111
;
$input-
bg-disabled
:
#333
;
$input-
disabled-bg
:
#333
;
$input-color
:
$body-color
;
$input-color-placeholder
:
#333
;
...
...
terminus-core/yarn.lock
浏览文件 @
2e558e2a
...
...
@@ -20,16 +20,47 @@
dependencies:
"@types/node" "*"
ajv@^5.1.0:
version "5.5.2"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965"
dependencies:
co "^4.6.0"
fast-deep-equal "^1.0.0"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.3.0"
argparse@^1.0.7:
version "1.0.9"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
dependencies:
sprintf-js "~1.0.2"
asn1@~0.2.3:
version "0.2.4"
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
dependencies:
safer-buffer "~2.1.0"
assert-plus@1.0.0, assert-plus@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
async@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/async/-/async-1.0.0.tgz#f8fc04ca3a13784ade9e1641af98578cfbd647a9"
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
aws-sign2@~0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
aws4@^1.6.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
axios@0.16.2:
version "0.16.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.16.2.tgz#ba4f92f17167dfbab40983785454b9ac149c3c6d"
...
...
@@ -37,6 +68,12 @@ axios@0.16.2:
follow-redirects "^1.2.3"
is-buffer "^1.1.5"
bcrypt-pbkdf@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
dependencies:
tweetnacl "^0.14.3"
bluebird-lst@^1.0.2, bluebird-lst@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/bluebird-lst/-/bluebird-lst-1.0.3.tgz#cc56c18660eff0a0b86e2c33d1659618f7005158"
...
...
@@ -47,28 +84,76 @@ bluebird@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c"
boom@4.x.x:
version "4.3.1"
resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31"
dependencies:
hoek "4.x.x"
boom@5.x.x:
version "5.2.0"
resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02"
dependencies:
hoek "4.x.x"
bootstrap@^4.1.3:
version "4.1.3"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.1.3.tgz#0eb371af2c8448e8c210411d0cb824a6409a12be"
caseless@~0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
co@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
colors@1.0.x:
version "1.0.3"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b"
combined-stream@1.0.6, combined-stream@~1.0.5:
version "1.0.6"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818"
dependencies:
delayed-stream "~1.0.0"
core-js@^2.4.1:
version "2.5.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b"
core-util-is@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
cryptiles@3.x.x:
version "3.1.2"
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe"
dependencies:
boom "5.x.x"
cycle@1.0.x:
version "1.0.3"
resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2"
dashdash@^1.12.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
dependencies:
assert-plus "^1.0.0"
debug@^2.4.5:
version "2.6.8"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc"
dependencies:
ms "2.0.0"
debug@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
dependencies:
ms "2.0.0"
debug@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.0.1.tgz#0564c612b521dc92d9f2988f0549e34f9c98db64"
...
...
@@ -79,6 +164,17 @@ deepmerge@^1.5.0:
version "1.5.1"
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.5.1.tgz#c053bf06fd7276f1994f70c09a0760cb61a56237"
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
ecc-jsbn@~0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
dependencies:
jsbn "~0.1.0"
safer-buffer "^2.1.0"
electron-builder-http@~19.27.5:
version "19.27.5"
resolved "https://registry.yarnpkg.com/electron-builder-http/-/electron-builder-http-19.27.5.tgz#800865df2e618ffab9e5b3b895c15b4ce7fd7f17"
...
...
@@ -112,16 +208,48 @@ esprima@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
extend@~3.0.1:
version "3.0.2"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
extsprintf@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
extsprintf@^1.2.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
eyes@0.1.x:
version "0.1.8"
resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0"
fast-deep-equal@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
fast-json-stable-stringify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
follow-redirects@^1.2.3:
version "1.2.4"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.2.4.tgz#355e8f4d16876b43f577b0d5ce2668b9723214ea"
dependencies:
debug "^2.4.5"
forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
form-data@~2.3.1:
version "2.3.2"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099"
dependencies:
asynckit "^0.4.0"
combined-stream "1.0.6"
mime-types "^2.1.12"
fs-extra-p@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/fs-extra-p/-/fs-extra-p-4.4.0.tgz#729c601c4f4c701328921adc7cfe9b236f100660"
...
...
@@ -137,15 +265,57 @@ fs-extra@^4.0.0:
jsonfile "^3.0.0"
universalify "^0.1.0"
getpass@^0.1.1:
version "0.1.7"
resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
dependencies:
assert-plus "^1.0.0"
graceful-fs@^4.1.2, graceful-fs@^4.1.6:
version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
har-schema@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
har-validator@~5.0.3:
version "5.0.3"
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd"
dependencies:
ajv "^5.1.0"
har-schema "^2.0.0"
hawk@~6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038"
dependencies:
boom "4.x.x"
cryptiles "3.x.x"
hoek "4.x.x"
sntp "2.x.x"
hoek@4.x.x:
version "4.2.1"
resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb"
http-signature@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
dependencies:
assert-plus "^1.0.0"
jsprim "^1.2.2"
sshpk "^1.7.0"
is-buffer@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc"
isstream@0.1.x:
is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
isstream@0.1.x, isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
...
...
@@ -156,12 +326,37 @@ js-yaml@^3.9.0, js-yaml@^3.9.1:
argparse "^1.0.7"
esprima "^4.0.0"
jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
json-schema-traverse@^0.3.0:
version "0.3.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340"
json-schema@0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
json-stringify-safe@~5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
jsonfile@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66"
optionalDependencies:
graceful-fs "^4.1.6"
jsprim@^1.2.2:
version "1.4.1"
resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
dependencies:
assert-plus "1.0.0"
extsprintf "1.3.0"
json-schema "0.2.3"
verror "1.10.0"
lazy-val@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.2.tgz#d9b07fb1fce54cbc99b3c611de431b83249369b6"
...
...
@@ -174,6 +369,16 @@ macaddress@^0.2.7:
version "0.2.8"
resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12"
mime-db@~1.35.0:
version "1.35.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47"
mime-types@^2.1.12, mime-types@~2.1.17:
version "2.1.19"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.19.tgz#71e464537a7ef81c15f2db9d97e913fc0ff606f0"
dependencies:
mime-db "~1.35.0"
ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
...
...
@@ -189,14 +394,64 @@ ngx-perfect-scrollbar@^6.0.0:
perfect-scrollbar "^1.3.0"
resize-observer-polyfill "^1.4.0"
oauth-sign@~0.8.2:
version "0.8.2"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
perfect-scrollbar@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/perfect-scrollbar/-/perfect-scrollbar-1.3.0.tgz#61da56f94b58870d8e0a617bce649cee17d1e3b2"
performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
qs@~6.5.1:
version "6.5.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
request@2.86.0:
version "2.86.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.86.0.tgz#2b9497f449b0a32654c081a5cf426bbfb5bf5b69"
dependencies:
aws-sign2 "~0.7.0"
aws4 "^1.6.0"
caseless "~0.12.0"
combined-stream "~1.0.5"
extend "~3.0.1"
forever-agent "~0.6.1"
form-data "~2.3.1"
har-validator "~5.0.3"
hawk "~6.0.2"
http-signature "~1.2.0"
is-typedarray "~1.0.0"
isstream "~0.1.2"
json-stringify-safe "~5.0.1"
mime-types "~2.1.17"
oauth-sign "~0.8.2"
performance-now "^2.1.0"
qs "~6.5.1"
safe-buffer "^5.1.1"
tough-cookie "~2.3.3"
tunnel-agent "^0.6.0"
uuid "^3.1.0"
resize-observer-polyfill@^1.4.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.0.tgz#660ff1d9712a2382baa2cad450a4716209f9ca69"
safe-buffer@^5.0.1, safe-buffer@^5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
version "2.1.2"
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
sax@^1.2.1:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
...
...
@@ -205,6 +460,12 @@ semver@^5.4.1:
version "5.4.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
sntp@2.x.x:
version "2.1.0"
resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8"
dependencies:
hoek "4.x.x"
source-map-support@^0.4.16:
version "0.4.17"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.17.tgz#6f2150553e6375375d0ccb3180502b78c18ba430"
...
...
@@ -219,10 +480,49 @@ sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
sshpk@^1.7.0:
version "1.14.2"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98"
dependencies:
asn1 "~0.2.3"
assert-plus "^1.0.0"
dashdash "^1.12.0"
getpass "^0.1.1"
safer-buffer "^2.0.2"
optionalDependencies:
bcrypt-pbkdf "^1.0.0"
ecc-jsbn "~0.1.1"
jsbn "~0.1.0"
tweetnacl "~0.14.0"
stack-trace@0.0.x:
version "0.0.10"
resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0"
tough-cookie@~2.3.3:
version "2.3.4"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655"
dependencies:
punycode "^1.4.1"
tunnel-agent@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
dependencies:
safe-buffer "^5.0.1"
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
version "0.14.5"
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
universal-analytics@^0.4.17:
version "0.4.17"
resolved "https://registry.yarnpkg.com/universal-analytics/-/universal-analytics-0.4.17.tgz#b57a07e37446ebe4f32872b2152a44cbc5cc4b73"
dependencies:
debug "^3.0.0"
request "2.86.0"
uuid "^3.0.0"
universalify@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
...
...
@@ -233,6 +533,18 @@ uuid-1345@^0.99.6:
dependencies:
macaddress "^0.2.7"
uuid@^3.0.0, uuid@^3.1.0:
version "3.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
verror@1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
dependencies:
assert-plus "^1.0.0"
core-util-is "1.0.2"
extsprintf "^1.2.0"
winston@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/winston/-/winston-2.4.0.tgz#808050b93d52661ed9fb6c26b3f0c826708b0aee"
...
...
terminus-settings/src/components/settingsTab.component.pug
浏览文件 @
2e558e2a
...
...
@@ -19,8 +19,6 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
i.fa.fa-bug
span Report a problem
.form-line
.header
.title Theme
...
...
@@ -213,6 +211,15 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
i.fa.fa-bug
span Open DevTools
.form-line
.header
.title Enable analytics
.description We use Google Analytics
toggle(
[(ngModel)]='config.store.enableAnalytics',
(ngModelChange)='config.save(); config.requestRestart()',
)
.form-line
.header
.title Custom CSS
...
...
@@ -253,3 +260,29 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
| {{provider.title}}
ng-template(ngbTabContent)
settings-tab-body([provider]='provider')
ngb-tab(id='config-file')
ng-template(ngbTabTitle)
| Config file
ng-template.test(ngbTabContent)
.d-flex.flex-column.w-100.h-100
.h-100.d-flex
.w-100.d-flex.flex-column
h3 Config file
textarea.form-control.h-100(
[(ngModel)]='configFile'
)
.w-100.d-flex.flex-column
h3 Defaults
textarea.form-control.h-100(
[(ngModel)]='configDefaults',
readonly
)
.mt-3
button.btn.btn-primary((click)='saveConfigFile()', *ngIf='isConfigFileValid()')
i.fa.fa-check.mr-2
| Save and apply
button.btn.btn-primary(disabled, *ngIf='!isConfigFileValid()')
i.fa.fa-warning.mr-2
| Invalid syntax
terminus-settings/src/components/settingsTab.component.scss
浏览文件 @
2e558e2a
...
...
@@ -20,5 +20,5 @@
textarea
{
font-family
:
'Source Sans Mono'
,
monospace
;
height
:
120px
;
min-
height
:
120px
;
}
terminus-settings/src/components/settingsTab.component.ts
浏览文件 @
2e558e2a
import
*
as
yaml
from
'
js-yaml
'
import
{
Subscription
}
from
'
rxjs
'
import
{
Component
,
Inject
,
Input
}
from
'
@angular/core
'
import
{
ElectronService
,
DockingService
,
ConfigService
,
IHotkeyDescription
,
HotkeyProvider
,
BaseTabComponent
,
Theme
,
HostAppService
,
Platform
,
HomeBaseService
}
from
'
terminus-core
'
...
...
@@ -17,6 +19,9 @@ export class SettingsTabComponent extends BaseTabComponent {
hotkeyDescriptions
:
IHotkeyDescription
[]
screens
:
any
[]
Platform
=
Platform
configDefaults
:
any
configFile
:
string
private
configSubscription
:
Subscription
constructor
(
public
config
:
ConfigService
,
...
...
@@ -34,6 +39,12 @@ export class SettingsTabComponent extends BaseTabComponent {
this
.
screens
=
this
.
docking
.
getScreens
()
this
.
settingsProviders
=
config
.
enabledServices
(
this
.
settingsProviders
)
this
.
themes
=
config
.
enabledServices
(
this
.
themes
)
this
.
configDefaults
=
yaml
.
safeDump
(
config
.
getDefaults
())
this
.
configFile
=
config
.
readRaw
()
this
.
configSubscription
=
config
.
changed$
.
subscribe
(()
=>
{
this
.
configFile
=
config
.
readRaw
()
})
}
getRecoveryToken
():
any
{
...
...
@@ -41,6 +52,7 @@ export class SettingsTabComponent extends BaseTabComponent {
}
ngOnDestroy
()
{
this
.
configSubscription
.
unsubscribe
()
this
.
config
.
save
()
}
...
...
@@ -48,4 +60,19 @@ export class SettingsTabComponent extends BaseTabComponent {
this
.
electron
.
app
.
relaunch
()
this
.
electron
.
app
.
exit
()
}
saveConfigFile
()
{
if
(
this
.
isConfigFileValid
())
{
this
.
config
.
writeRaw
(
this
.
configFile
)
}
}
isConfigFileValid
()
{
try
{
yaml
.
safeLoad
(
this
.
configFile
)
return
true
}
catch
(
_
)
{
return
false
}
}
}
terminus-settings/src/components/settingsTab.deep.component.css
浏览文件 @
2e558e2a
...
...
@@ -12,6 +12,12 @@
:host
/
deep
/
ngb-tabset
>
.tab-content
{
padding
:
15px
30px
;
margin
:
0
;
flex
:
auto
;
overflow-y
:
auto
;
flex
:
auto
;
display
:
flex
;
position
:
relative
;
}
:host
/
deep
/
ngb-tabset
>
.tab-content
>
.tab-pane
{
width
:
100%
;
}
terminus-settings/src/index.ts
浏览文件 @
2e558e2a
...
...
@@ -5,6 +5,7 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap'
import
{
NgPipesModule
}
from
'
ngx-pipes
'
import
{
ToolbarButtonProvider
,
TabRecoveryProvider
}
from
'
terminus-core
'
import
TerminusCorePlugin
from
'
terminus-core
'
import
{
HotkeyInputModalComponent
}
from
'
./components/hotkeyInputModal.component
'
import
{
MultiHotkeyInputComponent
}
from
'
./components/multiHotkeyInput.component
'
...
...
@@ -20,6 +21,7 @@ import { RecoveryProvider } from './recoveryProvider'
FormsModule
,
NgbModule
,
NgPipesModule
,
TerminusCorePlugin
,
],
providers
:
[
{
provide
:
ToolbarButtonProvider
,
useClass
:
ButtonProvider
,
multi
:
true
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录