feat(target-lists): 切换至B方案行内编辑布局

- 名单管理页改为左侧分类导航、右侧宽表格,编辑在对应记录行下展开
- 新增条目按钮触发行内表单,筛选或分页时草稿保留在表格顶部
- 登记模块增加beforeunload保护,区分保存中与未保存状态
- 外观模块增加beforeunload保护并修复偏好拉取的竞态问题
- 地图定位面板调整底部内边距和标题间距
- 更新相关测试脚本适配新交互流程
```
This commit is contained in:
2026-10-23 17:42:17 +08:00
parent 461e2c8e7f
commit 18c5178d8f
14 changed files with 196 additions and 27 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ try{
await page.locator('.live-events li[data-alert=true]').filter({hasText:'LIST-WHITE'}).waitFor();
assert.equal(await page.locator('.live-events li[data-alert=true]').filter({hasText:'LIST-WHITE'}).count(),1);
await page.getByRole('button',{name:'管理黑白名单',exact:true}).click();await page.locator('#rt-list-manager').waitFor();assert.equal((await page.locator('#rt-list-manager').innerText()).includes('rows.get'),false);assert.equal(await page.locator('.rt-list-pagination').getByRole('button',{name:'下一页',exact:true}).isDisabled(),true);
await page.locator('#rt-list-entry-id').fill('OFFLINE_002');await page.locator('#rt-list-entry-kind').selectOption('white');await page.locator('#rt-list-entry-note').fill('离线条目');await page.locator('#rt-list-entry-form .primary').click();
await page.getByRole('button',{name:'新增条目',exact:true}).click();await page.locator('#rt-list-entry-id').fill('OFFLINE_002');await page.locator('#rt-list-entry-kind').selectOption('white');await page.locator('#rt-list-entry-note').fill('离线条目');await page.locator('#rt-list-entry-form .primary').click();
await page.locator('.rt-list-manager-footer').filter({hasText:'已将 OFFLINE_002 保存为白名单'}).waitFor();assert.equal(await page.evaluate(()=>window.ridMap.metrics().targets),3);
assert.equal((await(await fetch(base+'/api/records?page=1')).json()).total,0);
const offline=page.locator('.rt-list-row[data-target-id=OFFLINE_002]');await offline.getByRole('button',{name:'编辑',exact:true}).click();assert.equal(await page.locator('#rt-list-entry-id').isEditable(),false);