@jesonliu/lark-claudecode-bridge 0.19.0 → 0.20.1
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/README.md +77 -192
- package/assets/web/css/main.css +511 -113
- package/assets/web/index.html +12 -2
- package/assets/web/js/main.js +16 -10
- package/assets/web/js/pages/apps.js +10 -5
- package/assets/web/js/pages/claude.js +15 -5
- package/assets/web/js/pages/mcp.js +57 -21
- package/assets/web/js/pages/overview.js +5 -4
- package/assets/web/js/pages/permissions.js +56 -30
- package/assets/web/js/pages/plugins.js +29 -6
- package/assets/web/js/pages/skills.js +184 -11
- package/assets/web/js/pages/slash.js +11 -5
- package/assets/web/js/pages/workspaces.js +15 -14
- package/assets/web/js/theme.js +23 -0
- package/assets/web/js/ui.js +75 -4
- package/config.example.yaml +2 -3
- package/dist/access/access-control.d.ts +17 -1
- package/dist/access/access-control.js +31 -2
- package/dist/access/access-control.js.map +1 -1
- package/dist/claude-config.d.ts +14 -2
- package/dist/claude-config.js +75 -4
- package/dist/claude-config.js.map +1 -1
- package/dist/cli/setup-wizard.d.ts +0 -1
- package/dist/cli/setup-wizard.js +2 -4
- package/dist/cli/setup-wizard.js.map +1 -1
- package/dist/config.js +6 -7
- package/dist/config.js.map +1 -1
- package/dist/executor/claude-executor.d.ts +1 -1
- package/dist/executor/claude-executor.js +4 -2
- package/dist/executor/claude-executor.js.map +1 -1
- package/dist/executor/notify-server.d.ts +9 -2
- package/dist/executor/notify-server.js +34 -9
- package/dist/executor/notify-server.js.map +1 -1
- package/dist/gateway/card-builder.d.ts +54 -0
- package/dist/gateway/card-builder.js +160 -18
- package/dist/gateway/card-builder.js.map +1 -1
- package/dist/gateway/diff-card.js +1 -1
- package/dist/gateway/diff-card.js.map +1 -1
- package/dist/gateway/feishu-gateway.d.ts +20 -3
- package/dist/gateway/feishu-gateway.js +58 -4
- package/dist/gateway/feishu-gateway.js.map +1 -1
- package/dist/gateway/progress-card.d.ts +56 -0
- package/dist/gateway/progress-card.js +218 -8
- package/dist/gateway/progress-card.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +195 -42
- package/dist/index.js.map +1 -1
- package/dist/notify-sop.d.ts +1 -1
- package/dist/notify-sop.js +5 -2
- package/dist/notify-sop.js.map +1 -1
- package/dist/session/commands.d.ts +1 -1
- package/dist/session/commands.js +25 -2
- package/dist/session/commands.js.map +1 -1
- package/dist/session/session-store.d.ts +3 -0
- package/dist/session/session-store.js.map +1 -1
- package/dist/types.d.ts +11 -5
- package/dist/util/workspace-diff.js +2 -2
- package/dist/util/workspace-diff.js.map +1 -1
- package/dist/web/server.js +146 -13
- package/dist/web/server.js.map +1 -1
- package/dist/web/skills-mcp-api.d.ts +27 -4
- package/dist/web/skills-mcp-api.js +105 -14
- package/dist/web/skills-mcp-api.js.map +1 -1
- package/package.json +1 -1
package/assets/web/css/main.css
CHANGED
|
@@ -1,113 +1,511 @@
|
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
1
|
+
/* ============================================================
|
|
2
|
+
Web 配置页样式 · v2 视觉升级
|
|
3
|
+
约定:所有选择器与旧版保持兼容(JS 大量依赖 class/ID 钩子,勿改名)
|
|
4
|
+
—— 卡片 / 按钮 / 输入 / 表格 / 标签 / 抽屉 / 弹层 / Toast
|
|
5
|
+
—— 自动暗色模式(prefers-color-scheme)+ 减弱动效偏好
|
|
6
|
+
============================================================ */
|
|
7
|
+
:root {
|
|
8
|
+
color-scheme: light;
|
|
9
|
+
/* 色板(飞书系) */
|
|
10
|
+
--bg: #eef1f6;
|
|
11
|
+
--card: #ffffff;
|
|
12
|
+
--field: #ffffff;
|
|
13
|
+
--border: #e4e7ee;
|
|
14
|
+
--border-strong: #d3d9e4;
|
|
15
|
+
--text: #1f2329;
|
|
16
|
+
--muted: #646a73;
|
|
17
|
+
--primary: #3370ff;
|
|
18
|
+
--primary-strong: #2b5fe3;
|
|
19
|
+
--primary-weak: #eef3ff;
|
|
20
|
+
--primary-ring: rgba(51, 112, 255, .16);
|
|
21
|
+
--danger: #f54f4f;
|
|
22
|
+
--ok: #2ea121;
|
|
23
|
+
--warn: #d97a00;
|
|
24
|
+
/* 状态标签底/字色 */
|
|
25
|
+
--ok-bg: #e9f7e5;
|
|
26
|
+
--warn-bg: #fff3e0;
|
|
27
|
+
--err-bg: #feecec;
|
|
28
|
+
--off-bg: #f0f1f5;
|
|
29
|
+
--ok-tx: #2ea121;
|
|
30
|
+
--warn-tx: #d97a00;
|
|
31
|
+
--err-tx: #f54f4f;
|
|
32
|
+
--off-tx: #8a9099;
|
|
33
|
+
/* 未保存条(warn 弱化底) */
|
|
34
|
+
--warn-weak: #fff8ef;
|
|
35
|
+
--warn-weak-border: #ffe1bb;
|
|
36
|
+
/* 代码 / 等宽 */
|
|
37
|
+
--code-bg: rgba(31, 35, 41, .06);
|
|
38
|
+
--mono: Consolas, "SF Mono", "Cascadia Mono", Menlo, monospace;
|
|
39
|
+
/* 圆角与阴影 */
|
|
40
|
+
--radius: 14px;
|
|
41
|
+
--radius-sm: 9px;
|
|
42
|
+
--shadow-1: 0 1px 2px rgba(31, 35, 41, .04), 0 1px 6px rgba(31, 35, 41, .03);
|
|
43
|
+
--shadow-2: 0 8px 28px rgba(31, 35, 41, .12);
|
|
44
|
+
--shadow-pop: 0 12px 40px rgba(31, 35, 41, .16);
|
|
45
|
+
/* 头部 */
|
|
46
|
+
--header-bg: rgba(255, 255, 255, .82);
|
|
47
|
+
--spin-track: #d9e2f5;
|
|
48
|
+
--toast-bg: rgba(31, 35, 41, .93);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media (prefers-color-scheme: dark) {
|
|
52
|
+
:root:not([data-theme="light"]) {
|
|
53
|
+
color-scheme: dark;
|
|
54
|
+
--bg: #0e1117;
|
|
55
|
+
--card: #161a23;
|
|
56
|
+
--field: #10141d;
|
|
57
|
+
--border: #262c3a;
|
|
58
|
+
--border-strong: #363e50;
|
|
59
|
+
--text: #e7eaf1;
|
|
60
|
+
--muted: #97a0b2;
|
|
61
|
+
--primary: #4d80ff;
|
|
62
|
+
--primary-strong: #6996ff;
|
|
63
|
+
--primary-weak: rgba(77, 128, 255, .14);
|
|
64
|
+
--primary-ring: rgba(77, 128, 255, .28);
|
|
65
|
+
--danger: #ff7373;
|
|
66
|
+
--ok: #5ad24a;
|
|
67
|
+
--warn: #ffa23e;
|
|
68
|
+
--ok-bg: rgba(52, 199, 36, .13);
|
|
69
|
+
--warn-bg: rgba(255, 136, 0, .13);
|
|
70
|
+
--err-bg: rgba(245, 79, 79, .13);
|
|
71
|
+
--off-bg: rgba(255, 255, 255, .06);
|
|
72
|
+
--ok-tx: #5ad24a;
|
|
73
|
+
--warn-tx: #ffa23e;
|
|
74
|
+
--err-tx: #ff7373;
|
|
75
|
+
--off-tx: #97a0b2;
|
|
76
|
+
--warn-weak: rgba(255, 136, 0, .09);
|
|
77
|
+
--warn-weak-border: rgba(255, 136, 0, .32);
|
|
78
|
+
--code-bg: rgba(255, 255, 255, .09);
|
|
79
|
+
--shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 8px rgba(0, 0, 0, .18);
|
|
80
|
+
--shadow-2: 0 8px 28px rgba(0, 0, 0, .45);
|
|
81
|
+
--shadow-pop: 0 12px 40px rgba(0, 0, 0, .55);
|
|
82
|
+
--header-bg: rgba(19, 23, 31, .82);
|
|
83
|
+
--spin-track: rgba(255, 255, 255, .16);
|
|
84
|
+
--toast-bg: rgba(58, 64, 78, .95);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* ---------- 基础 ---------- */
|
|
89
|
+
* { box-sizing: border-box; }
|
|
90
|
+
body {
|
|
91
|
+
margin: 0;
|
|
92
|
+
font: 14px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
|
93
|
+
background:
|
|
94
|
+
radial-gradient(1000px 480px at 6% -120px, rgba(51, 112, 255, .09), transparent 62%),
|
|
95
|
+
radial-gradient(820px 420px at 100% -160px, rgba(150, 110, 255, .06), transparent 58%),
|
|
96
|
+
var(--bg);
|
|
97
|
+
color: var(--text);
|
|
98
|
+
}
|
|
99
|
+
::selection { background: var(--primary-weak); }
|
|
100
|
+
|
|
101
|
+
/* 滚动条(Chromium/Safari + Firefox) */
|
|
102
|
+
::-webkit-scrollbar { width: 10px; height: 10px; }
|
|
103
|
+
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
|
|
104
|
+
::-webkit-scrollbar-thumb:hover { background-color: var(--muted); }
|
|
105
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
106
|
+
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
|
|
107
|
+
|
|
108
|
+
/* ---------- 顶栏 ---------- */
|
|
109
|
+
header {
|
|
110
|
+
background: var(--header-bg);
|
|
111
|
+
-webkit-backdrop-filter: blur(14px) saturate(1.5);
|
|
112
|
+
backdrop-filter: blur(14px) saturate(1.5);
|
|
113
|
+
border-bottom: 1px solid var(--border);
|
|
114
|
+
padding: 0 24px;
|
|
115
|
+
height: 56px;
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
gap: 14px;
|
|
119
|
+
position: sticky;
|
|
120
|
+
top: 0;
|
|
121
|
+
z-index: 10;
|
|
122
|
+
}
|
|
123
|
+
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
|
|
124
|
+
.logo {
|
|
125
|
+
width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
|
|
126
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
127
|
+
background: linear-gradient(135deg, #3370ff 0%, #5b8cff 60%, #7c5bff 130%);
|
|
128
|
+
box-shadow: 0 2px 8px rgba(51, 112, 255, .35);
|
|
129
|
+
}
|
|
130
|
+
header h1 { font-size: 15.5px; font-weight: 650; margin: 0; letter-spacing: .01em; white-space: nowrap; }
|
|
131
|
+
header .meta {
|
|
132
|
+
color: var(--muted); font-size: 12px;
|
|
133
|
+
background: var(--card); border: 1px solid var(--border);
|
|
134
|
+
border-radius: 999px; padding: 2px 11px;
|
|
135
|
+
font-variant-numeric: tabular-nums; white-space: nowrap;
|
|
136
|
+
}
|
|
137
|
+
header .meta:empty { display: none; }
|
|
138
|
+
header .spacer { flex: 1; }
|
|
139
|
+
|
|
140
|
+
.stale-bar {
|
|
141
|
+
background: var(--warn-bg); color: var(--warn-tx);
|
|
142
|
+
padding: 9px 24px; font-size: 13px; border-bottom: 1px solid var(--border);
|
|
143
|
+
}
|
|
144
|
+
.stale-bar[hidden] { display: none; }
|
|
145
|
+
|
|
146
|
+
/* ---------- 布局 / 侧栏 ---------- */
|
|
147
|
+
.layout { display: flex; min-height: calc(100vh - 56px); }
|
|
148
|
+
nav {
|
|
149
|
+
width: 196px; flex: 0 0 auto;
|
|
150
|
+
padding: 16px 10px 24px;
|
|
151
|
+
position: sticky; top: 56px; align-self: flex-start;
|
|
152
|
+
max-height: calc(100vh - 56px); overflow-y: auto;
|
|
153
|
+
}
|
|
154
|
+
nav button {
|
|
155
|
+
display: flex; align-items: center; gap: 10px;
|
|
156
|
+
width: 100%; padding: 8px 12px; margin: 2px 0;
|
|
157
|
+
border: 0; background: none; border-radius: var(--radius-sm);
|
|
158
|
+
cursor: pointer; font-size: 13.5px; color: var(--text);
|
|
159
|
+
transition: background .15s, color .15s;
|
|
160
|
+
position: relative;
|
|
161
|
+
}
|
|
162
|
+
nav button .ico { display: flex; align-items: center; color: var(--muted); transition: color .15s; }
|
|
163
|
+
nav button:hover { background: rgba(127, 140, 170, .10); }
|
|
164
|
+
nav button:hover .ico { color: var(--text); }
|
|
165
|
+
nav button.active { background: var(--primary-weak); color: var(--primary); font-weight: 600; }
|
|
166
|
+
nav button.active .ico { color: var(--primary); }
|
|
167
|
+
nav button.active::before {
|
|
168
|
+
content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
|
|
169
|
+
width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--primary);
|
|
170
|
+
}
|
|
171
|
+
nav button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
|
|
172
|
+
|
|
173
|
+
main { flex: 1; min-width: 0; padding: 24px 36px 56px; }
|
|
174
|
+
@media (min-width: 1800px) { main { max-width: 1560px; } }
|
|
175
|
+
@media (max-width: 860px) {
|
|
176
|
+
header { padding: 0 16px; }
|
|
177
|
+
header h1 { font-size: 14px; }
|
|
178
|
+
.layout { flex-direction: column; }
|
|
179
|
+
nav {
|
|
180
|
+
width: auto; max-height: none; position: sticky; top: 56px; z-index: 9;
|
|
181
|
+
display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px;
|
|
182
|
+
padding: 8px 12px; background: var(--header-bg);
|
|
183
|
+
-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
|
|
184
|
+
border-right: 0; border-bottom: 1px solid var(--border);
|
|
185
|
+
}
|
|
186
|
+
nav button { width: auto; flex: 0 0 auto; padding: 6px 12px; }
|
|
187
|
+
nav button.active::before { display: none; }
|
|
188
|
+
main { padding: 16px 16px 40px; }
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* ---------- 页头(main.js 注入:图标 + 标题) ---------- */
|
|
192
|
+
.page-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 20px; }
|
|
193
|
+
.page-head .ico {
|
|
194
|
+
width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto;
|
|
195
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
196
|
+
background: var(--primary-weak); color: var(--primary);
|
|
197
|
+
}
|
|
198
|
+
.page-head h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: .01em; }
|
|
199
|
+
#pageBody { animation: lcb-fade .18s ease; }
|
|
200
|
+
@keyframes lcb-fade { from { opacity: 0; transform: translateY(4px); } }
|
|
201
|
+
|
|
202
|
+
/* ---------- 卡片 ---------- */
|
|
203
|
+
.card {
|
|
204
|
+
background: var(--card); border: 1px solid var(--border);
|
|
205
|
+
border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px;
|
|
206
|
+
box-shadow: var(--shadow-1);
|
|
207
|
+
transition: box-shadow .2s;
|
|
208
|
+
}
|
|
209
|
+
.card:hover { box-shadow: var(--shadow-2); }
|
|
210
|
+
.card h3 { margin: 0 0 4px; font-size: 15px; font-weight: 650; }
|
|
211
|
+
.card h3 .dirty-dot { display: none; margin-left: 6px; font-size: 11.5px; color: var(--warn); font-weight: 500; }
|
|
212
|
+
.card .desc { color: var(--muted); font-size: 12.5px; margin-bottom: 12px; line-height: 1.7; }
|
|
213
|
+
main h4 { font-size: 13.5px; font-weight: 600; }
|
|
214
|
+
|
|
215
|
+
/* ---------- 表单 ---------- */
|
|
216
|
+
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 5px; }
|
|
217
|
+
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
|
|
218
|
+
width: 100%; padding: 8px 12px;
|
|
219
|
+
border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
|
|
220
|
+
font: inherit; background: var(--field); color: var(--text);
|
|
221
|
+
transition: border-color .15s, box-shadow .15s;
|
|
222
|
+
}
|
|
223
|
+
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
|
|
224
|
+
input:focus, select:focus, textarea:focus {
|
|
225
|
+
outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring);
|
|
226
|
+
}
|
|
227
|
+
input, select, textarea { accent-color: var(--primary); }
|
|
228
|
+
textarea { font-family: var(--mono); font-size: 12.5px; min-height: 96px; line-height: 1.6; resize: vertical; }
|
|
229
|
+
select { cursor: pointer; }
|
|
230
|
+
|
|
231
|
+
.row { display: flex; gap: 12px; }
|
|
232
|
+
.row > * { flex: 1; min-width: 0; }
|
|
233
|
+
/* 两列布局:配置项多的区块(如全局默认配置)一行 2 个,避免 4 列挤压 */
|
|
234
|
+
.row-2col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px; }
|
|
235
|
+
/* .row 内按钮按内容宽:内联 flex:0 展开会把按钮压到单字宽,一律走类规则 */
|
|
236
|
+
.row > .btn, .row > .btn-wrap { flex: 0 0 auto; align-self: end; }
|
|
237
|
+
.btn-wrap { display: flex; }
|
|
238
|
+
@media (max-width: 860px) { .row { flex-direction: column; } .row-2col { grid-template-columns: 1fr; } }
|
|
239
|
+
|
|
240
|
+
/* 输入框 + 行内按钮组合(路径框带「浏览」) */
|
|
241
|
+
.input-btn { display: flex; gap: 8px; }
|
|
242
|
+
.input-btn > input { flex: 1; min-width: 0; }
|
|
243
|
+
.input-btn > .btn { flex: 0 0 auto; align-self: center; }
|
|
244
|
+
|
|
245
|
+
/* ---------- 按钮 ---------- */
|
|
246
|
+
.btn, nav button, .savebar .btn, .subtabs button, .chip { white-space: nowrap; }
|
|
247
|
+
.btn {
|
|
248
|
+
padding: 7px 16px; border-radius: var(--radius-sm);
|
|
249
|
+
border: 1px solid var(--border-strong); background: var(--card); color: var(--text);
|
|
250
|
+
cursor: pointer; font: inherit; font-size: 13.5px;
|
|
251
|
+
transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .06s;
|
|
252
|
+
}
|
|
253
|
+
.btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-weak); }
|
|
254
|
+
.btn:active { transform: translateY(1px); }
|
|
255
|
+
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
|
|
256
|
+
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
|
|
257
|
+
.btn.primary {
|
|
258
|
+
background: var(--primary); border-color: var(--primary); color: #fff;
|
|
259
|
+
box-shadow: 0 2px 8px rgba(51, 112, 255, .32);
|
|
260
|
+
}
|
|
261
|
+
.btn.primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); color: #fff; }
|
|
262
|
+
.btn.danger { color: var(--danger); }
|
|
263
|
+
.btn.danger:hover { border-color: var(--danger); background: var(--err-bg); color: var(--danger); }
|
|
264
|
+
.btn.sm { padding: 4px 11px; font-size: 12.5px; border-radius: 8px; }
|
|
265
|
+
|
|
266
|
+
/* ---------- Chips / 代码 ---------- */
|
|
267
|
+
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
|
|
268
|
+
.chip {
|
|
269
|
+
display: inline-flex; align-items: center; gap: 6px;
|
|
270
|
+
background: var(--card); border: 1px solid var(--border);
|
|
271
|
+
padding: 3px 11px; border-radius: 999px;
|
|
272
|
+
font-size: 12.5px; font-family: var(--mono); color: var(--text);
|
|
273
|
+
}
|
|
274
|
+
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; font-size: 13px; line-height: 1; }
|
|
275
|
+
.chip button:hover { color: var(--danger); }
|
|
276
|
+
code {
|
|
277
|
+
font-family: var(--mono); font-size: .92em;
|
|
278
|
+
background: var(--code-bg); border-radius: 5px; padding: 1px 5px;
|
|
279
|
+
word-break: break-all;
|
|
280
|
+
}
|
|
281
|
+
pre.report {
|
|
282
|
+
background: var(--field); border: 1px solid var(--border); border-radius: var(--radius-sm);
|
|
283
|
+
padding: 12px 14px; font-size: 12px; overflow: auto; white-space: pre-wrap;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/* ---------- 表格 ---------- */
|
|
287
|
+
table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
|
288
|
+
/* 列表操作列:按钮一律横排(.btn 自身 nowrap,但 td 内模板换行空白给了折行点 → 竖排) */
|
|
289
|
+
td.ops { white-space: nowrap; }
|
|
290
|
+
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
|
|
291
|
+
thead th {
|
|
292
|
+
color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .03em;
|
|
293
|
+
border-bottom: 1px solid var(--border-strong);
|
|
294
|
+
}
|
|
295
|
+
tbody tr { transition: background .12s; }
|
|
296
|
+
tbody tr:hover { background: rgba(127, 140, 170, .05); }
|
|
297
|
+
tbody tr:last-child td { border-bottom: 0; }
|
|
298
|
+
tr.empty-row td { text-align: center; padding: 22px 10px; color: var(--muted); }
|
|
299
|
+
|
|
300
|
+
/* ---------- 状态标签 ---------- */
|
|
301
|
+
.tag {
|
|
302
|
+
display: inline-flex; align-items: center; gap: 5px;
|
|
303
|
+
padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
|
|
304
|
+
}
|
|
305
|
+
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
|
|
306
|
+
.tag.ok { background: var(--ok-bg); color: var(--ok-tx); }
|
|
307
|
+
.tag.off { background: var(--off-bg); color: var(--off-tx); }
|
|
308
|
+
.tag.off::before { opacity: .5; }
|
|
309
|
+
.tag.warn { background: var(--warn-bg); color: var(--warn-tx); }
|
|
310
|
+
.tag.err { background: var(--err-bg); color: var(--err-tx); }
|
|
311
|
+
|
|
312
|
+
/* ---------- 单选行 ---------- */
|
|
313
|
+
.radio-row { display: flex; gap: 22px; margin: 8px 0; }
|
|
314
|
+
.radio-row label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-size: 13.5px; cursor: pointer; }
|
|
315
|
+
.radio-row input { accent-color: var(--primary); }
|
|
316
|
+
|
|
317
|
+
/* ---------- 保存条 / 未保存标记 ---------- */
|
|
318
|
+
.savebar {
|
|
319
|
+
display: flex; gap: 10px; margin-top: 14px; align-items: center;
|
|
320
|
+
padding: 9px 12px; border-radius: var(--radius-sm);
|
|
321
|
+
background: var(--warn-weak); border: 1px solid var(--warn-weak-border);
|
|
322
|
+
}
|
|
323
|
+
.savebar .state { font-size: 12px; color: var(--warn-tx); }
|
|
324
|
+
.savebar .state::before { content: '● '; font-size: 9px; vertical-align: 1px; }
|
|
325
|
+
|
|
326
|
+
/* ---------- 应用子卡片 / 提示 ---------- */
|
|
327
|
+
.app-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 16px 14px; margin-bottom: 12px; position: relative; }
|
|
328
|
+
.app-card .del { position: absolute; top: 10px; right: 12px; }
|
|
329
|
+
.hint { font-size: 12px; color: var(--muted); }
|
|
330
|
+
.footer-note { color: var(--muted); font-size: 12px; margin-top: 8px; }
|
|
331
|
+
|
|
332
|
+
/* ---------- 子页签 ---------- */
|
|
333
|
+
.subtabs { display: flex; gap: 8px; margin-bottom: 14px; }
|
|
334
|
+
.subtabs button {
|
|
335
|
+
padding: 6px 15px; border-radius: 999px; border: 1px solid var(--border-strong);
|
|
336
|
+
background: none; cursor: pointer; font: inherit; font-size: 13px; color: var(--text);
|
|
337
|
+
transition: background .15s, color .15s, border-color .15s;
|
|
338
|
+
}
|
|
339
|
+
.subtabs button:hover { border-color: var(--primary); color: var(--primary); }
|
|
340
|
+
.subtabs button.active { background: var(--primary-weak); color: var(--primary); border-color: var(--primary); font-weight: 600; }
|
|
341
|
+
|
|
342
|
+
/* ---------- Toast ---------- */
|
|
343
|
+
#toast {
|
|
344
|
+
position: fixed; top: 22px; left: 50%;
|
|
345
|
+
transform: translateX(-50%) translateY(-14px);
|
|
346
|
+
background: var(--toast-bg); color: #fff;
|
|
347
|
+
-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
|
|
348
|
+
padding: 10px 22px; border-radius: 999px; font-size: 13px;
|
|
349
|
+
box-shadow: var(--shadow-2);
|
|
350
|
+
opacity: 0; transition: opacity .25s, transform .25s;
|
|
351
|
+
pointer-events: none; max-width: 80vw; z-index: 100;
|
|
352
|
+
}
|
|
353
|
+
#toast.show { opacity: .97; transform: translateX(-50%) translateY(0); }
|
|
354
|
+
#toast.err { background: var(--danger); }
|
|
355
|
+
|
|
356
|
+
/* ---------- 桥接器重启 / 离线全页遮罩 ---------- */
|
|
357
|
+
.br-mask { position: fixed; inset: 0; background: rgba(15, 19, 24, .5); z-index: 90; display: flex; align-items: center; justify-content: center; animation: lcb-fade .18s ease; }
|
|
358
|
+
.br-mask-card {
|
|
359
|
+
background: var(--card); border-radius: 16px; padding: 28px 36px; text-align: center;
|
|
360
|
+
box-shadow: var(--shadow-pop); max-width: 440px; font-size: 14px;
|
|
361
|
+
border: 1px solid var(--border);
|
|
362
|
+
}
|
|
363
|
+
.br-spin, .br-spin-sm { border-radius: 50%; border-style: solid; border-color: var(--spin-track); border-top-color: var(--primary); animation: brspin .9s linear infinite; }
|
|
364
|
+
.br-spin { width: 26px; height: 26px; margin: 0 auto 12px; border-width: 3px; }
|
|
365
|
+
/* 表格内小号 spinner(斜杠命令远端拉取等异步加载占位) */
|
|
366
|
+
.br-spin-sm { width: 18px; height: 18px; margin: 0 auto 10px; border-width: 2px; }
|
|
367
|
+
@keyframes brspin { to { transform: rotate(360deg); } }
|
|
368
|
+
|
|
369
|
+
/* ---------- 右侧抽屉(应用 / 斜杠命令 / 档案编辑共用) ---------- */
|
|
370
|
+
.drawer-mask { position: fixed; inset: 0; background: rgba(15, 19, 24, .38); z-index: 50; display: flex; justify-content: flex-end; animation: lcb-fade .18s ease; }
|
|
371
|
+
.drawer-mask[hidden] { display: none; }
|
|
372
|
+
.drawer {
|
|
373
|
+
width: min(980px, 94vw); height: 100%;
|
|
374
|
+
background: var(--card); border-left: 1px solid var(--border);
|
|
375
|
+
display: flex; flex-direction: column;
|
|
376
|
+
box-shadow: -12px 0 40px rgba(15, 19, 24, .18);
|
|
377
|
+
animation: lcb-drawer .22s cubic-bezier(.22, .8, .36, 1);
|
|
378
|
+
}
|
|
379
|
+
@keyframes lcb-drawer { from { transform: translateX(48px); opacity: .4; } }
|
|
380
|
+
.drawer > header { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 52px; border-bottom: 1px solid var(--border); position: static; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
|
|
381
|
+
.drawer > header h3 { margin: 0; font-size: 15px; font-weight: 650; }
|
|
382
|
+
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
|
|
383
|
+
.drawer-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; }
|
|
384
|
+
.drawer-foot .spacer { flex: 1; }
|
|
385
|
+
|
|
386
|
+
/* ---------- 居中 modal(目录选择等轻量交互;z-index 低于断连遮罩 br-mask=90) ---------- */
|
|
387
|
+
.modal-mask { position: fixed; inset: 0; background: rgba(15, 19, 24, .42); z-index: 80; display: flex; align-items: center; justify-content: center; animation: lcb-fade .16s ease; }
|
|
388
|
+
.modal {
|
|
389
|
+
width: min(560px, 92vw); background: var(--card); border-radius: 16px; padding: 18px 22px;
|
|
390
|
+
box-shadow: var(--shadow-pop); border: 1px solid var(--border);
|
|
391
|
+
animation: lcb-pop .18s cubic-bezier(.22, .8, .36, 1);
|
|
392
|
+
}
|
|
393
|
+
@keyframes lcb-pop { from { transform: scale(.965); opacity: .5; } }
|
|
394
|
+
.dir-list { border: 1px solid var(--border); border-radius: var(--radius-sm); max-height: 46vh; overflow-y: auto; margin-top: 10px; }
|
|
395
|
+
.dir-list button {
|
|
396
|
+
display: block; width: 100%; text-align: left; padding: 8px 12px;
|
|
397
|
+
border: 0; border-bottom: 1px solid var(--border); background: none; cursor: pointer; font: inherit;
|
|
398
|
+
transition: background .12s, color .12s;
|
|
399
|
+
}
|
|
400
|
+
.dir-list button:last-child { border-bottom: 0; }
|
|
401
|
+
.dir-list button:hover { background: var(--primary-weak); color: var(--primary); }
|
|
402
|
+
.dir-list .empty { padding: 14px 12px; color: var(--muted); font-size: 12.5px; text-align: center; }
|
|
403
|
+
|
|
404
|
+
/* ---------- 可搜索 combobox(安装插件选择器) ---------- */
|
|
405
|
+
.combo { position: relative; }
|
|
406
|
+
.combo-panel {
|
|
407
|
+
position: absolute; top: calc(100% + 5px); left: 0; right: 0;
|
|
408
|
+
background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
|
|
409
|
+
box-shadow: var(--shadow-2); max-height: 320px; overflow-y: auto; z-index: 40;
|
|
410
|
+
}
|
|
411
|
+
.combo-panel[hidden] { display: none; }
|
|
412
|
+
.combo-item { padding: 8px 12px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; }
|
|
413
|
+
.combo-item:last-child { border-bottom: 0; }
|
|
414
|
+
.combo-item:hover { background: var(--primary-weak); }
|
|
415
|
+
.combo-item b { margin-right: 6px; }
|
|
416
|
+
.combo-empty { padding: 12px; color: var(--muted); font-size: 12.5px; }
|
|
417
|
+
|
|
418
|
+
/* ---------- 操作进度弹框(update-all 真实 i/N,单操作时间缓动模拟) ---------- */
|
|
419
|
+
.prog { height: 8px; border-radius: 999px; background: var(--off-bg); border: 1px solid var(--border); overflow: hidden; margin-top: 12px; }
|
|
420
|
+
.prog-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--primary-strong)); border-radius: 999px; transition: width .3s; }
|
|
421
|
+
.prog-bar.done { background: var(--ok); }
|
|
422
|
+
|
|
423
|
+
/* ---------- 减弱动效偏好 ---------- */
|
|
424
|
+
@media (prefers-reduced-motion: reduce) {
|
|
425
|
+
*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/* ---------- 手动主题(顶栏切换写入 data-theme;auto = 不设属性,走上方系统媒体查询) ---------- */
|
|
429
|
+
:root[data-theme="dark"] {
|
|
430
|
+
color-scheme: dark;
|
|
431
|
+
--bg: #0e1117;
|
|
432
|
+
--card: #161a23;
|
|
433
|
+
--field: #10141d;
|
|
434
|
+
--border: #262c3a;
|
|
435
|
+
--border-strong: #363e50;
|
|
436
|
+
--text: #e7eaf1;
|
|
437
|
+
--muted: #97a0b2;
|
|
438
|
+
--primary: #4d80ff;
|
|
439
|
+
--primary-strong: #6996ff;
|
|
440
|
+
--primary-weak: rgba(77, 128, 255, .14);
|
|
441
|
+
--primary-ring: rgba(77, 128, 255, .28);
|
|
442
|
+
--danger: #ff7373;
|
|
443
|
+
--ok: #5ad24a;
|
|
444
|
+
--warn: #ffa23e;
|
|
445
|
+
--ok-bg: rgba(52, 199, 36, .13);
|
|
446
|
+
--warn-bg: rgba(255, 136, 0, .13);
|
|
447
|
+
--err-bg: rgba(245, 79, 79, .13);
|
|
448
|
+
--off-bg: rgba(255, 255, 255, .06);
|
|
449
|
+
--ok-tx: #5ad24a;
|
|
450
|
+
--warn-tx: #ffa23e;
|
|
451
|
+
--err-tx: #ff7373;
|
|
452
|
+
--off-tx: #97a0b2;
|
|
453
|
+
--warn-weak: rgba(255, 136, 0, .09);
|
|
454
|
+
--warn-weak-border: rgba(255, 136, 0, .32);
|
|
455
|
+
--code-bg: rgba(255, 255, 255, .09);
|
|
456
|
+
--shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 8px rgba(0, 0, 0, .18);
|
|
457
|
+
--shadow-2: 0 8px 28px rgba(0, 0, 0, .45);
|
|
458
|
+
--shadow-pop: 0 12px 40px rgba(0, 0, 0, .55);
|
|
459
|
+
--header-bg: rgba(19, 23, 31, .82);
|
|
460
|
+
--spin-track: rgba(255, 255, 255, .16);
|
|
461
|
+
--toast-bg: rgba(58, 64, 78, .95);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* ---------- 主题切换分段控件(顶栏) ---------- */
|
|
465
|
+
.theme-switch {
|
|
466
|
+
display: inline-flex; gap: 2px; padding: 3px;
|
|
467
|
+
background: var(--card); border: 1px solid var(--border); border-radius: 999px;
|
|
468
|
+
}
|
|
469
|
+
.theme-switch button {
|
|
470
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
471
|
+
width: 30px; height: 24px; border: 0; background: none; border-radius: 999px;
|
|
472
|
+
cursor: pointer; color: var(--muted);
|
|
473
|
+
transition: background .15s, color .15s;
|
|
474
|
+
}
|
|
475
|
+
.theme-switch button:hover { color: var(--text); background: rgba(127, 140, 170, .12); }
|
|
476
|
+
.theme-switch button.active { background: var(--primary-weak); color: var(--primary); }
|
|
477
|
+
.theme-switch svg { display: block; }
|
|
478
|
+
|
|
479
|
+
/* ---------- 列表工具栏(各列表页顶部按钮统一形态) ---------- */
|
|
480
|
+
.list-toolbar { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-bottom: 12px; }
|
|
481
|
+
.list-toolbar .spacer { flex: 1; }
|
|
482
|
+
.list-search { margin-bottom: 10px; }
|
|
483
|
+
|
|
484
|
+
/* ---------- 页内一级 tab(下划线式;权限页等) ---------- */
|
|
485
|
+
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
|
|
486
|
+
.tabs button {
|
|
487
|
+
padding: 9px 18px; border: 0; background: none; cursor: pointer;
|
|
488
|
+
font: inherit; font-size: 14px; color: var(--muted);
|
|
489
|
+
border-bottom: 2px solid transparent; margin-bottom: -1px;
|
|
490
|
+
transition: color .15s, border-color .15s;
|
|
491
|
+
}
|
|
492
|
+
.tabs button:hover { color: var(--text); }
|
|
493
|
+
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
|
|
494
|
+
|
|
495
|
+
/* ---------- 风格化确认 / 输入弹窗(替代浏览器原生 confirm / prompt) ---------- */
|
|
496
|
+
.dlg { width: min(430px, 92vw); padding: 22px 24px 18px; }
|
|
497
|
+
.dlg-title { margin: 0 0 10px; font-size: 15.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
|
|
498
|
+
.dlg-title .dlg-ico {
|
|
499
|
+
width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
|
|
500
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
501
|
+
background: var(--err-bg); color: var(--err-tx); font-size: 14px;
|
|
502
|
+
}
|
|
503
|
+
.dlg-title.danger { color: var(--danger); }
|
|
504
|
+
.dlg-msg { font-size: 13.5px; line-height: 1.75; color: var(--text); white-space: pre-line; word-break: break-word; }
|
|
505
|
+
.dlg-msg code { font-size: 12.5px; }
|
|
506
|
+
.dlg-input { margin-top: 12px; }
|
|
507
|
+
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
|
|
508
|
+
|
|
509
|
+
/* 实心危险按钮(弹窗确认键):与 .btn.danger(描边)区分 */
|
|
510
|
+
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
|
|
511
|
+
.btn.danger-solid:hover { background: var(--danger); border-color: var(--danger); color: #fff; filter: brightness(1.07); }
|