Skip to content

Commit

Permalink
Revert "marked polling-interval option to off and disabled other poll…
Browse files Browse the repository at this point in the history
…ing options if readonly mode is enabled (#790)"

This reverts commit 61a5ac9.
  • Loading branch information
felixmosh committed Aug 4, 2024
1 parent e2b2ee9 commit 080636b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/ui/src/components/SettingsModal/SettingsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ 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;

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 {
Expand All @@ -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 (
<Modal width="small" open={open} onClose={onClose} title={t('SETTINGS.TITLE')}>
Expand Down

0 comments on commit 080636b

Please sign in to comment.