feat: add deleteAllSessions functionality and update batch delete logic

- Introduced a new API function `deleteAllSessions` to allow deletion of all sessions for a tenant.
- Updated the `BatchManageDialog` component to support a confirmation dialog for deleting all sessions.
- Enhanced the menu component to reflect the new delete all functionality with appropriate confirmation messages.
- Added internationalization support for the new delete all confirmation message in multiple languages.

These changes improve session management by providing users with the ability to delete all sessions at once, enhancing the overall user experience.
This commit is contained in:
wizardchen
2026-03-02 20:58:09 +08:00
committed by lyingbug
parent 5ba42633ba
commit 284d6c623e
11 changed files with 113 additions and 447 deletions
+4
View File
@@ -48,6 +48,10 @@ export async function batchDelSessions(ids: string[]) {
return del(`/api/v1/sessions/batch`, { ids });
}
export async function deleteAllSessions() {
return del(`/api/v1/sessions/batch`, { delete_all: true });
}
export async function getSession(session_id: string) {
return get(`/api/v1/sessions/${session_id}`);
}