diff --git a/web/src/features/accounts/components/oauth2-tokens.tsx b/web/src/features/accounts/components/oauth2-tokens.tsx index bb7fd37..4059394 100644 --- a/web/src/features/accounts/components/oauth2-tokens.tsx +++ b/web/src/features/accounts/components/oauth2-tokens.tsx @@ -40,6 +40,9 @@ export function OAuth2TokensDialog({ currentRow, open, onOpenChange }: Props) { const { data: oauth2Tokens, isLoading } = useQuery({ queryKey: ['oauth2-tokens', currentRow.id], queryFn: () => get_oauth2_tokens(currentRow.id), + retry: 0, + refetchOnWindowFocus: false, + refetchOnMount: false, }) diff --git a/web/src/features/accounts/components/running-state-dialog.tsx b/web/src/features/accounts/components/running-state-dialog.tsx index 2d3ee06..a4743a2 100644 --- a/web/src/features/accounts/components/running-state-dialog.tsx +++ b/web/src/features/accounts/components/running-state-dialog.tsx @@ -32,7 +32,9 @@ export function RunningStateDialog({ currentRow, open, onOpenChange }: Props) { const { data: state, isLoading } = useQuery({ queryKey: ['running-state', currentRow.id], queryFn: () => account_state(currentRow.id), - refetchInterval: 5000, // 每5秒自动刷新数据 + retry: 0, + refetchOnWindowFocus: false, + refetchInterval: 5000, }) // Helper function to calculate duration @@ -302,6 +304,13 @@ export function RunningStateDialog({ currentRow, open, onOpenChange }: Props) { )} + {!isLoading && !state && ( +
+

No active state available

+

Account synchronization may not have started yet

+
+ )} +