@becrafter/prompt-manager 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/env.example +1 -1
- package/package.json +1 -1
- package/packages/admin-ui/admin.html +49 -0
- package/packages/admin-ui/css/codemirror-theme_xq-light.css +43 -0
- package/packages/admin-ui/css/codemirror.css +344 -0
- package/packages/admin-ui/css/main.css +4485 -0
- package/packages/admin-ui/css/markdown.css +468 -0
- package/packages/admin-ui/css/optimization.css +1015 -0
- package/packages/admin-ui/css/recommended-prompts.css +610 -0
- package/packages/admin-ui/css/terminal-fix.css +571 -0
- package/packages/admin-ui/package-lock.json +8287 -0
- package/packages/admin-ui/package.json +46 -0
- package/packages/admin-ui/src/codemirror.js +53 -0
- package/packages/admin-ui/src/components/ArgumentModal.js +53 -0
- package/packages/admin-ui/src/components/DeletePromptModal.js +30 -0
- package/packages/admin-ui/src/components/HeaderView.js +40 -0
- package/packages/admin-ui/src/components/LoadingOverlay.js +12 -0
- package/packages/admin-ui/src/components/LoginView.js +22 -0
- package/packages/admin-ui/src/components/ModelConfigModal.js +103 -0
- package/packages/admin-ui/src/components/NewFolderModal.js +58 -0
- package/packages/admin-ui/src/components/OptimizationConfigModal.js +36 -0
- package/packages/admin-ui/src/components/OptimizationDrawer.js +135 -0
- package/packages/admin-ui/src/components/PrimaryNav.js +34 -0
- package/packages/admin-ui/src/components/PromptsArea.js +140 -0
- package/packages/admin-ui/src/components/RecommendedPromptModal.js +37 -0
- package/packages/admin-ui/src/components/SidebarView.js +24 -0
- package/packages/admin-ui/src/components/SyncPromptModal.js +44 -0
- package/packages/admin-ui/src/components/TemplateEditorModal.js +75 -0
- package/packages/admin-ui/src/components/TemplateListModal.js +30 -0
- package/packages/admin-ui/src/components/TerminalComponent.js +995 -0
- package/packages/admin-ui/src/components/TerminalView.js +25 -0
- package/packages/admin-ui/src/components/ToolDetailModal.js +23 -0
- package/packages/admin-ui/src/components/ToolsArea.js +119 -0
- package/packages/admin-ui/src/components/ToolsUploadModal.js +59 -0
- package/packages/admin-ui/src/index.js +6766 -0
- package/packages/server/utils/config.js +1 -1
|
@@ -0,0 +1,571 @@
|
|
|
1
|
+
/* 终端字体修复 - Warp终端样式(优化版) */
|
|
2
|
+
|
|
3
|
+
/* ============================================
|
|
4
|
+
核心字体配置
|
|
5
|
+
============================================ */
|
|
6
|
+
|
|
7
|
+
.composition-view {
|
|
8
|
+
display: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* 为xterm设置合适的等宽字体,解决字体重叠问题 */
|
|
12
|
+
.xterm {
|
|
13
|
+
font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Monaco, 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace !important;
|
|
14
|
+
font-size: 14px !important;
|
|
15
|
+
line-height: 1.2 !important;
|
|
16
|
+
letter-spacing: 0 !important;
|
|
17
|
+
font-feature-settings: "liga" 0, "calt" 0 !important;
|
|
18
|
+
-webkit-font-feature-settings: "liga" 0, "calt" 0 !important;
|
|
19
|
+
-moz-font-feature-settings: "liga" 0, "calt" 0 !important;
|
|
20
|
+
font-weight: 400 !important;
|
|
21
|
+
-webkit-font-smoothing: antialiased !important;
|
|
22
|
+
-moz-osx-font-smoothing: grayscale !important;
|
|
23
|
+
text-rendering: optimizeLegibility !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* 确保字符渲染正确,防止重叠 */
|
|
27
|
+
.xterm .xterm-screen {
|
|
28
|
+
font-family: inherit !important;
|
|
29
|
+
font-size: inherit !important;
|
|
30
|
+
line-height: 1.2 !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.xterm .xterm-viewport {
|
|
34
|
+
font-family: inherit !important;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* 修复canvas渲染的字体 */
|
|
38
|
+
.xterm .xterm-screen canvas {
|
|
39
|
+
font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Monaco, 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace !important;
|
|
40
|
+
image-rendering: pixelated !important;
|
|
41
|
+
image-rendering: -moz-crisp-edges !important;
|
|
42
|
+
image-rendering: crisp-edges !important;
|
|
43
|
+
/* 强制启用硬件加速 */
|
|
44
|
+
transform: translateZ(0);
|
|
45
|
+
backface-visibility: hidden;
|
|
46
|
+
/* 优化 Canvas 渲染质量 */
|
|
47
|
+
-webkit-font-smoothing: antialiased !important;
|
|
48
|
+
-moz-osx-font-smoothing: grayscale !important;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* 字符测量元素使用相同字体 */
|
|
52
|
+
.xterm-char-measure-element {
|
|
53
|
+
font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Monaco, 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace !important;
|
|
54
|
+
font-size: 14px !important;
|
|
55
|
+
line-height: 1.2 !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* 行高设置 */
|
|
59
|
+
.xterm-rows {
|
|
60
|
+
line-height: 1.2 !important;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.xterm-row {
|
|
64
|
+
height: 1.2em !important;
|
|
65
|
+
line-height: 1.2 !important;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.xterm-char {
|
|
69
|
+
width: 0.6em !important;
|
|
70
|
+
height: 1.2em !important;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* 确保输入框字体一致 */
|
|
74
|
+
.xterm textarea {
|
|
75
|
+
font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace !important;
|
|
76
|
+
font-size: 14px !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* 修复中文字符显示 */
|
|
80
|
+
.xterm-unicode {
|
|
81
|
+
font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', 'PingFang SC', 'Microsoft YaHei', monospace !important;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* ============================================
|
|
85
|
+
主题配置
|
|
86
|
+
============================================ */
|
|
87
|
+
|
|
88
|
+
/* 暗色主题优化 */
|
|
89
|
+
.xterm.theme-dark {
|
|
90
|
+
background: #0a0a0a !important;
|
|
91
|
+
color: #f0f0f0 !important;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* 浅色主题优化 */
|
|
95
|
+
.xterm.theme-light {
|
|
96
|
+
background: #ffffff !important;
|
|
97
|
+
color: #1a1a1a !important;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* ============================================
|
|
101
|
+
光标样式优化
|
|
102
|
+
============================================ */
|
|
103
|
+
|
|
104
|
+
/* 深色主题光标 */
|
|
105
|
+
.xterm.theme-dark .xterm-cursor {
|
|
106
|
+
background: #ffffff !important;
|
|
107
|
+
border: none !important;
|
|
108
|
+
width: 8px !important;
|
|
109
|
+
box-shadow: 0 0 4px rgba(255, 255, 255, 0.5) !important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* 浅色主题光标 */
|
|
113
|
+
.xterm.theme-light .xterm-cursor {
|
|
114
|
+
background: #1a1a1a !important;
|
|
115
|
+
border: none !important;
|
|
116
|
+
width: 8px !important;
|
|
117
|
+
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3) !important;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* ============================================
|
|
121
|
+
选中效果优化(改进对比度)
|
|
122
|
+
============================================ */
|
|
123
|
+
|
|
124
|
+
/* 默认选中效果 */
|
|
125
|
+
.xterm .xterm-rows {
|
|
126
|
+
position: relative;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.xterm .xterm-rows > div {
|
|
130
|
+
position: relative;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.xterm .xterm-rows > div.xterm-focus .xterm-selection,
|
|
134
|
+
.xterm .xterm-rows .xterm-selection {
|
|
135
|
+
background-color: rgba(74, 144, 226, 0.4) !important;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* 浅色主题下的选中效果 - 更明显的对比度 */
|
|
139
|
+
.xterm.theme-light .xterm-rows > div.xterm-focus .xterm-selection,
|
|
140
|
+
.xterm.theme-light .xterm-rows .xterm-selection {
|
|
141
|
+
background-color: rgba(24, 144, 255, 0.25) !important;
|
|
142
|
+
border: 1px solid rgba(24, 144, 255, 0.4) !important;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* 深色主题下的选中效果 */
|
|
146
|
+
.xterm.theme-dark .xterm-rows > div.xterm-focus .xterm-selection,
|
|
147
|
+
.xterm.theme-dark .xterm-rows .xterm-selection {
|
|
148
|
+
background-color: rgba(100, 181, 246, 0.35) !important;
|
|
149
|
+
border: 1px solid rgba(100, 181, 246, 0.5) !important;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* xterm-selection span 选中样式 */
|
|
153
|
+
.xterm .xterm-selection span {
|
|
154
|
+
background-color: inherit !important;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* 确保浅色主题下的选中文字可见 - 使用深色文字增强对比 */
|
|
158
|
+
.xterm.theme-light .xterm-selection span {
|
|
159
|
+
color: #000000 !important;
|
|
160
|
+
font-weight: 600 !important;
|
|
161
|
+
text-shadow: 0 0 1px rgba(255, 255, 255, 0.5) !important;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* 确保深色主题下的选中文字可见 - 使用浅色文字增强对比 */
|
|
165
|
+
.xterm.theme-dark .xterm-selection span {
|
|
166
|
+
color: #ffffff !important;
|
|
167
|
+
font-weight: 600 !important;
|
|
168
|
+
text-shadow: 0 0 1px rgba(0, 0, 0, 0.8) !important;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* 强制覆盖选中样式 - 浅色主题 */
|
|
172
|
+
body .xterm.theme-light .xterm-selection,
|
|
173
|
+
body .xterm.theme-light .xterm-rows .xterm-selection,
|
|
174
|
+
body .xterm.theme-light .xterm-rows > div .xterm-selection,
|
|
175
|
+
body .xterm.theme-light .xterm-screen .xterm-selection,
|
|
176
|
+
body div.xterm.theme-light .xterm-selection {
|
|
177
|
+
background-color: rgba(24, 144, 255, 0.25) !important;
|
|
178
|
+
border: 1px solid rgba(24, 144, 255, 0.4) !important;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* 强制覆盖选中样式 - 深色主题 */
|
|
182
|
+
body .xterm.theme-dark .xterm-selection,
|
|
183
|
+
body .xterm.theme-dark .xterm-rows .xterm-selection,
|
|
184
|
+
body .xterm.theme-dark .xterm-rows > div .xterm-selection,
|
|
185
|
+
body .xterm.theme-dark .xterm-screen .xterm-selection,
|
|
186
|
+
body div.xterm.theme-dark .xterm-selection {
|
|
187
|
+
background-color: rgba(100, 181, 246, 0.35) !important;
|
|
188
|
+
border: 1px solid rgba(100, 181, 246, 0.5) !important;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* 选中文字颜色 - 浅色主题 */
|
|
192
|
+
body .xterm.theme-light .xterm-selection span,
|
|
193
|
+
body .xterm.theme-light .xterm-selection .xterm-char {
|
|
194
|
+
color: #000000 !important;
|
|
195
|
+
font-weight: 600 !important;
|
|
196
|
+
text-shadow: 0 0 1px rgba(255, 255, 255, 0.5) !important;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* 选中文字颜色 - 深色主题 */
|
|
200
|
+
body .xterm.theme-dark .xterm-selection span,
|
|
201
|
+
body .xterm.theme-dark .xterm-selection .xterm-char {
|
|
202
|
+
color: #ffffff !important;
|
|
203
|
+
font-weight: 600 !important;
|
|
204
|
+
text-shadow: 0 0 1px rgba(0, 0, 0, 0.8) !important;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* ============================================
|
|
208
|
+
滚动条样式优化
|
|
209
|
+
============================================ */
|
|
210
|
+
|
|
211
|
+
.xterm .xterm-viewport::-webkit-scrollbar {
|
|
212
|
+
width: 8px !important;
|
|
213
|
+
height: 8px !important;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.xterm .xterm-viewport::-webkit-scrollbar-track {
|
|
217
|
+
background: transparent !important;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.xterm .xterm-viewport::-webkit-scrollbar-thumb {
|
|
221
|
+
background: rgba(128, 128, 128, 0.4) !important;
|
|
222
|
+
border-radius: 4px !important;
|
|
223
|
+
transition: background-color 0.2s ease !important;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.xterm .xterm-viewport::-webkit-scrollbar-thumb:hover {
|
|
227
|
+
background: rgba(128, 128, 128, 0.6) !important;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* 浅色主题滚动条 */
|
|
231
|
+
.xterm.theme-light .xterm-viewport::-webkit-scrollbar-thumb {
|
|
232
|
+
background: rgba(0, 0, 0, 0.2) !important;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.xterm.theme-light .xterm-viewport::-webkit-scrollbar-thumb:hover {
|
|
236
|
+
background: rgba(0, 0, 0, 0.3) !important;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* 深色主题滚动条 */
|
|
240
|
+
.xterm.theme-dark .xterm-viewport::-webkit-scrollbar-thumb {
|
|
241
|
+
background: rgba(255, 255, 255, 0.2) !important;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.xterm.theme-dark .xterm-viewport::-webkit-scrollbar-thumb:hover {
|
|
245
|
+
background: rgba(255, 255, 255, 0.3) !important;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* ============================================
|
|
249
|
+
响应式字体大小调整
|
|
250
|
+
============================================ */
|
|
251
|
+
|
|
252
|
+
@media (max-width: 768px) {
|
|
253
|
+
.xterm {
|
|
254
|
+
font-size: 12px !important;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.xterm-char-measure-element {
|
|
258
|
+
font-size: 12px !important;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@media (max-width: 480px) {
|
|
263
|
+
.xterm {
|
|
264
|
+
font-size: 11px !important;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.xterm-char-measure-element {
|
|
268
|
+
font-size: 11px !important;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* ============================================
|
|
273
|
+
高DPI屏幕优化
|
|
274
|
+
============================================ */
|
|
275
|
+
|
|
276
|
+
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
277
|
+
.xterm .xterm-screen canvas {
|
|
278
|
+
/* 高DPI屏幕使用自动渲染以获得更好的清晰度 */
|
|
279
|
+
image-rendering: auto !important;
|
|
280
|
+
/* 确保在高DPI屏幕上使用正确的缩放 */
|
|
281
|
+
transform: translateZ(0);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/* Canvas 渲染器优化 - 确保正确的层级和定位 */
|
|
286
|
+
.xterm .xterm-screen {
|
|
287
|
+
position: relative !important;
|
|
288
|
+
overflow: hidden !important;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* 确保 Canvas 渲染器优先于 DOM 元素 */
|
|
292
|
+
.xterm .xterm-screen canvas {
|
|
293
|
+
position: relative !important;
|
|
294
|
+
z-index: 1 !important;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/* 隐藏 DOM 渲染元素(当使用 Canvas 时) */
|
|
298
|
+
.xterm.xterm-canvas-mode .xterm-rows {
|
|
299
|
+
display: none !important;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/* ============================================
|
|
303
|
+
终端容器样式
|
|
304
|
+
============================================ */
|
|
305
|
+
|
|
306
|
+
/* 确保终端容器正确显示 */
|
|
307
|
+
.terminal-content {
|
|
308
|
+
background: #0a0a0a !important;
|
|
309
|
+
display: flex;
|
|
310
|
+
flex-direction: column;
|
|
311
|
+
height: 100%;
|
|
312
|
+
overflow: hidden;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* 浅色主题容器 */
|
|
316
|
+
.terminal-content.theme-light {
|
|
317
|
+
background: #ffffff !important;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* 旧版终端输出样式(兼容性) */
|
|
321
|
+
.terminal-output {
|
|
322
|
+
font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Monaco, 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace !important;
|
|
323
|
+
font-size: 14px !important;
|
|
324
|
+
line-height: 1.2 !important;
|
|
325
|
+
background: #0a0a0a !important;
|
|
326
|
+
color: #f0f0f0 !important;
|
|
327
|
+
font-weight: 400 !important;
|
|
328
|
+
-webkit-font-smoothing: antialiased !important;
|
|
329
|
+
-moz-osx-font-smoothing: grayscale !important;
|
|
330
|
+
padding: 10px;
|
|
331
|
+
overflow-y: auto;
|
|
332
|
+
flex: 1;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.terminal-input-area {
|
|
336
|
+
font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Monaco, 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace !important;
|
|
337
|
+
font-size: 14px !important;
|
|
338
|
+
background: #0a0a0a !important;
|
|
339
|
+
line-height: 1.2 !important;
|
|
340
|
+
padding: 10px;
|
|
341
|
+
border-top: 1px solid #333;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.terminal-prompt {
|
|
345
|
+
font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Monaco, 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace !important;
|
|
346
|
+
font-size: 14px !important;
|
|
347
|
+
line-height: 1.2 !important;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
#terminalInput {
|
|
351
|
+
font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Monaco, 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace !important;
|
|
352
|
+
font-size: 14px !important;
|
|
353
|
+
line-height: 1.2 !important;
|
|
354
|
+
font-weight: 400 !important;
|
|
355
|
+
background: transparent !important;
|
|
356
|
+
border: none !important;
|
|
357
|
+
color: inherit !important;
|
|
358
|
+
outline: none !important;
|
|
359
|
+
flex: 1;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/* ============================================
|
|
363
|
+
终端工具栏样式
|
|
364
|
+
============================================ */
|
|
365
|
+
|
|
366
|
+
.terminal-toolbar {
|
|
367
|
+
display: flex;
|
|
368
|
+
justify-content: space-between;
|
|
369
|
+
align-items: center;
|
|
370
|
+
padding: 8px 12px;
|
|
371
|
+
background: rgba(0, 0, 0, 0.5);
|
|
372
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
373
|
+
backdrop-filter: blur(10px);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.terminal-status {
|
|
377
|
+
display: flex;
|
|
378
|
+
align-items: center;
|
|
379
|
+
gap: 8px;
|
|
380
|
+
font-size: 12px;
|
|
381
|
+
color: rgba(255, 255, 255, 0.7);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.renderer-info {
|
|
385
|
+
font-size: 11px;
|
|
386
|
+
padding: 2px 6px;
|
|
387
|
+
border-radius: 3px;
|
|
388
|
+
background: rgba(255, 255, 255, 0.1);
|
|
389
|
+
cursor: help;
|
|
390
|
+
transition: all 0.2s ease;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.renderer-info:hover {
|
|
394
|
+
background: rgba(255, 255, 255, 0.2);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.status-indicator {
|
|
398
|
+
width: 8px;
|
|
399
|
+
height: 8px;
|
|
400
|
+
border-radius: 50%;
|
|
401
|
+
background: #666;
|
|
402
|
+
transition: background-color 0.3s ease;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.status-indicator.connected {
|
|
406
|
+
background: #4caf50;
|
|
407
|
+
box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.status-indicator.disconnected {
|
|
411
|
+
background: #f44336;
|
|
412
|
+
box-shadow: 0 0 8px rgba(244, 67, 54, 0.5);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.status-indicator.reconnecting {
|
|
416
|
+
background: #ff9800;
|
|
417
|
+
animation: pulse 1s infinite;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
@keyframes pulse {
|
|
421
|
+
0%, 100% {
|
|
422
|
+
opacity: 1;
|
|
423
|
+
}
|
|
424
|
+
50% {
|
|
425
|
+
opacity: 0.5;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.terminal-actions {
|
|
430
|
+
display: flex;
|
|
431
|
+
gap: 8px;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.terminal-actions .btn {
|
|
435
|
+
padding: 4px 8px;
|
|
436
|
+
font-size: 12px;
|
|
437
|
+
background: rgba(255, 255, 255, 0.1);
|
|
438
|
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
439
|
+
color: rgba(255, 255, 255, 0.7);
|
|
440
|
+
border-radius: 4px;
|
|
441
|
+
cursor: pointer;
|
|
442
|
+
transition: all 0.2s ease;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.terminal-actions .btn:hover {
|
|
446
|
+
background: rgba(255, 255, 255, 0.2);
|
|
447
|
+
color: rgba(255, 255, 255, 1);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/* 浅色主题工具栏 */
|
|
451
|
+
.theme-light .terminal-toolbar {
|
|
452
|
+
background: rgba(0, 0, 0, 0.05);
|
|
453
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.theme-light .terminal-status {
|
|
457
|
+
color: rgba(0, 0, 0, 0.7);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.theme-light .terminal-actions .btn {
|
|
461
|
+
background: rgba(0, 0, 0, 0.05);
|
|
462
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
463
|
+
color: rgba(0, 0, 0, 0.7);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.theme-light .terminal-actions .btn:hover {
|
|
467
|
+
background: rgba(0, 0, 0, 0.1);
|
|
468
|
+
color: rgba(0, 0, 0, 1);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/* ============================================
|
|
472
|
+
终端加载和错误状态
|
|
473
|
+
============================================ */
|
|
474
|
+
|
|
475
|
+
.terminal-loading {
|
|
476
|
+
display: flex;
|
|
477
|
+
flex-direction: column;
|
|
478
|
+
align-items: center;
|
|
479
|
+
justify-content: center;
|
|
480
|
+
position: absolute;
|
|
481
|
+
top: 0;
|
|
482
|
+
left: 0;
|
|
483
|
+
right: 0;
|
|
484
|
+
bottom: 0;
|
|
485
|
+
background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
|
|
486
|
+
color: #e0e0e0;
|
|
487
|
+
font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Monaco, 'Menlo', 'Consolas', 'Courier New', monospace;
|
|
488
|
+
z-index: 10;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.terminal-loading .loading-spinner {
|
|
492
|
+
width: 48px;
|
|
493
|
+
height: 48px;
|
|
494
|
+
border: 3px solid rgba(255, 255, 255, 0.1);
|
|
495
|
+
border-top: 3px solid #4a9eff;
|
|
496
|
+
border-radius: 50%;
|
|
497
|
+
animation: spin 0.8s linear infinite;
|
|
498
|
+
margin-bottom: 20px;
|
|
499
|
+
box-shadow: 0 0 20px rgba(74, 158, 255, 0.3);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.terminal-loading p {
|
|
503
|
+
margin: 0;
|
|
504
|
+
font-size: 15px;
|
|
505
|
+
font-weight: 500;
|
|
506
|
+
opacity: 0.9;
|
|
507
|
+
letter-spacing: 0.5px;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.terminal-error {
|
|
511
|
+
display: flex;
|
|
512
|
+
flex-direction: column;
|
|
513
|
+
align-items: center;
|
|
514
|
+
justify-content: center;
|
|
515
|
+
padding: 40px 20px;
|
|
516
|
+
text-align: center;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
@keyframes spin {
|
|
520
|
+
to {
|
|
521
|
+
transform: rotate(360deg);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.terminal-error h3 {
|
|
526
|
+
margin: 0 0 8px 0;
|
|
527
|
+
color: #f44336;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.terminal-error p {
|
|
531
|
+
margin: 0 0 16px 0;
|
|
532
|
+
color: rgba(255, 255, 255, 0.7);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.terminal-error ul {
|
|
536
|
+
text-align: left;
|
|
537
|
+
color: rgba(255, 255, 255, 0.7);
|
|
538
|
+
margin: 0;
|
|
539
|
+
padding-left: 20px;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.terminal-error button {
|
|
543
|
+
margin-top: 16px;
|
|
544
|
+
padding: 8px 16px;
|
|
545
|
+
background: #4caf50;
|
|
546
|
+
border: none;
|
|
547
|
+
border-radius: 4px;
|
|
548
|
+
color: white;
|
|
549
|
+
cursor: pointer;
|
|
550
|
+
transition: background-color 0.2s ease;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.terminal-error button:hover {
|
|
554
|
+
background: #45a049;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/* ============================================
|
|
558
|
+
终端容器样式
|
|
559
|
+
============================================ */
|
|
560
|
+
|
|
561
|
+
.xterm-container {
|
|
562
|
+
flex: 1;
|
|
563
|
+
display: flex;
|
|
564
|
+
flex-direction: column;
|
|
565
|
+
overflow: hidden;
|
|
566
|
+
background: #0a0a0a;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.theme-light .xterm-container {
|
|
570
|
+
background: #ffffff;
|
|
571
|
+
}
|