Commit 430981d
feat(metadata-admin): db-only items show Delete action instead of Reset
For two-tier metadata types (allowRuntimeCreate true, allowOrgOverride
false — e.g. hook, trigger, validation), the prior UX showed 'Reset
overlay' on DB-only items, which is misleading because there is no
underlying artifact to reset to. The action actually deletes the row.
- ResourceEditPage: doReset() branches on itemIsArtifact; DB-only path
navigates back to the list after successful delete
- Button label/icon swap to Trash2/Delete when item is DB-only
- i18n: add engine.edit.delete + engine.edit.deleteConfirm in EN+ZH
Browser-verified end-to-end on hook type:
- artifact-locked item: shows lock banner + '新建' CTA (no delete button)
- DB-only item: shows '删除' button, confirmation dialog uses new key,
delete navigates back to directory page
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 6943854 commit 430981d
2 files changed
Lines changed: 37 additions & 9 deletions
Lines changed: 33 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
386 | 387 | | |
387 | 388 | | |
388 | 389 | | |
389 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
390 | 400 | | |
391 | 401 | | |
392 | 402 | | |
393 | 403 | | |
394 | 404 | | |
395 | 405 | | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
402 | 417 | | |
403 | 418 | | |
404 | 419 | | |
| |||
512 | 527 | | |
513 | 528 | | |
514 | 529 | | |
515 | | - | |
516 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
517 | 541 | | |
518 | 542 | | |
519 | 543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
| |||
269 | 271 | | |
270 | 272 | | |
271 | 273 | | |
| 274 | + | |
| 275 | + | |
272 | 276 | | |
273 | 277 | | |
274 | 278 | | |
| |||
0 commit comments