feat: support export account emails to a single mbox file

This commit is contained in:
rustmailer
2026-04-25 05:39:58 +08:00
parent 0b866c81ff
commit fa70437a62
22 changed files with 610 additions and 69 deletions
+2 -2
View File
@@ -146,8 +146,8 @@ export interface AccountModel {
auto_download_new_mailboxes?: boolean;
}
export const account_state = async (account_id: number) => {
const response = await axiosInstance.get<DownloadState>(`api/v1/account-state/${account_id}`);
export const download_state = async (account_id: number) => {
const response = await axiosInstance.get<DownloadState>(`api/v1/accounts/${account_id}/download-stats`);
return response.data;
};
@@ -26,7 +26,7 @@ import {
} from '@/components/ui/dialog'
import { Button } from '@/components/ui/button'
import { useQuery } from '@tanstack/react-query'
import { account_state, AccountModel, FolderProgress } from '@/api/account/api'
import { download_state, AccountModel, FolderProgress } from '@/api/account/api'
import { format } from 'date-fns'
import { ScrollArea } from '@/components/ui/scroll-area'
import { Badge } from '@/components/ui/badge'
@@ -134,7 +134,7 @@ export function RunningStateDialog({ currentRow, open, onOpenChange }: Props) {
const { data: state, isLoading } = useQuery({
queryKey: ['running-state', currentRow.id],
queryFn: () => account_state(currentRow.id),
queryFn: () => download_state(currentRow.id),
refetchInterval: 5000,
enabled: open && !!currentRow.id,
})