mirror of
https://github.com/rustmailer/bichon.git
synced 2026-08-03 07:48:34 +02:00
feat: support export account emails to a single mbox file
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user