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
+11
View File
@@ -5250,6 +5250,16 @@ async function clearAndBroadcastAccountRunHistory(stateOverride = null) {
return result;
}
async function deleteAndBroadcastAccountRunHistoryRecords(recordIds = [], stateOverride = null) {
if (!accountRunHistoryHelpers?.deleteAccountRunHistoryRecords) {
return { deletedCount: 0, remainingCount: 0 };
}
const result = await accountRunHistoryHelpers.deleteAccountRunHistoryRecords(recordIds, stateOverride);
await broadcastAccountRunHistoryUpdate();
return result;
}
const autoRunController = self.MultiPageBackgroundAutoRunController?.createAutoRunController({
addLog,
appendAccountRunRecord: (...args) => appendAndBroadcastAccountRunRecord(...args),
@@ -5957,6 +5967,7 @@ const messageRouter = self.MultiPageBackgroundMessageRouter?.createMessageRouter
cancelScheduledAutoRun,
checkIcloudSession,
clearAccountRunHistory: (...args) => clearAndBroadcastAccountRunHistory(...args),
deleteAccountRunHistoryRecords: (...args) => deleteAndBroadcastAccountRunHistoryRecords(...args),
clearAutoRunTimerAlarm,
clearLuckmailRuntimeState,
clearStopRequest,