Repository navigation
nav 后台管理页:编辑图标、分类删除二次确认与重名校验、链接筛选「所有」 - #22
Merged
todosdev[bot] merged 2 commits intoNov 4, 2026
Merged
Conversation
SortableList 行内容改为只读展示,行尾新增 Pencil 编辑按钮,三处列表共用;删除统一走 AlertDialog 确认(分类提示级联删链接)。 CategoryPanel 保存前 trim + 不区分大小写查重(编辑排除自身);LinkPanel 筛选新增「所有」并按全局 sortOrder 展示全量,新建仍要求先选分类。
…8-79b2-8452-09d4f285c44d
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sortOrder展示全量链接。Changes
web/src/components/admin/sortable-list.tsx<button onClick={onEdit}>改为非交互展示;行尾新增 Pencil 编辑按钮(aria-label="编辑 <名称>")。confirmRemove/removeDescription:删除先弹 AlertDialog(标题带条目名,取消不删、删除才执行),保持现有AlertDialog组件视觉;操作按钮组不再被压缩。web/src/components/admin/crud-panels.tsxCategoryPanel.save():名称 trim 后为空直接拦下;与现有分类按 trim + 小写比对,重名 toast 报错且不发请求,编辑时排除自身;保存时提交 trim 后的名称。LinkPanel:筛选项新增「所有」(默认选中),category为空时展示按sortOrder排序的全量链接;「所有」态下新建链接会提示先选分类;全量视图下编辑现有链接正常保存(不再被分类前置判断提前 return);删除链接同样走确认。web/src/components/admin/settings-panels.tsxSearchEnginePanel删除同样接入confirmRemove。web/test/crud-panels.test.tsxSelectItem的 value 为空串(空串表示未选),对外行为与「不选分类」一致。Testing
pnpm lint(0 错误,27 条既有 warning 全在web/src/components/ui)、pnpm format:check、pnpm typecheck、pnpm build均通过;pnpm test:worker 102、web 47(+12)全过。wrangler dev托管构建产物 + 真实 SQLite 种子数据,27 项交互检查全过(三处编辑图标、三处删除确认的取消/确认、重名 toast、筛选「所有」与分类切换、删除分类后链接级联消失、刷新后状态保持);11 项布局检查在 1440×900 / 1280×800 / 1024×768 下无裁切、无横向溢出,确认弹窗完整落在视口内。CI,Validate 全绿(lint / format / typecheck / build / test)。合并main只带入 README 与截图,本地检查已复跑通过。.github/assets/imgs/admin.webp)是本次改动前采的,未重拍,因此不体现新增的编辑图标与删除确认弹窗;本次 diff 不含生成产物。