nx-kv 0.64.0 → 0.65.2
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/CHANGELOG.md +70 -0
- package/assets/nx-kv/SKILL.md +5 -2
- package/assets/nx-kv/references/A03-/346/226/207/346/241/243/344/270/216/345/275/222/345/261/236.md +6 -0
- package/assets/nx-kv/references/A04-/344/273/223/345/272/223/344/270/216/351/241/271/347/233/256/347/273/204.md +79 -6
- package/assets/nx-kv/templates/ref-main-doc.md +46 -0
- package/package.json +1 -1
- package/src/core/db/seed-templates.ts +2 -86
- package/src/modules/localtask/task-lifecycle.ts +1 -1
- package/src/modules/promptplug/actions/_manifest.generated.ts +9 -0
- package/src/modules/promptplug/actions/prompt-registry.ts +4 -1
- package/src/modules/promptplug/actions/prompt-template-activate.ts +31 -0
- package/src/modules/promptplug/actions/prompt-template-delete.ts +30 -0
- package/src/modules/promptplug/actions/prompt-template-save.ts +52 -0
- package/src/modules/promptplug/delivery.ts +151 -0
- package/src/modules/promptplug/factory.ts +16 -8
- package/src/modules/promptplug/index.ts +3 -1
- package/src/modules/promptplug/plugins/doneguard.ts +3 -0
- package/src/modules/promptplug/plugins/getloop.ts +8 -7
- package/src/modules/{tasktool/plugins/goal-template.ts → promptplug/plugins/goal-prompt.ts} +57 -4
- package/src/modules/promptplug/plugins/goal-shape.ts +17 -0
- package/src/modules/promptplug/plugins/goalhint.ts +22 -9
- package/src/modules/promptplug/plugins/timecheck.ts +25 -14
- package/src/modules/promptplug/registry.ts +3 -3
- package/src/modules/promptplug/template-store.ts +145 -0
- package/src/modules/tasktool/delivery.ts +231 -0
- package/src/modules/tasktool/get.ts +2 -2
- package/src/modules/tasktool/plugins/taskgoal-store.ts +28 -22
- package/src/modules/tasktool/plugins/timegoal-task-store.ts +70 -5
- package/src/modules/tasktool/plugins/waitgoal-config.ts +1 -25
- package/src/modules/tasktool/plugins/waitgoal.ts +0 -4
- package/src/modules/tasktool/preview.ts +3 -4
- package/src/modules/tasktool/wait.ts +16 -284
- package/src/modules/templates/actions/templates-default.ts +2 -5
- package/src/modules/templates/actions/templates-update.ts +1 -3
- package/src/modules/templates/service.ts +11 -13
- package/src/modules/templates/support.ts +0 -15
- package/src/web/frontend/App.tsx +0 -12
- package/src/web/frontend/api/cli-tree.json +58 -0
- package/src/web/frontend/api/client.generated.ts +32 -2
- package/src/web/frontend/components/doc/doc-head.tsx +13 -4
- package/src/web/frontend/components/icons.tsx +9 -199
- package/src/web/frontend/components/md/live-block.tsx +1 -5
- package/src/web/frontend/components/md/md-panes-root.tsx +0 -4
- package/src/web/frontend/components/md/md-panes.tsx +1 -11
- package/src/web/frontend/components/md/tool-bar.tsx +9 -0
- package/src/web/frontend/components/sidebar/index.tsx +13 -2
- package/src/web/frontend/components/sidebar/model.ts +3 -0
- package/src/web/frontend/components/tool-acts/bar.tsx +40 -29
- package/src/web/frontend/components/tool-acts/layout-panel.tsx +7 -3
- package/src/web/frontend/components/tool-acts/modules.ts +53 -51
- package/src/web/frontend/components/tool-acts/style.css +7 -3
- package/src/web/frontend/modules/md/styles/docs.css +0 -7
- package/src/web/frontend/modules/md/styles/editor.css +0 -17
- package/src/web/frontend/modules/md/styles/shell.css +3 -0
- package/src/web/frontend/modules/md/use-templates.ts +3 -13
- package/src/web/frontend/page/dir/index.tsx +3 -15
- package/src/web/frontend/page/dir/task-actions.ts +1 -16
- package/src/web/frontend/page/dir/task.tsx +2 -16
- package/src/web/frontend/page/group/index.tsx +6 -19
- package/src/web/frontend/page/repos/branch-persist.ts +32 -0
- package/src/web/frontend/page/repos/icons.tsx +47 -229
- package/src/web/frontend/page/repos/index.tsx +12 -8
- package/src/web/frontend/page/repos/repo-table.tsx +24 -3
- package/src/web/frontend/page/settings/api.ts +20 -0
- package/src/web/frontend/page/settings/index.tsx +1 -1
- package/src/web/frontend/page/settings/prompt-template-editor.tsx +180 -0
- package/src/web/frontend/page/settings/prompt-templates-section.tsx +39 -34
- package/src/web/frontend/page/settings/style.css +30 -0
- package/src/web/frontend/page/templates/index.tsx +5 -54
- package/src/web/frontend/page/templates/manage.tsx +1 -5
- package/src/web/frontend/page/templates/style.css +1 -43
- package/src/web/frontend/page/templates/template-list.tsx +7 -15
- package/src/web/frontend/routes/route-eq.ts +2 -3
- package/src/web/frontend/routes/static.ts +2 -2
- package/src/web/frontend/routes/templates.ts +0 -10
- package/src/web/frontend/styles/repos.css +22 -0
- package/src/web/frontend/styles-v2/shell.css +7 -0
- package/src/web/frontend/svghub/catalog-act.ts +168 -0
- package/src/web/frontend/svghub/catalog-doc.ts +102 -0
- package/src/web/frontend/svghub/catalog-nav.ts +192 -0
- package/src/web/frontend/svghub/catalog-repo.ts +102 -0
- package/src/web/frontend/svghub/catalog-state.ts +70 -0
- package/src/web/frontend/svghub/icon.tsx +95 -0
- package/src/web/frontend/svghub/index.ts +66 -0
- package/src/web/frontend/svghub/serialize.ts +39 -0
- package/src/web/frontend/svghub/types.ts +67 -0
- package/src/web/frontend/types.ts +2 -1
- package/src/web/public/assets/app-context-BqCBcDsx.js +1 -0
- package/src/web/public/assets/bar-Dc5Tq1eE.js +1 -0
- package/src/web/public/assets/{button-BEWXOABr.js → button-3JlUeln_.js} +1 -1
- package/src/web/public/assets/{composer-launch-DRi9mZE1.js → composer-launch-fp2IzGzQ.js} +1 -1
- package/src/web/public/assets/{composer-panel-swmDqlPw.js → composer-panel-Dh681iO6.js} +1 -1
- package/src/web/public/assets/dag-DnaU0I_z.js +1 -0
- package/src/web/public/assets/dir-d16q1GLe.js +3 -0
- package/src/web/public/assets/doc-DRSKD0Re.js +6 -0
- package/src/web/public/assets/group-Dc3ZgW24.js +1 -0
- package/src/web/public/assets/index-BIVxGd6t.css +1 -0
- package/src/web/public/assets/index-Bg0m8gbJ.js +2 -0
- package/src/web/public/assets/{list-filter-D-x94TvA.js → list-filter-CWxiOSg_.js} +1 -1
- package/src/web/public/assets/md-history-CLIs9Dr0.css +1 -0
- package/src/web/public/assets/md-history-DNtgaIdH.js +39 -0
- package/src/web/public/assets/{member-picker-Cvbv24IK.js → member-picker-BZgE3HGb.js} +1 -1
- package/src/web/public/assets/model-CtG2jIDv.js +2 -0
- package/src/web/public/assets/{overview-CctJfO3D.js → overview-C68QpcT9.js} +1 -1
- package/src/web/public/assets/popup-DZ2Khv2c.js +1 -0
- package/src/web/public/assets/progress-CEmAFxo9.js +3 -0
- package/src/web/public/assets/refs-TzxZYy7T.js +2 -0
- package/src/web/public/assets/repo-form-modal-Dg3hJWUV.js +1 -0
- package/src/web/public/assets/repos-uNqSR5YB.js +12 -0
- package/src/web/public/assets/{route-crumb-BcDPd7Ht.js → route-crumb-C4DgkJ8G.js} +1 -1
- package/src/web/public/assets/{settings-Cc6puKd5.css → settings-BWHjNegB.css} +1 -1
- package/src/web/public/assets/settings-BzIllshQ.js +1 -0
- package/src/web/public/assets/{status-tag-BD_0iWMB.js → status-tag-8cLH8hl9.js} +1 -1
- package/src/web/public/assets/task-DuFOXLPC.js +11 -0
- package/src/web/public/assets/{task-row-CQgzQmzu.js → task-row-CRjuAfKW.js} +1 -1
- package/src/web/public/assets/{task-utils-bJH1-Cjy.js → task-utils-DAPxKm4c.js} +1 -1
- package/src/web/public/assets/templates-CwYDIBYn.css +1 -0
- package/src/web/public/assets/templates-DNiGvmdq.js +10 -0
- package/src/web/public/assets/{use-rail-drag-ufwy2XZB.js → use-rail-drag-DxIYcszo.js} +1 -1
- package/src/web/public/assets/{workspace-D3jbcTwf.js → workspace-DojQ3RP4.js} +2 -2
- package/src/web/public/index.html +15 -16
- package/src/web/frontend/modules/md/fill-session.ts +0 -36
- package/src/web/frontend/modules/md/new-task-from-template.ts +0 -22
- package/src/web/frontend/modules/md/task-intent.ts +0 -29
- package/src/web/frontend/modules/prompts/render-template-body.ts +0 -14
- package/src/web/frontend/modules/prompts/template-preview.ts +0 -62
- package/src/web/frontend/page/templates/fill.tsx +0 -124
- package/src/web/public/assets/app-context-DDQnrPSP.js +0 -1
- package/src/web/public/assets/bar-j14ON7uZ.js +0 -1
- package/src/web/public/assets/dag-BzdFYMml.js +0 -1
- package/src/web/public/assets/dir-DhsB1ZhL.js +0 -3
- package/src/web/public/assets/doc-D4po3sDc.js +0 -6
- package/src/web/public/assets/fill-session-fHxQHFaD.js +0 -1
- package/src/web/public/assets/group-BxmSNzIB.js +0 -1
- package/src/web/public/assets/index-CMjG5NVU.js +0 -2
- package/src/web/public/assets/index-uMjSWNVr.css +0 -1
- package/src/web/public/assets/md-history-1h2zairf.css +0 -1
- package/src/web/public/assets/md-history-CZUF_FhN.js +0 -39
- package/src/web/public/assets/model-Cc2EoUQp.js +0 -2
- package/src/web/public/assets/new-task-from-template-DDWu4yR4.js +0 -1
- package/src/web/public/assets/popup-D8KWI6-Q.js +0 -1
- package/src/web/public/assets/progress-CawQRCQf.js +0 -3
- package/src/web/public/assets/refs-TuuoaRs7.js +0 -2
- package/src/web/public/assets/render-template-body-bXdedFig.js +0 -1
- package/src/web/public/assets/repo-form-modal-BD4N37MI.js +0 -1
- package/src/web/public/assets/repos-BPeuX4N9.js +0 -12
- package/src/web/public/assets/settings-CZJaKLZW.js +0 -1
- package/src/web/public/assets/task-DgbbF5gy.js +0 -11
- package/src/web/public/assets/task-intent-CX5DZccN.js +0 -1
- package/src/web/public/assets/templates-CBXlwyof.js +0 -11
- package/src/web/public/assets/templates-plA8R7jJ.css +0 -1
|
@@ -77,6 +77,9 @@ import type {
|
|
|
77
77
|
} from '../../../modules/localtask/actions/_manifest.generated.js';
|
|
78
78
|
import type {
|
|
79
79
|
PromptRegistryAction,
|
|
80
|
+
PromptTemplateActivateAction,
|
|
81
|
+
PromptTemplateDeleteAction,
|
|
82
|
+
PromptTemplateSaveAction,
|
|
80
83
|
} from '../../../modules/promptplug/actions/_manifest.generated.js';
|
|
81
84
|
import type {
|
|
82
85
|
BoardAddAction,
|
|
@@ -405,6 +408,12 @@ export interface ApiClient {
|
|
|
405
408
|
bundledList(): Promise<Awaited<ReturnType<InstanceType<typeof BundledListAction>['run']>>>;
|
|
406
409
|
/** 提示词插件注册表:按时机链(get / check / done)列出插件的内置模板 / 变量目录 / 链内顺序 */
|
|
407
410
|
registry(): Promise<Awaited<ReturnType<InstanceType<typeof PromptRegistryAction>['run']>>>;
|
|
411
|
+
/** 切换提示词段启用的模板(builtin 或用户条目) */
|
|
412
|
+
activate(input: z.input<InstanceType<typeof PromptTemplateActivateAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof PromptTemplateActivateAction>['run']>>>;
|
|
413
|
+
/** 删除提示词段的用户模板(启用中的删除后回落 builtin) */
|
|
414
|
+
delete(input: z.input<InstanceType<typeof PromptTemplateDeleteAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof PromptTemplateDeleteAction>['run']>>>;
|
|
415
|
+
/** 保存提示词段模板(新建/编辑用户条目;保存前按该段变量白名单校验) */
|
|
416
|
+
save(input: z.input<InstanceType<typeof PromptTemplateSaveAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof PromptTemplateSaveAction>['run']>>>;
|
|
408
417
|
}
|
|
409
418
|
|
|
410
419
|
export function createApiClient(transport: Transport): ApiClient {
|
|
@@ -1244,7 +1253,7 @@ export function createApiClient(transport: Transport): ApiClient {
|
|
|
1244
1253
|
async default(input: z.input<InstanceType<typeof TemplatesDefaultAction>['_input']>) {
|
|
1245
1254
|
const inp = input ?? ({} as z.input<InstanceType<typeof TemplatesDefaultAction>['_input']>);
|
|
1246
1255
|
const path = `/api/templates/default`;
|
|
1247
|
-
const body = { "id": inp["id"], "name": inp["name"], "body": inp["body"], "
|
|
1256
|
+
const body = { "id": inp["id"], "name": inp["name"], "body": inp["body"], "scope": inp["scope"] };
|
|
1248
1257
|
return (await transport.request("PATCH", path, body)) as Awaited<ReturnType<InstanceType<typeof TemplatesDefaultAction>['run']>>;
|
|
1249
1258
|
},
|
|
1250
1259
|
// action: templates.list
|
|
@@ -1276,7 +1285,7 @@ export function createApiClient(transport: Transport): ApiClient {
|
|
|
1276
1285
|
async templatesUpdate(input: z.input<InstanceType<typeof TemplatesUpdateAction>['_input']>) {
|
|
1277
1286
|
const inp = input ?? ({} as z.input<InstanceType<typeof TemplatesUpdateAction>['_input']>);
|
|
1278
1287
|
const path = `/api/templates/${encodeURIComponent(String(inp["id"]))}`;
|
|
1279
|
-
const body = { "name": inp["name"], "body": inp["body"], "bodyFile": inp["bodyFile"], "body-file": inp["body-file"], "scope": inp["scope"]
|
|
1288
|
+
const body = { "name": inp["name"], "body": inp["body"], "bodyFile": inp["bodyFile"], "body-file": inp["body-file"], "scope": inp["scope"] };
|
|
1280
1289
|
return (await transport.request("PATCH", path, body)) as Awaited<ReturnType<InstanceType<typeof TemplatesUpdateAction>['run']>>;
|
|
1281
1290
|
},
|
|
1282
1291
|
// action: file.content
|
|
@@ -1349,5 +1358,26 @@ export function createApiClient(transport: Transport): ApiClient {
|
|
|
1349
1358
|
const path = `/api/prompt/registry`;
|
|
1350
1359
|
return (await transport.request("GET", path)) as Awaited<ReturnType<InstanceType<typeof PromptRegistryAction>['run']>>;
|
|
1351
1360
|
},
|
|
1361
|
+
// action: prompt.template.activate
|
|
1362
|
+
async activate(input: z.input<InstanceType<typeof PromptTemplateActivateAction>['_input']>) {
|
|
1363
|
+
const inp = input ?? ({} as z.input<InstanceType<typeof PromptTemplateActivateAction>['_input']>);
|
|
1364
|
+
const path = `/api/prompt/template/activate`;
|
|
1365
|
+
const body = { "segment": inp["segment"], "id": inp["id"] };
|
|
1366
|
+
return (await transport.request("POST", path, body)) as Awaited<ReturnType<InstanceType<typeof PromptTemplateActivateAction>['run']>>;
|
|
1367
|
+
},
|
|
1368
|
+
// action: prompt.template.delete
|
|
1369
|
+
async delete(input: z.input<InstanceType<typeof PromptTemplateDeleteAction>['_input']>) {
|
|
1370
|
+
const inp = input ?? ({} as z.input<InstanceType<typeof PromptTemplateDeleteAction>['_input']>);
|
|
1371
|
+
const path = `/api/prompt/template/delete`;
|
|
1372
|
+
const body = { "segment": inp["segment"], "id": inp["id"] };
|
|
1373
|
+
return (await transport.request("POST", path, body)) as Awaited<ReturnType<InstanceType<typeof PromptTemplateDeleteAction>['run']>>;
|
|
1374
|
+
},
|
|
1375
|
+
// action: prompt.template.save
|
|
1376
|
+
async save(input: z.input<InstanceType<typeof PromptTemplateSaveAction>['_input']>) {
|
|
1377
|
+
const inp = input ?? ({} as z.input<InstanceType<typeof PromptTemplateSaveAction>['_input']>);
|
|
1378
|
+
const path = `/api/prompt/template/save`;
|
|
1379
|
+
const body = { "segment": inp["segment"], "id": inp["id"], "name": inp["name"], "text": inp["text"] };
|
|
1380
|
+
return (await transport.request("POST", path, body)) as Awaited<ReturnType<InstanceType<typeof PromptTemplateSaveAction>['run']>>;
|
|
1381
|
+
},
|
|
1352
1382
|
};
|
|
1353
1383
|
}
|
|
@@ -10,6 +10,7 @@ import type { ReactNode } from 'react';
|
|
|
10
10
|
import { createPortal } from 'react-dom';
|
|
11
11
|
import { MenuPortal, openMenuAt, useMenu } from '../md/tool-bar.jsx';
|
|
12
12
|
import { inMoreOf, metaOf, onBarOf } from '../tool-acts/modules.js';
|
|
13
|
+
import { Icon } from '../icons.jsx';
|
|
13
14
|
import { useToolActsLayout } from '../tool-acts/use-layout.js';
|
|
14
15
|
import ToolActsLayoutPanel from '../tool-acts/layout-panel.jsx';
|
|
15
16
|
import '../tool-acts/style.css';
|
|
@@ -132,6 +133,7 @@ export default function DocHead({
|
|
|
132
133
|
aria-expanded={more.open}
|
|
133
134
|
onClick={(e) => openMenuAt(more, e, 'right')}
|
|
134
135
|
>
|
|
136
|
+
<Icon name="dots" />
|
|
135
137
|
更多
|
|
136
138
|
</button>
|
|
137
139
|
</div>
|
|
@@ -139,6 +141,7 @@ export default function DocHead({
|
|
|
139
141
|
}
|
|
140
142
|
const s = specs[id];
|
|
141
143
|
if (!s) return null;
|
|
144
|
+
const m = metaOf(KIND, id);
|
|
142
145
|
return (
|
|
143
146
|
<button
|
|
144
147
|
key={id}
|
|
@@ -147,6 +150,7 @@ export default function DocHead({
|
|
|
147
150
|
disabled={!!s.disabled}
|
|
148
151
|
onClick={() => runItem(id)}
|
|
149
152
|
>
|
|
153
|
+
{m.icon ? <Icon name={m.icon} /> : null}
|
|
150
154
|
{s.label || metaOf(KIND, id).label || id}
|
|
151
155
|
</button>
|
|
152
156
|
);
|
|
@@ -203,7 +207,8 @@ export default function DocHead({
|
|
|
203
207
|
<div className="mdw-fmt-menu-cap">{g.label}</div>
|
|
204
208
|
{g.items.map((x) => {
|
|
205
209
|
const s = specs[x.id];
|
|
206
|
-
const
|
|
210
|
+
const m = metaOf(KIND, x.id);
|
|
211
|
+
const danger = s?.danger || m.danger;
|
|
207
212
|
return (
|
|
208
213
|
<button
|
|
209
214
|
key={x.id}
|
|
@@ -212,7 +217,8 @@ export default function DocHead({
|
|
|
212
217
|
className={'mdw-fmt-menu-item' + (danger ? ' danger' : '')}
|
|
213
218
|
onClick={() => runItem(x.id)}
|
|
214
219
|
>
|
|
215
|
-
{
|
|
220
|
+
{m.icon ? <Icon name={m.icon} /> : null}
|
|
221
|
+
{s?.label || m.label || x.id}
|
|
216
222
|
{s?.hint ? <span className="hint">{s.hint}</span> : null}
|
|
217
223
|
</button>
|
|
218
224
|
);
|
|
@@ -221,15 +227,17 @@ export default function DocHead({
|
|
|
221
227
|
))}
|
|
222
228
|
{ungroupedMore.map((x) => {
|
|
223
229
|
const s = specs[x.id];
|
|
230
|
+
const m = metaOf(KIND, x.id);
|
|
224
231
|
return (
|
|
225
232
|
<button
|
|
226
233
|
key={x.id}
|
|
227
234
|
type="button"
|
|
228
235
|
role="menuitem"
|
|
229
|
-
className={'mdw-fmt-menu-item' + (s?.danger ||
|
|
236
|
+
className={'mdw-fmt-menu-item' + (s?.danger || m.danger ? ' danger' : '')}
|
|
230
237
|
onClick={() => runItem(x.id)}
|
|
231
238
|
>
|
|
232
|
-
{
|
|
239
|
+
{m.icon ? <Icon name={m.icon} /> : null}
|
|
240
|
+
{s?.label || m.label || x.id}
|
|
233
241
|
</button>
|
|
234
242
|
);
|
|
235
243
|
})}
|
|
@@ -243,6 +251,7 @@ export default function DocHead({
|
|
|
243
251
|
setPanelOpen(true);
|
|
244
252
|
}}
|
|
245
253
|
>
|
|
254
|
+
<Icon name="gear" />
|
|
246
255
|
自定义工具栏…
|
|
247
256
|
</button>
|
|
248
257
|
</MenuPortal>
|
|
@@ -1,199 +1,9 @@
|
|
|
1
|
-
// 内联 SVG
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
folder: (
|
|
11
|
-
<>
|
|
12
|
-
<path d="M3.5 6.5c0-1.1.9-2 2-2h4l2 2.5h7c1.1 0 2 .9 2 2v8.5c0 1.1-.9 2-2 2h-13c-1.1 0-2-.9-2-2z" />
|
|
13
|
-
</>
|
|
14
|
-
),
|
|
15
|
-
globe: (
|
|
16
|
-
<>
|
|
17
|
-
<circle cx="12" cy="12" r="8.5" />
|
|
18
|
-
<path d="M3.5 12h17M12 3.5c2.6 2.3 4 5.2 4 8.5s-1.4 6.2-4 8.5c-2.6-2.3-4-5.2-4-8.5s1.4-6.2 4-8.5z" />
|
|
19
|
-
</>
|
|
20
|
-
),
|
|
21
|
-
gear: (
|
|
22
|
-
<>
|
|
23
|
-
<circle cx="12" cy="12" r="3" />
|
|
24
|
-
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />
|
|
25
|
-
</>
|
|
26
|
-
),
|
|
27
|
-
// #144:主篇(星)/ 链接(复制 refId)——文档列表的 ⋯ 菜单用
|
|
28
|
-
star: (
|
|
29
|
-
<>
|
|
30
|
-
<path d="m12 3.6 2.6 5.3 5.9.9-4.3 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8L3.5 9.8l5.9-.9z" />
|
|
31
|
-
</>
|
|
32
|
-
),
|
|
33
|
-
link: (
|
|
34
|
-
<>
|
|
35
|
-
<path d="M10.2 13.8a3.6 3.6 0 0 0 5.1 0l2.6-2.6a3.6 3.6 0 0 0-5.1-5.1l-1.2 1.2" />
|
|
36
|
-
<path d="M13.8 10.2a3.6 3.6 0 0 0-5.1 0l-2.6 2.6a3.6 3.6 0 0 0 5.1 5.1l1.2-1.2" />
|
|
37
|
-
</>
|
|
38
|
-
),
|
|
39
|
-
search: (
|
|
40
|
-
<>
|
|
41
|
-
<circle cx="11" cy="11" r="6.5" />
|
|
42
|
-
<path d="m20.2 20.2-4.5-4.5" />
|
|
43
|
-
</>
|
|
44
|
-
),
|
|
45
|
-
plus: P('M12 5v14M5 12h14'),
|
|
46
|
-
help: (
|
|
47
|
-
<>
|
|
48
|
-
<circle cx="12" cy="12" r="8.5" />
|
|
49
|
-
<path d="M9.4 9.3a2.7 2.7 0 1 1 3.6 2.5c-.7.4-1 .9-1 1.7" />
|
|
50
|
-
<path d="M12 16.6v.2" />
|
|
51
|
-
</>
|
|
52
|
-
),
|
|
53
|
-
back: P('M14.5 5.5 8 12l6.5 6.5'),
|
|
54
|
-
chevron: P('m9 6 6 6-6 6'),
|
|
55
|
-
/** 侧栏展开 / 布局示意:左轨 + 面板 */
|
|
56
|
-
sidebar: (
|
|
57
|
-
<>
|
|
58
|
-
<rect x="3.5" y="4.5" width="17" height="15" rx="2" />
|
|
59
|
-
<path d="M9.5 4.5v15" />
|
|
60
|
-
</>
|
|
61
|
-
),
|
|
62
|
-
refresh: (
|
|
63
|
-
<>
|
|
64
|
-
<path d="M20 12a8 8 0 1 1-2.34-5.66" />
|
|
65
|
-
<path d="M20 3.8v4.4h-4.4" />
|
|
66
|
-
</>
|
|
67
|
-
),
|
|
68
|
-
monitor: (
|
|
69
|
-
<>
|
|
70
|
-
<rect x="3.5" y="4.5" width="17" height="12" rx="1.8" />
|
|
71
|
-
<path d="M9 20h6M12 16.5V20" />
|
|
72
|
-
</>
|
|
73
|
-
),
|
|
74
|
-
archive: (
|
|
75
|
-
<>
|
|
76
|
-
<rect x="3.5" y="4.5" width="17" height="4.5" rx="1" />
|
|
77
|
-
<path d="M5.5 9v9c0 .8.7 1.5 1.5 1.5h10c.8 0 1.5-.7 1.5-1.5V9M10 13h4" />
|
|
78
|
-
</>
|
|
79
|
-
),
|
|
80
|
-
check: P('m5 12.5 4.5 4.5L19 7.5'),
|
|
81
|
-
trash: (
|
|
82
|
-
<>
|
|
83
|
-
<path d="M4.5 6.5h15M9.5 6V4.5c0-.6.4-1 1-1h3c.6 0 1 .4 1 1V6M6.5 6.5l.8 12c.1.9.8 1.5 1.7 1.5h6c.9 0 1.6-.6 1.7-1.5l.8-12" />
|
|
84
|
-
</>
|
|
85
|
-
),
|
|
86
|
-
lock: (
|
|
87
|
-
<>
|
|
88
|
-
<rect x="5.5" y="10.5" width="13" height="9" rx="1.8" />
|
|
89
|
-
<path d="M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5" />
|
|
90
|
-
</>
|
|
91
|
-
),
|
|
92
|
-
warn: (
|
|
93
|
-
<>
|
|
94
|
-
<path d="M12 3.8 21.2 20H2.8z" />
|
|
95
|
-
<path d="M12 10v4.2M12 17.2v.4" />
|
|
96
|
-
</>
|
|
97
|
-
),
|
|
98
|
-
list: P('M8.5 6h12M8.5 12h12M8.5 18h12M4 6h.5M4 12h.5M4 18h.5'),
|
|
99
|
-
overview: (
|
|
100
|
-
<>
|
|
101
|
-
<rect x="3.5" y="3.5" width="7.5" height="7.5" rx="1.5" />
|
|
102
|
-
<rect x="13" y="3.5" width="7.5" height="7.5" rx="1.5" />
|
|
103
|
-
<rect x="3.5" y="13" width="7.5" height="7.5" rx="1.5" />
|
|
104
|
-
<rect x="13" y="13" width="7.5" height="7.5" rx="1.5" />
|
|
105
|
-
</>
|
|
106
|
-
),
|
|
107
|
-
dots: (
|
|
108
|
-
<>
|
|
109
|
-
<circle cx="5.5" cy="12" r="1.4" fill="currentColor" stroke="none" />
|
|
110
|
-
<circle cx="12" cy="12" r="1.4" fill="currentColor" stroke="none" />
|
|
111
|
-
<circle cx="18.5" cy="12" r="1.4" fill="currentColor" stroke="none" />
|
|
112
|
-
</>
|
|
113
|
-
),
|
|
114
|
-
/** 竖向六点抓手(拖排序) */
|
|
115
|
-
grip: (
|
|
116
|
-
<>
|
|
117
|
-
<circle cx="9" cy="6" r="1.35" fill="currentColor" stroke="none" />
|
|
118
|
-
<circle cx="15" cy="6" r="1.35" fill="currentColor" stroke="none" />
|
|
119
|
-
<circle cx="9" cy="12" r="1.35" fill="currentColor" stroke="none" />
|
|
120
|
-
<circle cx="15" cy="12" r="1.35" fill="currentColor" stroke="none" />
|
|
121
|
-
<circle cx="9" cy="18" r="1.35" fill="currentColor" stroke="none" />
|
|
122
|
-
<circle cx="15" cy="18" r="1.35" fill="currentColor" stroke="none" />
|
|
123
|
-
</>
|
|
124
|
-
),
|
|
125
|
-
clock: (
|
|
126
|
-
<>
|
|
127
|
-
<circle cx="12" cy="12" r="8.5" />
|
|
128
|
-
<path d="M12 7v5.2l3.4 2" />
|
|
129
|
-
</>
|
|
130
|
-
),
|
|
131
|
-
send: P('M4 12 20 4l-4 16-4.5-6.5z'),
|
|
132
|
-
repo: (
|
|
133
|
-
<>
|
|
134
|
-
<path d="M4.5 5.5c0-1.1.9-2 2-2h13v15h-13c-1.1 0-2 .7-2 1.8z" />
|
|
135
|
-
<path d="M4.5 20.3c0-1.1.9-1.8 2-1.8h13" />
|
|
136
|
-
</>
|
|
137
|
-
),
|
|
138
|
-
jump: P('M6 18 18 6M9 6h9v9'),
|
|
139
|
-
/** 面板最大化 / 还原(#79 底部信息面板右上角控制钮) */
|
|
140
|
-
expand: (
|
|
141
|
-
<>
|
|
142
|
-
<path d="M4.5 9V4.5H9" />
|
|
143
|
-
<path d="M15 4.5h4.5V9" />
|
|
144
|
-
<path d="M19.5 15v4.5H15" />
|
|
145
|
-
<path d="M9 19.5H4.5V15" />
|
|
146
|
-
</>
|
|
147
|
-
),
|
|
148
|
-
collapse: (
|
|
149
|
-
<>
|
|
150
|
-
<path d="M9.5 4.5v5h-5" />
|
|
151
|
-
<path d="M14.5 4.5v5h5" />
|
|
152
|
-
<path d="M19.5 14.5h-5v5" />
|
|
153
|
-
<path d="M4.5 14.5h5v5" />
|
|
154
|
-
</>
|
|
155
|
-
),
|
|
156
|
-
/** 迁回布局:外框=主布局,左竖线=停靠边,箭头=把浮窗收回去 */
|
|
157
|
-
dock: (
|
|
158
|
-
<>
|
|
159
|
-
<rect x="3.5" y="4.5" width="17" height="15" rx="2.2" />
|
|
160
|
-
<path d="M8.6 4.5v15" />
|
|
161
|
-
<path d="m16.2 8.8-3.7 3.2 3.7 3.2" />
|
|
162
|
-
</>
|
|
163
|
-
),
|
|
164
|
-
x: P('M6 6l12 12M18 6 6 18'),
|
|
165
|
-
pin: P('M12 21v-7M7.5 4h9l-1.2 6.5c1 .8 1.7 2 1.7 3.5h-11c0-1.5.7-2.7 1.7-3.5z'),
|
|
166
|
-
edit: P('M4 20h16M13.5 4.5l4 4L8 18H4v-4z'),
|
|
167
|
-
flow: P('M4 7h6M14 7h6M4 17h6M14 17h6M10 7a4 4 0 0 0 4 4M14 13a4 4 0 0 0-4 4'),
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
/** 图标组件入参。`title` 有值时才做可访问命名(否则整颗图标对读屏隐藏)。 */
|
|
171
|
-
export interface IconProps {
|
|
172
|
-
name: string;
|
|
173
|
-
size?: number;
|
|
174
|
-
className?: string;
|
|
175
|
-
title?: string;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export function Icon({ name, size = 14, className = '', title }: IconProps) {
|
|
179
|
-
const glyph = ICONS[name];
|
|
180
|
-
if (!glyph) return null;
|
|
181
|
-
return (
|
|
182
|
-
<svg
|
|
183
|
-
className={'ic' + (className ? ' ' + className : '')}
|
|
184
|
-
width={size}
|
|
185
|
-
height={size}
|
|
186
|
-
viewBox="0 0 24 24"
|
|
187
|
-
fill="none"
|
|
188
|
-
stroke="currentColor"
|
|
189
|
-
strokeWidth="1.8"
|
|
190
|
-
strokeLinecap="round"
|
|
191
|
-
strokeLinejoin="round"
|
|
192
|
-
aria-hidden={title ? undefined : true}
|
|
193
|
-
role={title ? 'img' : undefined}
|
|
194
|
-
>
|
|
195
|
-
{title ? <title>{title}</title> : null}
|
|
196
|
-
{glyph}
|
|
197
|
-
</svg>
|
|
198
|
-
);
|
|
199
|
-
}
|
|
1
|
+
// 内联 SVG 图标集(对外接口不变)——图形定义已于本轮迁进 svghub 资产库。
|
|
2
|
+
//
|
|
3
|
+
// 为什么留这个文件:全仓 30+ 个文件从 `components/icons.jsx` 取 `Icon`,接口
|
|
4
|
+
// `<Icon name="…" size={…} />` 是稳定契约。资产库换了存放方式(从 JSX 表换成
|
|
5
|
+
// 可序列化的数据),调用点一个都不用改——这正是「统一管理 + 多路复用」的落点。
|
|
6
|
+
//
|
|
7
|
+
// 新增图标请改 svghub/catalog-*.ts,不要在这里加分支。
|
|
8
|
+
export { Icon } from '../svghub/icon.jsx';
|
|
9
|
+
export type { IconProps } from '../svghub/icon.jsx';
|
|
@@ -33,8 +33,6 @@ interface LiveBlockProps {
|
|
|
33
33
|
rail?: ReactNode;
|
|
34
34
|
/** 拖拽落点指示:插到本块之前还是之后(null = 不是落点) */
|
|
35
35
|
dropEdge?: 'before' | 'after' | null;
|
|
36
|
-
/** 模板插槽块:可编辑,但加视觉标记(这里是要填内容的地方)。仅模板编辑页会传。 */
|
|
37
|
-
slot?: boolean;
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
export default function LiveBlock({
|
|
@@ -55,7 +53,6 @@ export default function LiveBlock({
|
|
|
55
53
|
pendingFormatRef,
|
|
56
54
|
rail = null,
|
|
57
55
|
dropEdge = null,
|
|
58
|
-
slot = false,
|
|
59
56
|
}: LiveBlockProps) {
|
|
60
57
|
const taRef = useRef<HTMLTextAreaElement | null>(null);
|
|
61
58
|
const display = normalizeBlockText(text);
|
|
@@ -145,7 +142,7 @@ export default function LiveBlock({
|
|
|
145
142
|
|
|
146
143
|
return (
|
|
147
144
|
<div
|
|
148
|
-
className={`mdw-lp-block is-view kind-${kind}${isEmptyBlock(text) ? ' is-empty' : ''}${hit ? ' is-hit' : ''}${dropCls}
|
|
145
|
+
className={`mdw-lp-block is-view kind-${kind}${isEmptyBlock(text) ? ' is-empty' : ''}${hit ? ' is-hit' : ''}${dropCls}`}
|
|
149
146
|
data-i={index}
|
|
150
147
|
role="button"
|
|
151
148
|
tabIndex={0}
|
|
@@ -160,7 +157,6 @@ export default function LiveBlock({
|
|
|
160
157
|
}}
|
|
161
158
|
>
|
|
162
159
|
{rail}
|
|
163
|
-
{slot && <span className="mdw-lp-slot" aria-hidden>插槽</span>}
|
|
164
160
|
{html ? (
|
|
165
161
|
<div className="mdw-lp-view" dangerouslySetInnerHTML={{ __html: html }} />
|
|
166
162
|
) : (
|
|
@@ -34,8 +34,6 @@ export interface MdPanesProps {
|
|
|
34
34
|
onCloseSelMenu?: (() => void) | null;
|
|
35
35
|
hideTitle?: boolean;
|
|
36
36
|
attachHost?: AttachHost | null;
|
|
37
|
-
/** 模板编辑器的插槽块下标(#218):只加「插槽」徽标,不产生只读块。 */
|
|
38
|
-
tplSlotBlocks?: Set<number> | null;
|
|
39
37
|
}
|
|
40
38
|
|
|
41
39
|
/** 实时预览 / 源码 / 阅读 */
|
|
@@ -58,7 +56,6 @@ export const MdPanes = forwardRef<HTMLElement, MdPanesProps>(function MdPanes(
|
|
|
58
56
|
onCloseSelMenu = null,
|
|
59
57
|
hideTitle = false,
|
|
60
58
|
attachHost = null,
|
|
61
|
-
tplSlotBlocks = null,
|
|
62
59
|
},
|
|
63
60
|
articleRef
|
|
64
61
|
) {
|
|
@@ -178,7 +175,6 @@ export const MdPanes = forwardRef<HTMLElement, MdPanesProps>(function MdPanes(
|
|
|
178
175
|
onCloseSelMenu={onCloseSelMenu}
|
|
179
176
|
hideTitle={hideTitle}
|
|
180
177
|
attachHost={attachHost}
|
|
181
|
-
tplSlotBlocks={tplSlotBlocks}
|
|
182
178
|
/>
|
|
183
179
|
</div>
|
|
184
180
|
);
|
|
@@ -57,8 +57,6 @@ import {
|
|
|
57
57
|
toggleNthTodo,
|
|
58
58
|
} from '../../modules/md/md-edit-ops.js';
|
|
59
59
|
import { isFrontmatterBlock, normalizeBlockText } from '../../modules/md/md-parse.js';
|
|
60
|
-
// #151:槽位/模板骨架只读已从任务编辑器移除——模板生成的正文是纯文本,
|
|
61
|
-
// 编辑页不再派生任何「模板/插槽」概念(tplSlotBlocks 仅供模板**编辑**页用)。
|
|
62
60
|
import type { Attachment } from './attach-common.js';
|
|
63
61
|
|
|
64
62
|
export { MdPanes, ModeSeg } from './md-panes-root.jsx';
|
|
@@ -151,13 +149,6 @@ interface LivePreviewProps {
|
|
|
151
149
|
onCloseSelMenu?: (() => void) | null;
|
|
152
150
|
hideTitle?: boolean;
|
|
153
151
|
attachHost?: AttachHost | null;
|
|
154
|
-
/**
|
|
155
|
-
* 调用方直接声明的插槽块下标(模板编辑器用,#218)。
|
|
156
|
-
* 任务编辑器的插槽来自正文 frontmatter 的模板身份(locks.slots);
|
|
157
|
-
* 模板编辑器编辑的就是模板本身、没有身份可言,所以由调用方按
|
|
158
|
-
* 「哪块含 {{content}}」算好递进来 —— 只加插槽徽标,不产生只读块。
|
|
159
|
-
*/
|
|
160
|
-
tplSlotBlocks?: Set<number> | null;
|
|
161
152
|
}
|
|
162
153
|
|
|
163
154
|
/**
|
|
@@ -166,7 +157,7 @@ interface LivePreviewProps {
|
|
|
166
157
|
*/
|
|
167
158
|
function LivePreview({
|
|
168
159
|
title, body, onTitle, onBody, articleRef, attachments, docKey, onFiles, editorApiRef, onTextSel,
|
|
169
|
-
onCloseSelMenu, hideTitle = false, attachHost = null,
|
|
160
|
+
onCloseSelMenu, hideTitle = false, attachHost = null,
|
|
170
161
|
}: LivePreviewProps) {
|
|
171
162
|
const {
|
|
172
163
|
blocks, focus, setFocus, pendingSelRef, pendingFormatRef, liveTaRef,
|
|
@@ -414,7 +405,6 @@ function LivePreview({
|
|
|
414
405
|
text={b}
|
|
415
406
|
focused={focus === i}
|
|
416
407
|
hit={hitBlock === i}
|
|
417
|
-
slot={!!tplSlotBlocks?.has(i)}
|
|
418
408
|
attachments={attachments}
|
|
419
409
|
pendingSelRef={pendingSelRef}
|
|
420
410
|
pendingFormatRef={pendingFormatRef}
|
|
@@ -12,6 +12,7 @@ import { createPortal } from 'react-dom';
|
|
|
12
12
|
import { inMoreOf, metaOf, onBarOf } from '../tool-acts/modules.js';
|
|
13
13
|
import { useToolActsLayout } from '../tool-acts/use-layout.js';
|
|
14
14
|
import ToolActsLayoutPanel from '../tool-acts/layout-panel.jsx';
|
|
15
|
+
import { Icon } from '../icons.jsx';
|
|
15
16
|
import '../tool-acts/style.css';
|
|
16
17
|
|
|
17
18
|
const KIND = 'task';
|
|
@@ -220,6 +221,7 @@ export default function ToolBar({
|
|
|
220
221
|
aria-haspopup="menu"
|
|
221
222
|
onClick={(e) => openMenuAt(actMore, e, 'right')}
|
|
222
223
|
>
|
|
224
|
+
<Icon name="dots" />
|
|
223
225
|
更多
|
|
224
226
|
</button>
|
|
225
227
|
</div>
|
|
@@ -227,6 +229,7 @@ export default function ToolBar({
|
|
|
227
229
|
}
|
|
228
230
|
const s = specs[id];
|
|
229
231
|
if (!s) return null;
|
|
232
|
+
const m = metaOf(KIND, id);
|
|
230
233
|
return (
|
|
231
234
|
<button
|
|
232
235
|
key={id}
|
|
@@ -234,6 +237,7 @@ export default function ToolBar({
|
|
|
234
237
|
className={s.primary ? 'btn sm primary' : 'btn ghost sm'}
|
|
235
238
|
onClick={() => runItem(id)}
|
|
236
239
|
>
|
|
240
|
+
{m.icon ? <Icon name={m.icon} /> : null}
|
|
237
241
|
{s.label}
|
|
238
242
|
</button>
|
|
239
243
|
);
|
|
@@ -276,6 +280,7 @@ export default function ToolBar({
|
|
|
276
280
|
{g.items.map((x: { id: string }) => {
|
|
277
281
|
const s = specs[x.id];
|
|
278
282
|
const danger = s?.danger || metaOf(KIND, x.id).danger;
|
|
283
|
+
const m = metaOf(KIND, x.id);
|
|
279
284
|
return (
|
|
280
285
|
<button
|
|
281
286
|
key={x.id}
|
|
@@ -284,6 +289,7 @@ export default function ToolBar({
|
|
|
284
289
|
className={'mdw-fmt-menu-item' + (danger ? ' danger' : '')}
|
|
285
290
|
onClick={() => runItem(x.id)}
|
|
286
291
|
>
|
|
292
|
+
{m.icon ? <Icon name={m.icon} /> : null}
|
|
287
293
|
{s?.label || metaOf(KIND, x.id).label || x.id}
|
|
288
294
|
{s?.hint ? <span className="hint">{s.hint}</span> : null}
|
|
289
295
|
</button>
|
|
@@ -293,6 +299,7 @@ export default function ToolBar({
|
|
|
293
299
|
))}
|
|
294
300
|
{ungroupedMore.map((x: { id: string }) => {
|
|
295
301
|
const s = specs[x.id];
|
|
302
|
+
const m = metaOf(KIND, x.id);
|
|
296
303
|
return (
|
|
297
304
|
<button
|
|
298
305
|
key={x.id}
|
|
@@ -301,6 +308,7 @@ export default function ToolBar({
|
|
|
301
308
|
className={'mdw-fmt-menu-item' + (s?.danger || metaOf(KIND, x.id).danger ? ' danger' : '')}
|
|
302
309
|
onClick={() => runItem(x.id)}
|
|
303
310
|
>
|
|
311
|
+
{m.icon ? <Icon name={m.icon} /> : null}
|
|
304
312
|
{s?.label || metaOf(KIND, x.id).label || x.id}
|
|
305
313
|
</button>
|
|
306
314
|
);
|
|
@@ -315,6 +323,7 @@ export default function ToolBar({
|
|
|
315
323
|
setPanelOpen(true);
|
|
316
324
|
}}
|
|
317
325
|
>
|
|
326
|
+
<Icon name="gear" />
|
|
318
327
|
自定义工具栏…
|
|
319
328
|
</button>
|
|
320
329
|
</MenuPortal>
|
|
@@ -24,6 +24,17 @@ import TaskChildren from './task-children.jsx';
|
|
|
24
24
|
import { ensureQueueAndGo } from './queue-nav.js';
|
|
25
25
|
import type { AppRoute, BoardRow, LocalTopic, Prefs, RepoRow, ShellApi } from '../../types.js';
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* 行图标:按**行语义**取资产名(全库见 svghub 资产库)。
|
|
29
|
+
* 以前组 / 仓库 / 参考仓库统统画文件夹,扫一眼分不出「这是哪类东西」;
|
|
30
|
+
* 现在组=分支、开发仓库=盒子、参考仓库=带箭头的盒子,全局池=地球。
|
|
31
|
+
*/
|
|
32
|
+
function rowIcon(row: SideRow): string {
|
|
33
|
+
if (row.type === 'board') return 'board';
|
|
34
|
+
if (row.type === 'global') return 'globe';
|
|
35
|
+
return row.repoType === 'ref' ? 'repo-ref' : 'repo';
|
|
36
|
+
}
|
|
37
|
+
|
|
27
38
|
/** Sidebar 入参(顶栏删除后这里是壳层唯一的数据入口)。 */
|
|
28
39
|
interface SidebarProps {
|
|
29
40
|
/** 开发仓库(type != ref) */
|
|
@@ -380,7 +391,7 @@ export default function Sidebar({
|
|
|
380
391
|
>
|
|
381
392
|
{/* 组是叶子:占位只为了与其它行对齐,不给可展开的假提示 */}
|
|
382
393
|
<span className="tw" aria-hidden />
|
|
383
|
-
<span className="gico"><Icon name="
|
|
394
|
+
<span className="gico"><Icon name="board" /></span>
|
|
384
395
|
<span className="nm">
|
|
385
396
|
{row.name}
|
|
386
397
|
</span>
|
|
@@ -423,7 +434,7 @@ export default function Sidebar({
|
|
|
423
434
|
<Icon name="chevron" size={10} />
|
|
424
435
|
</span>
|
|
425
436
|
<span className="gico">
|
|
426
|
-
{row.icon ? <span className="trow-icon" aria-hidden>{row.icon}</span> : <Icon name={row
|
|
437
|
+
{row.icon ? <span className="trow-icon" aria-hidden>{row.icon}</span> : <Icon name={rowIcon(row)} />}
|
|
427
438
|
</span>
|
|
428
439
|
<span className="nm">
|
|
429
440
|
{row.name}
|
|
@@ -30,6 +30,8 @@ export interface SideRow {
|
|
|
30
30
|
topicKey?: string;
|
|
31
31
|
name: string;
|
|
32
32
|
icon?: string;
|
|
33
|
+
/** 仓库行的登记类型(repo = 本地开发仓库 / ref = 参考仓库)——侧栏按它区分图标 */
|
|
34
|
+
repoType?: string;
|
|
33
35
|
cwd?: string;
|
|
34
36
|
desc?: string;
|
|
35
37
|
boards?: Array<{ key?: string; id?: string }>;
|
|
@@ -189,6 +191,7 @@ export function buildTree(
|
|
|
189
191
|
topicKey: first ? first.key : '',
|
|
190
192
|
name: r.name,
|
|
191
193
|
icon: r.icon || '', // 项目图标(emoji/单字符;空 = 默认文件夹图标)
|
|
194
|
+
repoType: r.type || 'repo', // 侧栏图标按「开发仓库 / 参考仓库」分开画
|
|
192
195
|
cwd: r.path || '',
|
|
193
196
|
desc: r.desc || '',
|
|
194
197
|
boards: r.boards || [],
|