@chengzhao-dev/dsh-cpp-workflow 0.6.3 → 0.6.5
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.en.md +4 -4
- package/README.md +4 -4
- package/lib/client.js +288 -346
- package/lib/comment-policy.js +1 -0
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +4 -4
- package/skills/building-cpp/SKILL.md +3 -3
- package/skills/building-cpp/references/testing.md +54 -0
- package/skills/building-cpp/steps/03-check.md +1 -1
- package/skills/configuring-cmake/SKILL.md +1 -1
- package/skills/developing-cpp/SKILL.md +4 -4
- package/skills/developing-cpp/examples/comments-implementation.md +11 -6
- package/skills/developing-cpp/examples/structure.md +14 -12
- package/skills/developing-cpp/references/comments.md +32 -18
- package/skills/developing-cpp/references/declaration-order.md +7 -0
- package/skills/developing-cpp/references/exceptions.md +4 -2
- package/skills/developing-cpp/references/naming.md +5 -4
- package/skills/developing-cpp/references/priority.md +1 -0
- package/skills/developing-cpp/steps/03-declaration.md +3 -2
- package/skills/developing-cpp/steps/04-implementation.md +4 -1
package/lib/client.js
CHANGED
|
@@ -42,6 +42,7 @@ const TAG_TEXT = {
|
|
|
42
42
|
};
|
|
43
43
|
/** 开关型标签在设置页的标题。 */
|
|
44
44
|
const TAG_LABEL = {
|
|
45
|
+
file: '@file',
|
|
45
46
|
brief: '@brief',
|
|
46
47
|
author: '@author',
|
|
47
48
|
date: '@date',
|
|
@@ -192,12 +193,9 @@ function snapshotText(raw) {
|
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
|
|
195
|
-
//
|
|
196
|
+
// 客户端半侧:插件页的配置卡片(plugins.bundle.config),只此一个入口。
|
|
196
197
|
// 标签策略在本文件上方内联(由 scripts/building-client.mjs 从 src/comment-policy.js
|
|
197
|
-
//
|
|
198
|
-
//
|
|
199
|
-
// 版式参照 VS Code 设置页:左侧标签与说明、右侧控件,行间细分隔线;
|
|
200
|
-
// 修改过默认值的行在标签前加一个圆点,底部固定一条保存栏。
|
|
198
|
+
// 拼进来),所以预览、默认值与服务端快照永远同源;这里只做表单与外观。
|
|
201
199
|
const React = require('react')
|
|
202
200
|
const h = React.createElement
|
|
203
201
|
|
|
@@ -206,67 +204,75 @@ const PACKAGE_NAME = '@chengzhao-dev/dsh-cpp-workflow'
|
|
|
206
204
|
const STRINGS = {
|
|
207
205
|
zh: {
|
|
208
206
|
nav: 'C++ 工程流程',
|
|
209
|
-
|
|
210
|
-
|
|
207
|
+
eyebrow: '文档注释',
|
|
208
|
+
title: '注释默认带哪些标签',
|
|
209
|
+
intro: '这里只决定代理新写注释时的默认值。源码里已有的注释不会被改写;保存后,下一次读取技能时生效。',
|
|
211
210
|
header: '文件头',
|
|
212
|
-
headerHint: '
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
headerHint: '每个手写源文件开头的 /// 注释块。',
|
|
212
|
+
briefHint: '一句话说明这个文件定义或实现什么。留空时,每个文件自己写。',
|
|
213
|
+
authorHint: '作者署名。默认不写;打开并填写后才写进文件头。',
|
|
214
|
+
dateHint: '创建或最后修改日期。默认不写。',
|
|
215
|
+
copyrightHint: '版权声明。默认不写。',
|
|
216
|
+
versionHint: '文件版本号。默认不写。',
|
|
217
|
+
paramHint: '函数参数的含义、范围或所有权。',
|
|
218
|
+
returnHint: '返回值在什么条件下成立。返回类型自明时可以省略。',
|
|
219
|
+
throwsHint: '抛出的异常类型与条件。不抛异常的函数不写。',
|
|
220
|
+
contractHint: '函数声明的注释里必须交代的参数与失败信息。',
|
|
215
221
|
extra: '更多标签',
|
|
216
|
-
extraHint: '
|
|
217
|
-
file: '@file',
|
|
218
|
-
fileHint: '取自当前文件名。',
|
|
219
|
-
briefHint: '一句话说明这个文件定义或实现什么;留空则由文件自述。',
|
|
220
|
-
authorHint: '作者署名;留空不写。',
|
|
221
|
-
dateHint: '创建或修改日期;留空不写。',
|
|
222
|
-
copyrightHint: '版权声明;留空不写。',
|
|
223
|
-
versionHint: '文件版本号;留空不写。',
|
|
224
|
-
emptyValue: '留空不写',
|
|
225
|
-
briefEmpty: '留空则由文件自述',
|
|
222
|
+
extraHint: '默认关闭,需要时在单个函数上补写。',
|
|
226
223
|
preview: '预览',
|
|
227
|
-
previewHint: '
|
|
224
|
+
previewHint: '按当前开关生成,文件名用占位符表示。',
|
|
228
225
|
save: '保存',
|
|
229
|
-
reset: '
|
|
226
|
+
reset: '恢复出厂值',
|
|
230
227
|
saved: '已保存,下一次读取技能时生效。',
|
|
231
|
-
rejected: '
|
|
232
|
-
unsaved: '
|
|
228
|
+
rejected: '保存被拒绝:配置可能已在别处修改,请恢复出厂值后再试。',
|
|
229
|
+
unsaved: '有未保存的改动',
|
|
233
230
|
loading: '正在读取配置…',
|
|
231
|
+
unavailable: '这个部署没有提供这份配置。',
|
|
234
232
|
unreadable: '当前账户不能修改这份配置。',
|
|
235
|
-
readOnly: '
|
|
236
|
-
|
|
237
|
-
|
|
233
|
+
readOnly: '当前部署没有把可编辑配置传给这个页面,下面显示的是出厂值。',
|
|
234
|
+
fixed: '跟随文件名',
|
|
235
|
+
fixedHint: '值由实际文件决定,不写进配置。',
|
|
236
|
+
emptyValue: '留空则由文件自己写',
|
|
237
|
+
blankBrief: '留空则文件自述',
|
|
238
|
+
on: '写出',
|
|
239
|
+
off: '不写',
|
|
238
240
|
},
|
|
239
241
|
en: {
|
|
240
242
|
nav: 'C++ Workflow',
|
|
241
|
-
|
|
242
|
-
|
|
243
|
+
eyebrow: 'Doxygen comments',
|
|
244
|
+
title: 'Which tags comments carry by default',
|
|
245
|
+
intro: 'These defaults apply to comments the agent writes from now on. Existing sources are never rewritten; saving takes effect on the next skill read.',
|
|
243
246
|
header: 'File header',
|
|
244
|
-
headerHint: 'The /// block at the top of
|
|
245
|
-
|
|
246
|
-
|
|
247
|
+
headerHint: 'The /// block at the top of each hand-written source file.',
|
|
248
|
+
briefHint: 'One sentence saying what the file defines or implements. Leave the value to each file.',
|
|
249
|
+
authorHint: 'Author name. Off by default; written only when filled.',
|
|
250
|
+
dateHint: 'Created or last modified date. Off by default.',
|
|
251
|
+
copyrightHint: 'Copyright notice. Off by default.',
|
|
252
|
+
versionHint: 'File version. Off by default.',
|
|
253
|
+
paramHint: 'Meaning, range, or ownership of a parameter.',
|
|
254
|
+
returnHint: 'When the returned value holds. Optional when the type is self-evident.',
|
|
255
|
+
throwsHint: 'Exception type and condition. Omitted when the function does not throw.',
|
|
256
|
+
contractHint: 'Parameters and failure information every function comment must carry.',
|
|
247
257
|
extra: 'More tags',
|
|
248
|
-
extraHint: '
|
|
249
|
-
file: '@file',
|
|
250
|
-
fileHint: 'Taken from the current file name.',
|
|
251
|
-
briefHint: 'One sentence about what this file defines; leave empty and the file writes its own.',
|
|
252
|
-
authorHint: 'Author credit; left empty, omitted.',
|
|
253
|
-
dateHint: 'Creation or change date; left empty, omitted.',
|
|
254
|
-
copyrightHint: 'Copyright notice; left empty, omitted.',
|
|
255
|
-
versionHint: 'File version; left empty, omitted.',
|
|
256
|
-
emptyValue: 'Empty means omit',
|
|
257
|
-
briefEmpty: 'Empty: the file writes its own',
|
|
258
|
+
extraHint: 'Off by default; add them per function when needed.',
|
|
258
259
|
preview: 'Preview',
|
|
259
|
-
previewHint: 'Generated from the switches; the file name is a placeholder.',
|
|
260
|
+
previewHint: 'Generated from the switches above; the file name is a placeholder.',
|
|
260
261
|
save: 'Save',
|
|
261
|
-
reset: '
|
|
262
|
+
reset: 'Restore defaults',
|
|
262
263
|
saved: 'Saved; the next skill read uses it.',
|
|
263
|
-
rejected: 'The host rejected the save: the config changed elsewhere.
|
|
264
|
-
unsaved: 'Unsaved changes
|
|
264
|
+
rejected: 'The host rejected the save: the config changed elsewhere. Restore defaults and try again.',
|
|
265
|
+
unsaved: 'Unsaved changes',
|
|
265
266
|
loading: 'Reading configuration…',
|
|
267
|
+
unavailable: 'This deployment does not serve this configuration.',
|
|
266
268
|
unreadable: 'This account cannot edit the configuration.',
|
|
267
|
-
readOnly: '
|
|
268
|
-
|
|
269
|
-
|
|
269
|
+
readOnly: 'This deployment does not pass an editable form to this page; the values below are defaults.',
|
|
270
|
+
fixed: 'Follows the file name',
|
|
271
|
+
fixedHint: 'Derived from the file itself, never stored in the config.',
|
|
272
|
+
emptyValue: 'Leave empty and each file writes its own',
|
|
273
|
+
blankBrief: 'Leave empty for each file',
|
|
274
|
+
on: 'Write',
|
|
275
|
+
off: 'Omit',
|
|
270
276
|
},
|
|
271
277
|
}
|
|
272
278
|
|
|
@@ -279,201 +285,183 @@ function t() {
|
|
|
279
285
|
return STRINGS[language()]
|
|
280
286
|
}
|
|
281
287
|
|
|
282
|
-
const
|
|
283
|
-
label: 'var(--dsw-alias-label-primary, inherit)',
|
|
284
|
-
muted: 'var(--dsw-alias-label-secondary, #6b7280)',
|
|
285
|
-
line: 'var(--dsw-alias-border-l2, rgba(127, 127, 127, 0.24))',
|
|
286
|
-
surface: 'var(--dsw-alias-bg-layer-2, rgba(127, 127, 127, 0.06))',
|
|
287
|
-
field: 'var(--dsw-alias-bg-layer-1, rgba(127, 127, 127, 0.04))',
|
|
288
|
-
brand: 'var(--dsw-alias-brand-primary, #4f6bed)',
|
|
289
|
-
mono: 'ui-monospace, SFMono-Regular, Menlo, Consolas, monospace',
|
|
290
|
-
}
|
|
288
|
+
const STYLE_ID = 'dsh-cpp-workflow-settings'
|
|
291
289
|
|
|
292
|
-
|
|
293
|
-
const
|
|
290
|
+
// 外观只用宿主变量与两档中性色;没有变量时回落到浅色主题的一组合法颜色。
|
|
291
|
+
const CSS = `
|
|
292
|
+
.dcw-page{--dcw-fg:var(--dsw-alias-label-primary,#1f2328);--dcw-muted:var(--dsw-alias-label-secondary,#69707d);--dcw-faint:var(--dsw-alias-label-tertiary,#8a919c);--dcw-border:var(--dsw-alias-border-l2,rgba(31,35,40,.14));--dcw-bg1:var(--dsw-alias-bg-layer-1,#fff);--dcw-bg2:var(--dsw-alias-bg-layer-2,rgba(31,35,40,.035));--dcw-accent:var(--dsw-alias-brand-primary,#2f6fed);--dcw-danger:var(--dsw-alias-state-error-primary,#c0392b);color:var(--dcw-fg);max-width:760px;padding:2px 0 12px;font-size:13px;line-height:1.6}
|
|
293
|
+
.dcw-head{margin:0 0 14px}
|
|
294
|
+
.dcw-eyebrow{margin:0 0 4px;color:var(--dcw-muted);font-size:11.5px;letter-spacing:.02em}
|
|
295
|
+
.dcw-title{margin:0 0 6px;font-size:16px;font-weight:620;letter-spacing:.005em}
|
|
296
|
+
.dcw-lede{margin:0;color:var(--dcw-muted);font-size:12.5px;line-height:1.65;max-width:64ch}
|
|
297
|
+
.dcw-note{display:flex;gap:8px;align-items:center;margin:12px 0 0;padding:9px 11px;border:1px solid var(--dcw-border);border-radius:8px;background:var(--dcw-bg2);color:var(--dcw-muted);font-size:12px;line-height:1.55}
|
|
298
|
+
.dcw-note[data-tone="warn"]{color:var(--dcw-danger);border-color:color-mix(in srgb,var(--dcw-danger) 35%,transparent)}
|
|
299
|
+
.dcw-note-dot{flex:none;width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.55}
|
|
300
|
+
.dcw-card{margin:14px 0 0;border:1px solid var(--dcw-border);border-radius:10px;background:var(--dcw-bg1);overflow:hidden}
|
|
301
|
+
.dcw-card-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;padding:11px 14px 9px;border-bottom:1px solid var(--dcw-border);background:var(--dcw-bg2)}
|
|
302
|
+
.dcw-card-title{margin:0;font-size:12.5px;font-weight:620;letter-spacing:.01em}
|
|
303
|
+
.dcw-card-hint{margin:0;color:var(--dcw-muted);font-size:11.5px;line-height:1.5}
|
|
304
|
+
.dcw-row{display:grid;grid-template-columns:88px minmax(0,1fr);gap:2px 14px;padding:9px 14px;border-top:1px solid var(--dcw-border)}
|
|
305
|
+
.dcw-row:first-of-type{border-top:0}
|
|
306
|
+
.dcw-row-label{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--dcw-fg);padding-top:3px}
|
|
307
|
+
.dcw-row-control{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;min-width:0}
|
|
308
|
+
.dcw-row-hint{flex-basis:100%;margin:0;color:var(--dcw-muted);font-size:11.5px;line-height:1.55}
|
|
309
|
+
.dcw-row-fixed .dcw-row-control{gap:8px}
|
|
310
|
+
.dcw-static{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 9px;border:1px dashed var(--dcw-border);border-radius:6px;background:var(--dcw-bg2);color:var(--dcw-muted);font-size:12px}
|
|
311
|
+
.dcw-static svg{flex:none;opacity:.7}
|
|
312
|
+
.dcw-switch{position:relative;display:inline-flex;align-items:center;flex:none;width:34px;height:20px;cursor:pointer}
|
|
313
|
+
.dcw-switch input{position:absolute;inset:0;margin:0;opacity:0;cursor:pointer}
|
|
314
|
+
.dcw-track{position:absolute;inset:0;border-radius:999px;background:color-mix(in srgb,var(--dcw-fg) 18%,transparent);transition:background .16s ease}
|
|
315
|
+
.dcw-knob{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .16s ease}
|
|
316
|
+
.dcw-switch input:checked + .dcw-track{background:var(--dcw-accent)}
|
|
317
|
+
.dcw-switch input:checked + .dcw-track .dcw-knob{transform:translateX(14px)}
|
|
318
|
+
.dcw-switch input:focus-visible + .dcw-track{outline:2px solid var(--dcw-accent);outline-offset:2px}
|
|
319
|
+
.dcw-switch input:disabled + .dcw-track{opacity:.4}
|
|
320
|
+
.dcw-switch input:disabled{cursor:default}
|
|
321
|
+
.dcw-state{color:var(--dcw-faint);font-size:11.5px;min-width:28px}
|
|
322
|
+
.dcw-input{flex:1 1 220px;min-width:0;height:28px;padding:0 9px;border:1px solid var(--dcw-border);border-radius:6px;background:transparent;color:var(--dcw-fg);font:inherit;font-size:12.5px}
|
|
323
|
+
.dcw-input::placeholder{color:var(--dcw-faint)}
|
|
324
|
+
.dcw-input:focus{outline:none;border-color:var(--dcw-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--dcw-accent) 18%,transparent)}
|
|
325
|
+
.dcw-input:disabled{background:var(--dcw-bg2);color:var(--dcw-faint)}
|
|
326
|
+
.dcw-flags{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0 16px;padding:4px 14px 8px}
|
|
327
|
+
.dcw-flag{display:flex;flex-direction:column;gap:3px;padding:7px 0}
|
|
328
|
+
.dcw-flag .dcw-row-label{padding-top:0;display:flex;align-items:center;gap:8px;justify-content:space-between}
|
|
329
|
+
.dcw-card>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 14px;cursor:pointer;list-style:none}
|
|
330
|
+
.dcw-card details>summary::-webkit-details-marker{display:none}
|
|
331
|
+
.dcw-card details>summary::marker{content:''}
|
|
332
|
+
.dcw-card>summary:hover{background:var(--dcw-bg2)}
|
|
333
|
+
.dcw-chevron{transition:transform .16s ease;color:var(--dcw-muted)}
|
|
334
|
+
.dcw-card[open] .dcw-chevron{transform:rotate(90deg)}
|
|
335
|
+
.dcw-preview{margin:0;padding:11px 14px 13px;border-top:1px solid var(--dcw-border);overflow-x:auto;background:var(--dcw-bg2);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;line-height:1.7;white-space:pre;color:var(--dcw-fg)}
|
|
336
|
+
.dcw-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:14px;padding:11px 2px 4px;border-top:1px solid var(--dcw-border)}
|
|
337
|
+
.dcw-btn{height:30px;padding:0 13px;border:1px solid var(--dcw-border);border-radius:7px;background:var(--dcw-bg1);color:var(--dcw-fg);font:inherit;font-size:12.5px;cursor:pointer}
|
|
338
|
+
.dcw-btn:hover:enabled{border-color:color-mix(in srgb,var(--dcw-fg) 32%,transparent)}
|
|
339
|
+
.dcw-btn:focus-visible{outline:2px solid var(--dcw-accent);outline-offset:1px}
|
|
340
|
+
.dcw-btn:disabled{opacity:.45;cursor:default}
|
|
341
|
+
.dcw-btn-primary{background:var(--dcw-accent);border-color:transparent;color:var(--dsw-alias-label-primary-foreground,#fff)}
|
|
342
|
+
.dcw-btn-primary:hover:enabled{filter:brightness(1.06)}
|
|
343
|
+
.dcw-status{flex:1 1 200px;margin:0;color:var(--dcw-muted);font-size:12px}
|
|
344
|
+
.dcw-status[data-tone="warn"]{color:var(--dcw-danger)}
|
|
345
|
+
.dcw-status[data-tone="ok"]{color:var(--dsw-alias-state-success-primary,#1a7f37)}
|
|
346
|
+
@media (max-width:640px){.dcw-row{grid-template-columns:1fr;gap:4px}.dcw-row-label{padding-top:0}.dcw-flags{grid-template-columns:1fr}.dcw-flag:nth-child(2){border-top:1px solid var(--dcw-border)}}
|
|
347
|
+
`
|
|
294
348
|
|
|
295
|
-
function
|
|
349
|
+
function ensureStyles() {
|
|
350
|
+
if (typeof document === 'undefined' || !document.createElement) return
|
|
351
|
+
if (document.querySelector && document.querySelector(`style[data-plugin-css="${STYLE_ID}"]`)) return
|
|
352
|
+
const style = document.createElement('style')
|
|
353
|
+
style.dataset.pluginCss = STYLE_ID
|
|
354
|
+
style.textContent = CSS
|
|
355
|
+
if (document.head && document.head.appendChild) document.head.appendChild(style)
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
function Switch(props) {
|
|
296
359
|
return h(
|
|
297
|
-
'
|
|
298
|
-
{
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
h('div', { style: { marginTop: 6 } }, props.children),
|
|
360
|
+
'span',
|
|
361
|
+
{ className: 'dcw-switch' },
|
|
362
|
+
h('input', {
|
|
363
|
+
type: 'checkbox',
|
|
364
|
+
checked: Boolean(props.checked),
|
|
365
|
+
disabled: Boolean(props.disabled),
|
|
366
|
+
'aria-label': props.label,
|
|
367
|
+
onChange: (event) => props.onChange(event.target.checked),
|
|
368
|
+
}),
|
|
369
|
+
h('span', { className: 'dcw-track' }, h('span', { className: 'dcw-knob' })),
|
|
308
370
|
)
|
|
309
371
|
}
|
|
310
372
|
|
|
311
|
-
function
|
|
373
|
+
function LockIcon() {
|
|
312
374
|
return h(
|
|
313
|
-
'
|
|
314
|
-
{
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
alignItems: 'start',
|
|
320
|
-
padding: '10px 0',
|
|
321
|
-
borderBottom: `1px solid ${palette.line}`,
|
|
322
|
-
},
|
|
323
|
-
},
|
|
324
|
-
h(
|
|
325
|
-
'div',
|
|
326
|
-
{ style: { minWidth: 0 } },
|
|
327
|
-
h(
|
|
328
|
-
'div',
|
|
329
|
-
{ style: { display: 'flex', alignItems: 'center', gap: 6, minHeight: 20 } },
|
|
330
|
-
props.modified
|
|
331
|
-
? h('span', {
|
|
332
|
-
key: 'dot',
|
|
333
|
-
title: props.modifiedLabel,
|
|
334
|
-
'aria-label': props.modifiedLabel,
|
|
335
|
-
style: { width: 6, height: 6, borderRadius: '50%', background: palette.brand, flex: 'none' },
|
|
336
|
-
})
|
|
337
|
-
: null,
|
|
338
|
-
h('span', { style: { fontSize: 13, lineHeight: '20px', color: palette.label, fontFamily: props.mono ? palette.mono : 'inherit' } }, props.label),
|
|
339
|
-
),
|
|
340
|
-
props.description ? h('p', { style: descriptionStyle() }, props.description) : null,
|
|
341
|
-
),
|
|
342
|
-
h(
|
|
343
|
-
'div',
|
|
344
|
-
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: 8, minHeight: 20 } },
|
|
345
|
-
props.control,
|
|
346
|
-
),
|
|
375
|
+
'svg',
|
|
376
|
+
{ width: 12, height: 12, viewBox: '0 0 16 16', 'aria-hidden': 'true', focusable: 'false' },
|
|
377
|
+
h('path', {
|
|
378
|
+
fill: 'currentColor',
|
|
379
|
+
d: 'M8 1a3 3 0 0 0-3 3v2H4.5A1.5 1.5 0 0 0 3 7.5v5A1.5 1.5 0 0 0 4.5 14h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 6H11V4a3 3 0 0 0-3-3Zm2 5H6V4a2 2 0 1 1 4 0v2Z',
|
|
380
|
+
}),
|
|
347
381
|
)
|
|
348
382
|
}
|
|
349
383
|
|
|
350
|
-
function
|
|
384
|
+
function Chevron() {
|
|
351
385
|
return h(
|
|
352
|
-
'
|
|
353
|
-
{
|
|
354
|
-
|
|
355
|
-
role: 'checkbox',
|
|
356
|
-
'aria-checked': Boolean(props.checked),
|
|
357
|
-
'aria-label': props.label,
|
|
358
|
-
disabled: Boolean(props.disabled),
|
|
359
|
-
onClick: () => props.onChange(!props.checked),
|
|
360
|
-
style: {
|
|
361
|
-
flex: 'none',
|
|
362
|
-
width: 16,
|
|
363
|
-
height: 16,
|
|
364
|
-
padding: 0,
|
|
365
|
-
borderRadius: 4,
|
|
366
|
-
border: `1px solid ${props.checked ? palette.brand : palette.line}`,
|
|
367
|
-
background: props.checked ? palette.brand : 'transparent',
|
|
368
|
-
display: 'inline-flex',
|
|
369
|
-
alignItems: 'center',
|
|
370
|
-
justifyContent: 'center',
|
|
371
|
-
cursor: props.disabled ? 'default' : 'pointer',
|
|
372
|
-
opacity: props.disabled ? 0.55 : 1,
|
|
373
|
-
transition: 'background-color 0.12s ease, border-color 0.12s ease',
|
|
374
|
-
},
|
|
375
|
-
},
|
|
376
|
-
h(
|
|
377
|
-
'svg',
|
|
378
|
-
{ width: 11, height: 11, viewBox: '0 0 12 12', 'aria-hidden': 'true' },
|
|
379
|
-
h('path', {
|
|
380
|
-
d: 'M2.6 6.3 5 8.7l4.4-5.2',
|
|
381
|
-
fill: 'none',
|
|
382
|
-
stroke: '#fff',
|
|
383
|
-
strokeWidth: 1.7,
|
|
384
|
-
strokeLinecap: 'round',
|
|
385
|
-
strokeLinejoin: 'round',
|
|
386
|
-
opacity: props.checked ? 1 : 0,
|
|
387
|
-
}),
|
|
388
|
-
),
|
|
386
|
+
'svg',
|
|
387
|
+
{ className: 'dcw-chevron', width: 12, height: 12, viewBox: '0 0 16 16', 'aria-hidden': 'true', focusable: 'false' },
|
|
388
|
+
h('path', { fill: 'currentColor', d: 'M6 3.5 10.5 8 6 12.5 4.9 11.4 8.3 8 4.9 4.6Z' }),
|
|
389
389
|
)
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
+
const HINT_KEY = {
|
|
393
|
+
brief: 'briefHint',
|
|
394
|
+
author: 'authorHint',
|
|
395
|
+
date: 'dateHint',
|
|
396
|
+
copyright: 'copyrightHint',
|
|
397
|
+
version: 'versionHint',
|
|
398
|
+
param: 'paramHint',
|
|
399
|
+
returns: 'returnHint',
|
|
400
|
+
throws: 'throwsHint',
|
|
401
|
+
}
|
|
402
|
+
|
|
392
403
|
function ValueRow(props) {
|
|
393
404
|
const s = props.strings
|
|
394
405
|
const entry = props.entry
|
|
395
|
-
return h(
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
h(
|
|
403
|
-
key: 'check',
|
|
406
|
+
return h(
|
|
407
|
+
'div',
|
|
408
|
+
{ className: 'dcw-row' },
|
|
409
|
+
h('div', { className: 'dcw-row-label' }, TAG_LABEL[props.tag]),
|
|
410
|
+
h(
|
|
411
|
+
'div',
|
|
412
|
+
{ className: 'dcw-row-control' },
|
|
413
|
+
h(Switch, {
|
|
404
414
|
label: TAG_LABEL[props.tag],
|
|
405
415
|
checked: entry.enabled,
|
|
406
416
|
disabled: props.disabled,
|
|
407
417
|
onChange: (enabled) => props.onChange({ ...entry, enabled }),
|
|
408
418
|
}),
|
|
419
|
+
h('span', { className: 'dcw-state', 'aria-hidden': 'true' }, entry.enabled ? s.on : s.off),
|
|
409
420
|
h('input', {
|
|
410
|
-
|
|
421
|
+
className: 'dcw-input',
|
|
411
422
|
type: 'text',
|
|
412
423
|
value: entry.value,
|
|
413
|
-
placeholder: props.tag === 'brief' ? s.
|
|
424
|
+
placeholder: props.tag === 'brief' ? s.blankBrief : s.emptyValue,
|
|
414
425
|
disabled: props.disabled || !entry.enabled,
|
|
415
|
-
'aria-label': TAG_LABEL[props.tag]
|
|
426
|
+
'aria-label': `${TAG_LABEL[props.tag]} 的值`,
|
|
416
427
|
onChange: (event) => props.onChange({ ...entry, value: event.target.value }),
|
|
417
|
-
style: {
|
|
418
|
-
width: '100%',
|
|
419
|
-
minWidth: 0,
|
|
420
|
-
fontSize: 13,
|
|
421
|
-
lineHeight: '18px',
|
|
422
|
-
padding: '3px 7px',
|
|
423
|
-
borderRadius: 4,
|
|
424
|
-
border: `1px solid ${palette.line}`,
|
|
425
|
-
background: entry.enabled && !props.disabled ? palette.field : 'transparent',
|
|
426
|
-
color: entry.enabled ? 'inherit' : palette.muted,
|
|
427
|
-
fontFamily: palette.mono,
|
|
428
|
-
boxSizing: 'border-box',
|
|
429
|
-
},
|
|
430
428
|
}),
|
|
431
|
-
|
|
432
|
-
|
|
429
|
+
h('p', { className: 'dcw-row-hint' }, s[HINT_KEY[props.tag]] || ''),
|
|
430
|
+
),
|
|
431
|
+
)
|
|
433
432
|
}
|
|
434
433
|
|
|
435
|
-
function
|
|
436
|
-
return h(
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
434
|
+
function Flag(props) {
|
|
435
|
+
return h(
|
|
436
|
+
'div',
|
|
437
|
+
{ className: 'dcw-flag' },
|
|
438
|
+
h(
|
|
439
|
+
'div',
|
|
440
|
+
{ className: 'dcw-row-label' },
|
|
441
|
+
TAG_LABEL[props.tag],
|
|
442
|
+
h(Switch, {
|
|
443
|
+
label: TAG_LABEL[props.tag],
|
|
444
|
+
checked: props.checked,
|
|
445
|
+
disabled: props.disabled,
|
|
446
|
+
onChange: props.onChange,
|
|
447
|
+
}),
|
|
448
|
+
),
|
|
449
|
+
h('p', { className: 'dcw-row-hint' }, props.hint || ''),
|
|
450
|
+
)
|
|
449
451
|
}
|
|
450
452
|
|
|
451
453
|
function Preview(props) {
|
|
452
454
|
const s = props.strings
|
|
453
455
|
return h(
|
|
454
456
|
'section',
|
|
455
|
-
{ 'aria-label': s.preview
|
|
456
|
-
h('h4', { style: sectionTitleStyle() }, s.preview),
|
|
457
|
-
h('p', { style: descriptionStyle() }, s.previewHint),
|
|
457
|
+
{ className: 'dcw-card', 'aria-label': s.preview },
|
|
458
458
|
h(
|
|
459
|
-
'
|
|
460
|
-
{
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
padding: '10px 12px',
|
|
464
|
-
borderRadius: 6,
|
|
465
|
-
background: palette.surface,
|
|
466
|
-
border: `1px solid ${palette.line}`,
|
|
467
|
-
overflowX: 'auto',
|
|
468
|
-
fontSize: 12.5,
|
|
469
|
-
lineHeight: 1.65,
|
|
470
|
-
fontFamily: palette.mono,
|
|
471
|
-
whiteSpace: 'pre',
|
|
472
|
-
color: palette.label,
|
|
473
|
-
},
|
|
474
|
-
},
|
|
475
|
-
previewText(props.config),
|
|
459
|
+
'div',
|
|
460
|
+
{ className: 'dcw-card-head' },
|
|
461
|
+
h('h4', { className: 'dcw-card-title' }, s.preview),
|
|
462
|
+
h('p', { className: 'dcw-card-hint' }, s.previewHint),
|
|
476
463
|
),
|
|
464
|
+
h('pre', { className: 'dcw-preview' }, previewText(props.config, SAMPLE_FILE)),
|
|
477
465
|
)
|
|
478
466
|
}
|
|
479
467
|
|
|
@@ -487,12 +475,9 @@ function diffOperations(draft, base) {
|
|
|
487
475
|
return operations
|
|
488
476
|
}
|
|
489
477
|
|
|
490
|
-
function isModified(key, draft) {
|
|
491
|
-
return JSON.stringify(draft[key]) !== JSON.stringify(DEFAULT_CONFIG[key])
|
|
492
|
-
}
|
|
493
|
-
|
|
494
478
|
function ConfigPage(props) {
|
|
495
479
|
const s = t()
|
|
480
|
+
ensureStyles()
|
|
496
481
|
const form = props.form
|
|
497
482
|
const initial = React.useMemo(() => normalizeConfig(form && form.state ? form.state.value : undefined), [])
|
|
498
483
|
const [draft, setDraft] = React.useState(initial)
|
|
@@ -500,8 +485,11 @@ function ConfigPage(props) {
|
|
|
500
485
|
const [dirty, setDirty] = React.useState(false)
|
|
501
486
|
const [busy, setBusy] = React.useState(false)
|
|
502
487
|
const [message, setMessage] = React.useState('')
|
|
488
|
+
const [tone, setTone] = React.useState('')
|
|
503
489
|
const revision = form && form.state ? form.state.revision : undefined
|
|
504
|
-
|
|
490
|
+
// 快照只有 status / writable / revision;旧版本多出来的 mode 字段已不存在,
|
|
491
|
+
// 再按它判断会把所有可写表单误判成只读。
|
|
492
|
+
const ready = Boolean(form && form.state && form.state.status === 'ready' && form.state.writable)
|
|
505
493
|
const status = form && form.state ? form.state.status : 'missing'
|
|
506
494
|
|
|
507
495
|
React.useEffect(() => {
|
|
@@ -515,12 +503,14 @@ function ConfigPage(props) {
|
|
|
515
503
|
setDraft((current) => ({ ...current, ...patch }))
|
|
516
504
|
setDirty(true)
|
|
517
505
|
setMessage('')
|
|
506
|
+
setTone('')
|
|
518
507
|
}
|
|
519
508
|
|
|
520
509
|
const reset = () => {
|
|
521
510
|
setDraft(base)
|
|
522
511
|
setDirty(false)
|
|
523
512
|
setMessage('')
|
|
513
|
+
setTone('')
|
|
524
514
|
}
|
|
525
515
|
|
|
526
516
|
const save = async () => {
|
|
@@ -534,201 +524,153 @@ function ConfigPage(props) {
|
|
|
534
524
|
setBase(draft)
|
|
535
525
|
setDirty(false)
|
|
536
526
|
setMessage(s.saved)
|
|
527
|
+
setTone('ok')
|
|
537
528
|
} else {
|
|
538
529
|
setMessage(s.rejected)
|
|
530
|
+
setTone('warn')
|
|
539
531
|
}
|
|
540
532
|
} catch (error) {
|
|
541
533
|
setMessage(error instanceof Error ? error.message : String(error))
|
|
534
|
+
setTone('warn')
|
|
542
535
|
} finally {
|
|
543
536
|
setBusy(false)
|
|
544
537
|
}
|
|
545
538
|
}
|
|
546
539
|
|
|
547
540
|
const editable = Boolean(form)
|
|
548
|
-
const
|
|
549
|
-
brief: s.briefHint,
|
|
550
|
-
author: s.authorHint,
|
|
551
|
-
date: s.dateHint,
|
|
552
|
-
copyright: s.copyrightHint,
|
|
553
|
-
version: s.versionHint,
|
|
554
|
-
}
|
|
541
|
+
const disabled = !ready
|
|
555
542
|
|
|
556
543
|
return h(
|
|
557
544
|
'div',
|
|
558
|
-
{
|
|
559
|
-
h(
|
|
560
|
-
|
|
545
|
+
{ className: 'dcw-page' },
|
|
546
|
+
h(
|
|
547
|
+
'header',
|
|
548
|
+
{ className: 'dcw-head' },
|
|
549
|
+
h('p', { className: 'dcw-eyebrow' }, s.eyebrow),
|
|
550
|
+
h('h3', { className: 'dcw-title' }, s.title),
|
|
551
|
+
h('p', { className: 'dcw-lede' }, s.intro),
|
|
552
|
+
),
|
|
561
553
|
!editable
|
|
562
554
|
? h(
|
|
563
555
|
'div',
|
|
564
|
-
{
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
display: 'flex',
|
|
568
|
-
alignItems: 'center',
|
|
569
|
-
gap: 10,
|
|
570
|
-
flexWrap: 'wrap',
|
|
571
|
-
marginTop: 10,
|
|
572
|
-
padding: '8px 10px',
|
|
573
|
-
borderRadius: 6,
|
|
574
|
-
background: palette.surface,
|
|
575
|
-
border: `1px solid ${palette.line}`,
|
|
576
|
-
},
|
|
577
|
-
},
|
|
578
|
-
h('p', { style: { ...descriptionStyle(), margin: 0, flex: '1 1 200px' } }, s.readOnly),
|
|
579
|
-
props.openPluginPage
|
|
580
|
-
? h('button', { type: 'button', onClick: props.openPluginPage, style: secondaryButton(true) }, s.openSettings)
|
|
581
|
-
: null,
|
|
556
|
+
{ className: 'dcw-note', role: 'status' },
|
|
557
|
+
h('span', { className: 'dcw-note-dot' }),
|
|
558
|
+
h('span', null, s.readOnly),
|
|
582
559
|
)
|
|
583
560
|
: null,
|
|
584
561
|
editable && !ready && status !== 'missing'
|
|
585
|
-
? h(
|
|
562
|
+
? h(
|
|
563
|
+
'div',
|
|
564
|
+
{ className: 'dcw-note', role: 'status' },
|
|
565
|
+
h('span', { className: 'dcw-note-dot' }),
|
|
566
|
+
h('span', null, status === 'loading' ? s.loading : status === 'unavailable' ? s.unavailable : s.unreadable),
|
|
567
|
+
)
|
|
586
568
|
: null,
|
|
587
569
|
h(
|
|
588
|
-
|
|
589
|
-
{
|
|
590
|
-
h(
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
570
|
+
'section',
|
|
571
|
+
{ className: 'dcw-card', 'aria-labelledby': 'dcw-header-title' },
|
|
572
|
+
h(
|
|
573
|
+
'div',
|
|
574
|
+
{ className: 'dcw-card-head' },
|
|
575
|
+
h('h4', { className: 'dcw-card-title', id: 'dcw-header-title' }, s.header),
|
|
576
|
+
h('p', { className: 'dcw-card-hint' }, s.headerHint),
|
|
577
|
+
),
|
|
578
|
+
h(
|
|
579
|
+
'div',
|
|
580
|
+
{ className: 'dcw-row dcw-row-fixed' },
|
|
581
|
+
h('div', { className: 'dcw-row-label' }, TAG_LABEL.file),
|
|
582
|
+
h(
|
|
583
|
+
'div',
|
|
584
|
+
{ className: 'dcw-row-control' },
|
|
585
|
+
h('span', { className: 'dcw-static' }, h(LockIcon), s.fixed),
|
|
586
|
+
h('p', { className: 'dcw-row-hint' }, s.fixedHint),
|
|
587
|
+
),
|
|
588
|
+
),
|
|
596
589
|
...HEADER_TAGS.map((tag) =>
|
|
597
590
|
h(ValueRow, {
|
|
598
591
|
key: tag,
|
|
599
592
|
tag,
|
|
600
|
-
hint: headerHints[tag],
|
|
601
593
|
strings: s,
|
|
602
|
-
disabled: !editable,
|
|
603
|
-
modified: editable && isModified(tag, draft),
|
|
604
594
|
entry: draft[tag],
|
|
595
|
+
disabled,
|
|
605
596
|
onChange: (entry) => update({ [tag]: entry }),
|
|
606
597
|
}),
|
|
607
598
|
),
|
|
608
599
|
),
|
|
609
600
|
h(
|
|
610
|
-
|
|
611
|
-
{
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
601
|
+
'section',
|
|
602
|
+
{ className: 'dcw-card', 'aria-labelledby': 'dcw-contract-title' },
|
|
603
|
+
h(
|
|
604
|
+
'div',
|
|
605
|
+
{ className: 'dcw-card-head' },
|
|
606
|
+
h('h4', { className: 'dcw-card-title', id: 'dcw-contract-title' }, s.contract),
|
|
607
|
+
h('p', { className: 'dcw-card-hint' }, s.contractHint),
|
|
608
|
+
),
|
|
609
|
+
h(
|
|
610
|
+
'div',
|
|
611
|
+
{ className: 'dcw-flags' },
|
|
612
|
+
...CONTRACT_TAGS.map((tag) =>
|
|
613
|
+
h(Flag, {
|
|
614
|
+
key: tag,
|
|
615
|
+
tag,
|
|
616
|
+
checked: draft[tag],
|
|
617
|
+
disabled,
|
|
618
|
+
hint: s[HINT_KEY[tag]],
|
|
619
|
+
onChange: (value) => update({ [tag]: value }),
|
|
620
|
+
}),
|
|
621
|
+
),
|
|
623
622
|
),
|
|
624
623
|
),
|
|
625
624
|
h(
|
|
626
|
-
|
|
627
|
-
{
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
625
|
+
'details',
|
|
626
|
+
{ className: 'dcw-card' },
|
|
627
|
+
h('summary', null, h('span', { className: 'dcw-card-title' }, s.extra), h(Chevron)),
|
|
628
|
+
h('p', { className: 'dcw-card-hint', style: { margin: '0 14px 2px' } }, s.extraHint),
|
|
629
|
+
h(
|
|
630
|
+
'div',
|
|
631
|
+
{ className: 'dcw-flags' },
|
|
632
|
+
...EXTRA_TAGS.map((tag) =>
|
|
633
|
+
h(Flag, {
|
|
634
|
+
key: tag,
|
|
635
|
+
tag,
|
|
636
|
+
checked: draft[tag],
|
|
637
|
+
disabled,
|
|
638
|
+
onChange: (value) => update({ [tag]: value }),
|
|
639
|
+
}),
|
|
640
|
+
),
|
|
639
641
|
),
|
|
640
642
|
),
|
|
641
643
|
h(Preview, { config: draft, strings: s }),
|
|
642
644
|
editable
|
|
643
645
|
? h(
|
|
644
646
|
'div',
|
|
645
|
-
{
|
|
646
|
-
style: {
|
|
647
|
-
display: 'flex',
|
|
648
|
-
alignItems: 'center',
|
|
649
|
-
gap: 10,
|
|
650
|
-
marginTop: 20,
|
|
651
|
-
paddingTop: 12,
|
|
652
|
-
borderTop: `1px solid ${palette.line}`,
|
|
653
|
-
flexWrap: 'wrap',
|
|
654
|
-
},
|
|
655
|
-
},
|
|
647
|
+
{ className: 'dcw-actions' },
|
|
656
648
|
h(
|
|
657
649
|
'button',
|
|
658
650
|
{
|
|
659
651
|
type: 'button',
|
|
652
|
+
className: 'dcw-btn dcw-btn-primary',
|
|
660
653
|
onClick: save,
|
|
661
654
|
disabled: busy || !ready || !dirty,
|
|
662
|
-
style: primaryButton(dirty && ready && !busy),
|
|
663
655
|
},
|
|
664
656
|
s.save,
|
|
665
657
|
),
|
|
658
|
+
h('button', { type: 'button', className: 'dcw-btn', onClick: reset, disabled: busy || !dirty }, s.reset),
|
|
666
659
|
h(
|
|
667
|
-
'
|
|
668
|
-
{
|
|
669
|
-
|
|
670
|
-
onClick: reset,
|
|
671
|
-
disabled: busy || !dirty,
|
|
672
|
-
style: secondaryButton(dirty && !busy),
|
|
673
|
-
},
|
|
674
|
-
s.reset,
|
|
660
|
+
'p',
|
|
661
|
+
{ className: 'dcw-status', role: 'status', 'data-tone': tone },
|
|
662
|
+
message || (dirty ? s.unsaved : ''),
|
|
675
663
|
),
|
|
676
|
-
h('p', { role: 'status', style: { ...descriptionStyle(), margin: 0, flex: '1 1 200px' } }, message || (dirty ? s.unsaved : '')),
|
|
677
664
|
)
|
|
678
665
|
: null,
|
|
679
666
|
)
|
|
680
667
|
}
|
|
681
668
|
|
|
682
|
-
function
|
|
683
|
-
return {
|
|
684
|
-
fontSize: 13,
|
|
685
|
-
lineHeight: '20px',
|
|
686
|
-
padding: '4px 12px',
|
|
687
|
-
borderRadius: 4,
|
|
688
|
-
border: '1px solid transparent',
|
|
689
|
-
background: enabled ? palette.brand : 'var(--dsw-alias-bg-layer-3, rgba(127, 127, 127, 0.2))',
|
|
690
|
-
color: enabled ? '#fff' : palette.muted,
|
|
691
|
-
cursor: enabled ? 'pointer' : 'default',
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
function secondaryButton(enabled) {
|
|
696
|
-
return {
|
|
697
|
-
fontSize: 13,
|
|
698
|
-
lineHeight: '20px',
|
|
699
|
-
padding: '4px 12px',
|
|
700
|
-
borderRadius: 4,
|
|
701
|
-
border: `1px solid ${palette.line}`,
|
|
702
|
-
background: 'transparent',
|
|
703
|
-
color: enabled ? palette.label : palette.muted,
|
|
704
|
-
cursor: enabled ? 'pointer' : 'default',
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
function page(ownerProps, openPluginPage) {
|
|
709
|
-
const props = ownerProps || {}
|
|
710
|
-
return h(ConfigPage, { ...props, openPluginPage })
|
|
669
|
+
function page(ownerProps) {
|
|
670
|
+
return h(ConfigPage, ownerProps || {})
|
|
711
671
|
}
|
|
712
672
|
|
|
713
673
|
function apply(ctx) {
|
|
714
|
-
let openPluginPage
|
|
715
|
-
try {
|
|
716
|
-
const navigation = typeof ctx.get === 'function' ? ctx.get('pluginNavigation') : undefined
|
|
717
|
-
if (navigation && typeof navigation.openBundle === 'function') {
|
|
718
|
-
openPluginPage = () => navigation.openBundle(PACKAGE_NAME)
|
|
719
|
-
}
|
|
720
|
-
} catch {}
|
|
721
|
-
ctx.slots.inject('settings.section', () =>
|
|
722
|
-
ctx.slots.register(
|
|
723
|
-
{
|
|
724
|
-
name: 'settings.section',
|
|
725
|
-
id: 'cpp-workflow',
|
|
726
|
-
order: 60,
|
|
727
|
-
label: () => t().nav,
|
|
728
|
-
},
|
|
729
|
-
(ownerProps) => page(ownerProps, openPluginPage),
|
|
730
|
-
),
|
|
731
|
-
)
|
|
732
674
|
ctx.slots.inject('plugins.bundle.config', () =>
|
|
733
675
|
ctx.slots.register(
|
|
734
676
|
{
|
|
@@ -736,7 +678,7 @@ function apply(ctx) {
|
|
|
736
678
|
key: PACKAGE_NAME,
|
|
737
679
|
label: () => t().nav,
|
|
738
680
|
},
|
|
739
|
-
(ownerProps) => (ownerProps && ownerProps.view === 'summary' ? null : page(ownerProps
|
|
681
|
+
(ownerProps) => (ownerProps && ownerProps.view === 'summary' ? null : page(ownerProps)),
|
|
740
682
|
),
|
|
741
683
|
)
|
|
742
684
|
}
|