diff --git a/packages/insomnia-smoke-test/tests/smoke/pre-request-script-features.test.ts b/packages/insomnia-smoke-test/tests/smoke/pre-request-script-features.test.ts index 6e445ba5b..4f896bc70 100644 --- a/packages/insomnia-smoke-test/tests/smoke/pre-request-script-features.test.ts +++ b/packages/insomnia-smoke-test/tests/smoke/pre-request-script-features.test.ts @@ -355,6 +355,7 @@ test.describe('pre-request features tests', async () => { // update proxy configuration await page.locator('[data-testid="settings-button"]').click(); await page.locator('text=Insomnia Preferences').first().click(); + await page.getByRole('tab', { name: 'Proxy' }).click(); await page.locator('text=Enable proxy').click(); await page.locator('[name="httpProxy"]').fill('localhost:1111'); await page.locator('[name="httpsProxy"]').fill('localhost:2222'); diff --git a/packages/insomnia/src/ui/components/check-for-updates-button.tsx b/packages/insomnia/src/ui/components/check-for-updates-button.tsx index eba5a24c3..680be46d6 100644 --- a/packages/insomnia/src/ui/components/check-for-updates-button.tsx +++ b/packages/insomnia/src/ui/components/check-for-updates-button.tsx @@ -1,11 +1,8 @@ -import React, { FC, ReactNode, useEffect, useState } from 'react'; +import React, { useEffect, useState } from 'react'; -interface Props { - children: ReactNode; - className?: string | null; -} +import { Icon } from './icon'; -export const CheckForUpdatesButton: FC = ({ children, className }) => { +export const CheckForUpdatesButton = () => { const [disabled, setDisabled] = useState(false); const [status, setStatus] = useState(''); @@ -16,9 +13,10 @@ export const CheckForUpdatesButton: FC = ({ children, className }) => { unsubscribe(); }; }); + return ( ); }; diff --git a/packages/insomnia/src/ui/components/modals/settings-modal.tsx b/packages/insomnia/src/ui/components/modals/settings-modal.tsx index 2d0459324..f40400abb 100644 --- a/packages/insomnia/src/ui/components/modals/settings-modal.tsx +++ b/packages/insomnia/src/ui/components/modals/settings-modal.tsx @@ -7,10 +7,13 @@ import { ModalBody } from '../base/modal-body'; import { ModalHeader } from '../base/modal-header'; import { PanelContainer, TabItem, Tabs } from '../base/tabs'; import { AI } from '../settings/ai'; +import { BooleanSetting } from '../settings/boolean-setting'; import { General } from '../settings/general'; import { ImportExport } from '../settings/import-export'; +import { MaskedSetting } from '../settings/masked-setting'; import { Plugins } from '../settings/plugins'; import { Shortcuts } from '../settings/shortcuts'; +import { TextSetting } from '../settings/text-setting'; import { ThemePanel } from '../settings/theme-panel'; import { showModal } from './index'; @@ -27,7 +30,7 @@ export const TAB_INDEX_AI = 'ai'; export const SettingsModal = forwardRef((props, ref) => { const [defaultTabKey, setDefaultTabKey] = useState('general'); - const { userSession } = useRootLoaderData(); + const { userSession, settings } = useRootLoaderData(); const modalRef = useRef(null); useImperativeHandle(ref, () => ({ @@ -52,8 +55,41 @@ export const SettingsModal = forwardRef((props, + + + - +

Network Proxy

+ + + +
+ + + +
@@ -87,4 +123,4 @@ export const SettingsModal = forwardRef((props, ); }); SettingsModal.displayName = 'SettingsModal'; -export const showSettingsModal = () => showModal(SettingsModal); +export const showSettingsModal = (options?: { tab?: string }) => showModal(SettingsModal, options); diff --git a/packages/insomnia/src/ui/components/settings/boolean-setting.tsx b/packages/insomnia/src/ui/components/settings/boolean-setting.tsx index 274b0c4b3..c310b93f9 100644 --- a/packages/insomnia/src/ui/components/settings/boolean-setting.tsx +++ b/packages/insomnia/src/ui/components/settings/boolean-setting.tsx @@ -39,10 +39,8 @@ export const BooleanSetting: FC<{ return ( <> -
-