-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
107 lines (91 loc) · 2.44 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
'use strict';
let foregroundColor = '#eff0eb';
let red = '#ff5c57';
let green = '#5af78e';
let yellow = '#f3f99d';
let blue = '#57c7ff';
let magenta = '#ff6ac1';
let cyan = '#9aedfe';
exports.decorateConfig = config => {
const QingConfig = config.QingTheme;
let ThemeBackground = `rgba(52, 52, 52, 1)`;
// custom
if (typeof QingConfig !== 'undefined') {
exports.onWindow = (browserWindow) => {
browserWindow.setVibrancy(QingConfig.hasOwnProperty('vibrancy') ? QingConfig.vibrancy : 'dark');
};
if (QingConfig.hasOwnProperty('backgroundOpacity')) {
ThemeBackground = `rgba(52, 52, 52, ${QingConfig.backgroundOpacity || '1'})`;
}
}
config.backgroundColor = ThemeBackground;
config.foregroundColor = foregroundColor;
config.borderColor = '#37474F';
config.cursorColor = '#97979b';
config.padding = `${config.padding || '24px 24px'}`;
return Object.assign({}, config, {
colors: {
black: '#343434',
red,
green,
yellow,
blue,
magenta,
cyan,
lightBlack: '#686868',
lightRed: red,
lightGreen: green,
lightYellow: yellow,
lightBlue: blue,
lightMagenta: magenta,
lightCyan: cyan,
lightWhite: foregroundColor
},
termCSS: `
${config.termCSS || ''}
*::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.2);
}
`,
css: `
${config.css}
.hyper_main {
border: none;
}
.tabs_title {
display: none !important;
}
.splitpane_divider {
background-color: rgba(0, 0, 0, 0.2) !important;
}
.tab_tab::before {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 2px;
background-color: rgba(0, 150, 136, 1);
transform: scaleX(0);
transition: none;
}
.tab_first {
border-left-color: transparent !important;
}
.tab_tab:not(.tab_active) {
color: #666;
}
.tab_tab {
border: none;
color: rgba(255, 255, 255, 1);
}
.tab_tab.tab_active::before {
transform: scaleX(1);
transition: all 200ms cubic-bezier(0.0, 0.0, 0.5, 1);
}
.tabs_borderShim {
display: none;
}
`
});
};