chore(deps): update electron to ^40.8.5 and reorder devDependencies
feat(home): add task operation dialog and improve UI interactions - Add TaskOperationDialog component to home page and connect via event emitter - Enhance ChatBox "智能问数" button with hover styles and cursor pointer - Improve ChatInputArea button hover states and cursor styling - Fix selector logic in fg_trace.js to handle date column bounds checking - Reorder package.json dependencies for consistency
This commit is contained in:
@@ -104,13 +104,17 @@ const toggleRoomByDateIndex = async (container, { roomType, dateIndex, operation
|
||||
}
|
||||
await roomAnchor.scrollIntoViewIfNeeded();
|
||||
|
||||
const row = roomAnchor.locator(
|
||||
"xpath=ancestor::*[.//div[contains(@class,'boardRow')]][1]",
|
||||
const boardRow = roomAnchor.locator("xpath=ancestor::div[contains(@class,'boardRow')][1]");
|
||||
const dayColumns = boardRow.locator(
|
||||
"xpath=.//div[contains(@class,'switchbar')]/ancestor::div[contains(@class,'flex-col')][1]",
|
||||
);
|
||||
const boardRow = row.locator("xpath=.//div[contains(@class,'boardRow')]").first();
|
||||
|
||||
const boardColPosition = dateIndex + 2;
|
||||
const dayColumn = boardRow.locator(`xpath=./div[${boardColPosition}]`);
|
||||
const dayColumnCount = await dayColumns.count();
|
||||
if (dateIndex >= dayColumnCount) {
|
||||
throw new Error(
|
||||
`Date column out of range for room ${roomType}: index=${dateIndex}, available=${dayColumnCount}`,
|
||||
);
|
||||
}
|
||||
const dayColumn = dayColumns.nth(dateIndex);
|
||||
|
||||
const targetStateClass = operation === 'open' ? 'error' : 'success';
|
||||
const expectedCurrentLabel = operation === 'open' ? '满' : '有';
|
||||
|
||||
Reference in New Issue
Block a user