diff --git a/packages/app-settings/src/General.tsx b/packages/app-settings/src/General.tsx index 449600286f..8b7987040e 100644 --- a/packages/app-settings/src/General.tsx +++ b/packages/app-settings/src/General.tsx @@ -2,22 +2,22 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { AppProps, I18nProps } from '@polkadot/react-components/types'; +import { I18nProps } from '@polkadot/react-components/types'; import { Option } from './types'; import queryString from 'query-string'; import React, { useEffect, useState } from 'react'; import { isLedgerCapable } from '@polkadot/react-api'; import { Button, Dropdown } from '@polkadot/react-components'; -import { ActionStatus } from '@polkadot/react-components/Status/types'; import uiSettings from '@polkadot/ui-settings'; import translate from './translate'; import { createIdenticon, createOption, save, saveAndReload } from './util'; import SelectUrl from './SelectUrl'; -interface Props extends AppProps, I18nProps { - onStatusChange: (status: ActionStatus) => void; +interface Props extends I18nProps{ + isModalContent?: boolean; + onClose?: () => void; } // check for a ledger=... string, acivate @@ -28,7 +28,7 @@ const prefixOptions = uiSettings.availablePrefixes.map((o): Option => createOpti const iconOptions = uiSettings.availableIcons.map((o): Option => createIdenticon(o, ['default'])); const ledgerConnOptions = uiSettings.availableLedgerConn; -function General ({ className, t }: Props): React.ReactElement { +function General ({ className, isModalContent, onClose, t }: Props): React.ReactElement { // tri-state: null = nothing changed, false = no reload, true = reload required const [changed, setChanged] = useState(null); const [settings, setSettings] = useState(uiSettings.get()); @@ -61,53 +61,68 @@ function General ({ className, t }: Props): React.ReactElement { return (
-
- -
-
- -
-
- -
- {WITH_LEDGER && isLedgerCapable() && ( -
- -
+ {!isModalContent && ( + <> +
+ +
+
+ +
+
+ +
+ {WITH_LEDGER && isLedgerCapable() && ( +
+ +
+ )} +
+ +
+ )} -
- -
+ {isModalContent && ( + <> +