feat(sidepanel): implement multi-select and delete functionality for account records

- Added a new feature to allow users to select multiple account records and delete them.
- Introduced a filter system to categorize account records based on their status (success, failed, stopped, retry).
- Enhanced the UI with a toolbar for selection and deletion actions, including a confirmation modal for deletions.
- Updated the CSS for better styling of the new toolbar and selection states.
- Implemented backend support for deleting selected records and syncing the remaining records.
- Added unit tests to ensure the new functionality works as expected.
This commit is contained in:
QLHazyCoder
2026-04-19 01:12:17 +08:00
parent 49707ffa74
commit 774ead30f7
9 changed files with 916 additions and 112 deletions
+14
View File
@@ -13,6 +13,7 @@
cancelScheduledAutoRun,
checkIcloudSession,
clearAccountRunHistory,
deleteAccountRunHistoryRecords,
clearAutoRunTimerAlarm,
clearLuckmailRuntimeState,
clearStopRequest,
@@ -300,6 +301,19 @@
return { ok: true, ...result };
}
case 'DELETE_ACCOUNT_RUN_HISTORY_RECORDS': {
const state = await getState();
if (isAutoRunLockedState(state)) {
throw new Error('自动流程运行中,当前不能删除邮箱记录。');
}
if (typeof deleteAccountRunHistoryRecords !== 'function') {
return { ok: true, deletedCount: 0, remainingCount: 0 };
}
const recordIds = Array.isArray(message.payload?.recordIds) ? message.payload.recordIds : [];
const result = await deleteAccountRunHistoryRecords(recordIds, state);
return { ok: true, ...result };
}
case 'EXECUTE_STEP': {
clearStopRequest();
if (message.source === 'sidepanel') {