From 080636bfcd111dba108c9957ae5f6280df2e47c6 Mon Sep 17 00:00:00 2001 From: Felix Mosheev <9304194+felixmosh@users.noreply.github.com> Date: Sun, 4 Aug 2024 10:30:36 +0300 Subject: [PATCH] Revert "marked polling-interval option to off and disabled other polling options if readonly mode is enabled (#790)" This reverts commit 61a5ac9423c0327e183d2daa259e3a0889c88755. --- packages/ui/src/components/SettingsModal/SettingsModal.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/ui/src/components/SettingsModal/SettingsModal.tsx b/packages/ui/src/components/SettingsModal/SettingsModal.tsx index 08aba4be..2bd1a742 100644 --- a/packages/ui/src/components/SettingsModal/SettingsModal.tsx +++ b/packages/ui/src/components/SettingsModal/SettingsModal.tsx @@ -6,7 +6,6 @@ import { SelectField } from '../Form/SelectField/SelectField'; import { SwitchField } from '../Form/SwitchField/SwitchField'; import { Modal } from '../Modal/Modal'; import { availableJobTabs } from '../../hooks/useDetailsTabs'; -import { useActiveQueue } from '../../hooks/useActiveQueue'; export interface SettingsModalProps { open: boolean; @@ -14,7 +13,7 @@ export interface SettingsModalProps { onClose(): void; } -const allPollingIntervals = [-1, 3, 5, 10, 20, 60, 60 * 5, 60 * 15]; +const pollingIntervals = [-1, 3, 5, 10, 20, 60, 60 * 5, 60 * 15]; export const SettingsModal = ({ open, onClose }: SettingsModalProps) => { const { @@ -32,10 +31,6 @@ export const SettingsModal = ({ open, onClose }: SettingsModalProps) => { } = useSettingsStore((state) => state); const { t, i18n } = useTranslation(); const languages = ['en-US', 'fr-FR', 'pt-BR', 'zh-CN']; - const queue = useActiveQueue(); - const pollingIntervals = queue?.readOnlyMode - ? allPollingIntervals.slice(0, 1) - : allPollingIntervals; return (