Skip to content

Commit

Permalink
chore: group modals + canvas in overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
rossbulat committed Dec 5, 2024
1 parent 15c08b1 commit 416aa6b
Show file tree
Hide file tree
Showing 125 changed files with 60 additions and 54 deletions.
2 changes: 1 addition & 1 deletion packages/app/src/library/GenerateNominations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
faUserEdit,
} from '@fortawesome/free-solid-svg-icons'
import type { AnyFunction, AnyJson } from '@w3ux/types'
import { FavoritesPrompt } from 'canvas/ManageNominations/Prompts/FavoritesPrompt'
import { useActiveAccounts } from 'contexts/ActiveAccounts'
import { useApi } from 'contexts/Api'
import { useImportedAccounts } from 'contexts/Connect/ImportedAccounts'
Expand All @@ -24,6 +23,7 @@ import { SelectableWrapper } from 'library/List'
import { SelectItems } from 'library/SelectItems'
import { SelectItem } from 'library/SelectItems/Item'
import { ValidatorList } from 'library/ValidatorList'
import { FavoritesPrompt } from 'overlay/canvas/ManageNominations/Prompts/FavoritesPrompt'
import { Subheading } from 'pages/Nominate/Wrappers'
import { useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
// SPDX-License-Identifier: GPL-3.0-only

import { faTimes } from '@fortawesome/free-solid-svg-icons'
import { Bond } from 'canvas/CreatePool/Bond'
import { PoolName } from 'canvas/CreatePool/PoolName'
import { PoolRoles } from 'canvas/CreatePool/PoolRoles'
import { Summary } from 'canvas/CreatePool/Summary'
import { CanvasFullScreenWrapper, CanvasTitleWrapper } from 'canvas/Wrappers'
import { useOverlay } from 'kits/Overlay/Provider'
import { CardWrapper } from 'library/Card/Wrappers'
import { Nominate } from 'library/SetupSteps/Nominate'
import { Bond } from 'overlay/canvas/CreatePool/Bond'
import { PoolName } from 'overlay/canvas/CreatePool/PoolName'
import { PoolRoles } from 'overlay/canvas/CreatePool/PoolRoles'
import { Summary } from 'overlay/canvas/CreatePool/Summary'
import {
CanvasFullScreenWrapper,
CanvasTitleWrapper,
} from 'overlay/canvas/Wrappers'
import { useTranslation } from 'react-i18next'
import { Element } from 'react-scroll'
import { ButtonPrimary } from 'ui-buttons'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import {
} from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { Polkicon } from '@w3ux/react-polkicon'
import { CanvasTitleWrapper } from 'canvas/Wrappers'
import { determinePoolDisplay } from 'contexts/Pools/util'
import { useOverlay } from 'kits/Overlay/Provider'
import { CanvasTitleWrapper } from 'overlay/canvas/Wrappers'
import { useTranslation } from 'react-i18next'
import { ButtonPrimary, ButtonPrimaryInvert } from 'ui-buttons'
import { PageTitleTabs } from 'ui-structure'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
import { faTimes } from '@fortawesome/free-solid-svg-icons'
import { capitalizeFirstLetter, rmCommas } from '@w3ux/utils'
import BigNumber from 'bignumber.js'
import { CanvasTitleWrapper } from 'canvas/Wrappers'
import { useApi } from 'contexts/Api'
import { useNetwork } from 'contexts/Network'
import { useBondedPools } from 'contexts/Pools/BondedPools'
import { useOverlay } from 'kits/Overlay/Provider'
import { PoolSyncBar } from 'library/PoolSync/Bar'
import { CanvasTitleWrapper } from 'overlay/canvas/Wrappers'
import { useTranslation } from 'react-i18next'
import type { BondedPool, PoolRewardPointsKey } from 'types'
import { ButtonPrimary } from 'ui-buttons'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Copyright 2024 @polkadot-cloud/polkadot-staking-dashboard authors & contributors
// SPDX-License-Identifier: GPL-3.0-only

import { CanvasFullScreenWrapper } from 'canvas/Wrappers'
import { MaxEraRewardPointsEras } from 'consts'
import { useBondedPools } from 'contexts/Pools/BondedPools'
import { useJoinPools } from 'contexts/Pools/JoinPools'
import { usePoolPerformance } from 'contexts/Pools/PoolPerformance'
import { useStaking } from 'contexts/Staking'
import { useOverlay } from 'kits/Overlay/Provider'
import { CanvasFullScreenWrapper } from 'overlay/canvas/Wrappers'
import { useEffect, useMemo, useState } from 'react'
import { Header } from './Header'
import { Nominations } from './Nominations'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
// SPDX-License-Identifier: GPL-3.0-only

import { faTimes } from '@fortawesome/free-solid-svg-icons'
import { Bond } from 'canvas/NominatorSetup/Bond'
import { Payee } from 'canvas/NominatorSetup/Payee'
import { Summary } from 'canvas/NominatorSetup/Summary'
import { CanvasFullScreenWrapper, CanvasTitleWrapper } from 'canvas/Wrappers'
import { useOverlay } from 'kits/Overlay/Provider'
import { CardWrapper } from 'library/Card/Wrappers'
import { Nominate } from 'library/SetupSteps/Nominate'
import { Bond } from 'overlay/canvas/NominatorSetup/Bond'
import { Payee } from 'overlay/canvas/NominatorSetup/Payee'
import { Summary } from 'overlay/canvas/NominatorSetup/Summary'
import {
CanvasFullScreenWrapper,
CanvasTitleWrapper,
} from 'overlay/canvas/Wrappers'
import { useTranslation } from 'react-i18next'
import { Element } from 'react-scroll'
import { ButtonPrimary } from 'ui-buttons'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { ModalWarnings } from 'kits/Overlay/structure/ModalWarnings'
import { Warning } from 'library/Form/Warning'
import { Title } from 'library/Prompt/Title'
import { SubmitTx } from 'library/SubmitTx'
import { StaticNote } from 'modals/Utils/StaticNote'
import { StaticNote } from 'overlay/modals/Utils/StaticNote'
import { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { planckToUnitBn, timeleftAsString } from 'utils'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// SPDX-License-Identifier: GPL-3.0-only

import { faTimes } from '@fortawesome/free-solid-svg-icons'
import { Members } from 'canvas/PoolMembers/Members'
import { CanvasFullScreenWrapper } from 'canvas/Wrappers'
import { useOverlay } from 'kits/Overlay/Provider'
import { Members } from 'overlay/canvas/PoolMembers/Members'
import { CanvasFullScreenWrapper } from 'overlay/canvas/Wrappers'
import { useTranslation } from 'react-i18next'
import { ButtonPrimary } from 'ui-buttons'

Expand Down
File renamed without changes.
60 changes: 30 additions & 30 deletions packages/app/src/overlay/index.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
// Copyright 2024 @polkadot-cloud/polkadot-staking-dashboard authors & contributors
// SPDX-License-Identifier: GPL-3.0-only

import { CreatePool } from 'canvas/CreatePool'
import { JoinPool } from 'canvas/JoinPool'
import { NominatorSetup } from 'canvas/NominatorSetup'
import { PoolMembers } from 'canvas/PoolMembers'
import { useHelp } from 'contexts/Help'
import { Overlay } from 'kits/Overlay'
import { ErrorFallbackModal } from 'library/ErrorBoundary'
import { ClaimPayouts } from 'modals/ClaimPayouts'
import { ImportWalletConnect } from 'modals/ImportWalletConnect'
import { ManageNominations } from '../canvas/ManageNominations'
import { Accounts } from '../modals/Accounts'
import { Bio } from '../modals/Bio'
import { Bond } from '../modals/Bond'
import { ChangePoolRoles } from '../modals/ChangePoolRoles'
import { ChooseLanguage } from '../modals/ChooseLanguage'
import { ClaimReward } from '../modals/ClaimReward'
import { Connect } from '../modals/Connect'
import { DiscordSupport } from '../modals/DiscordSupport'
import { ImportLedger } from '../modals/ImportLedger'
import { ImportVault } from '../modals/ImportVault'
import { MailSupport } from '../modals/MailSupport'
import { ManageFastUnstake } from '../modals/ManageFastUnstake'
import { ManagePool } from '../modals/ManagePool'
import { Networks } from '../modals/Networks'
import { Settings } from '../modals/Settings'
import { StopNominations } from '../modals/StopNominations'
import { Unbond } from '../modals/Unbond'
import { UnlockChunks } from '../modals/UnlockChunks'
import { Unstake } from '../modals/Unstake'
import { UpdatePayee } from '../modals/UpdatePayee'
import { UpdateReserve } from '../modals/UpdateReserve'
import { ValidatorGeo } from '../modals/ValidatorGeo'
import { ValidatorMetrics } from '../modals/ValidatorMetrics'
import { CreatePool } from './canvas/CreatePool'
import { JoinPool } from './canvas/JoinPool'
import { ManageNominations } from './canvas/ManageNominations'
import { NominatorSetup } from './canvas/NominatorSetup'
import { PoolMembers } from './canvas/PoolMembers'
import { Accounts } from './modals/Accounts'
import { Bio } from './modals/Bio'
import { Bond } from './modals/Bond'
import { ChangePoolRoles } from './modals/ChangePoolRoles'
import { ChooseLanguage } from './modals/ChooseLanguage'
import { ClaimPayouts } from './modals/ClaimPayouts'
import { ClaimReward } from './modals/ClaimReward'
import { Connect } from './modals/Connect'
import { DiscordSupport } from './modals/DiscordSupport'
import { ImportLedger } from './modals/ImportLedger'
import { ImportVault } from './modals/ImportVault'
import { ImportWalletConnect } from './modals/ImportWalletConnect'
import { MailSupport } from './modals/MailSupport'
import { ManageFastUnstake } from './modals/ManageFastUnstake'
import { ManagePool } from './modals/ManagePool'
import { Networks } from './modals/Networks'
import { Settings } from './modals/Settings'
import { StopNominations } from './modals/StopNominations'
import { Unbond } from './modals/Unbond'
import { UnlockChunks } from './modals/UnlockChunks'
import { Unstake } from './modals/Unstake'
import { UpdatePayee } from './modals/UpdatePayee'
import { UpdateReserve } from './modals/UpdateReserve'
import { ValidatorGeo } from './modals/ValidatorGeo'
import { ValidatorMetrics } from './modals/ValidatorMetrics'

export const Overlays = () => {
const { status } = useHelp()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { ModalWarnings } from 'kits/Overlay/structure/ModalWarnings'
import { ActionItem } from 'library/ActionItem'
import { Warning } from 'library/Form/Warning'
import { SubmitTx } from 'library/SubmitTx'
import { StaticNote } from 'modals/Utils/StaticNote'
import { StaticNote } from 'overlay/modals/Utils/StaticNote'
import { useEffect, useState, type Dispatch, type SetStateAction } from 'react'
import { useTranslation } from 'react-i18next'
import { ButtonSubmitInvert } from 'ui-buttons'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useApi } from 'contexts/Api'
import { intervalToDuration } from 'date-fns'
import { MinDelayInput } from 'library/Form/MinDelayInput'
import { StyledSlider } from 'library/StyledSlider'
import { SliderWrapper } from 'modals/ManagePool/Wrappers'
import { SliderWrapper } from 'overlay/modals/ManagePool/Wrappers'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import type { ChangeRateInput } from '../types'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { AccountInput } from 'library/AccountInput'
import { StyledSlider } from 'library/StyledSlider'
import { SliderWrapper } from 'modals/ManagePool/Wrappers'
import { SliderWrapper } from 'overlay/modals/ManagePool/Wrappers'
import { useTranslation } from 'react-i18next'
import { usePoolCommission } from './provider'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-3.0-only

import { StyledSlider } from 'library/StyledSlider'
import { SliderWrapper } from 'modals/ManagePool/Wrappers'
import { SliderWrapper } from 'overlay/modals/ManagePool/Wrappers'
import { useTranslation } from 'react-i18next'
import { usePoolCommission } from './provider'

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { UnbondFeedback } from 'library/Form/Unbond/UnbondFeedback'
import { Warning } from 'library/Form/Warning'
import { Close } from 'library/Modal/Close'
import { SubmitTx } from 'library/SubmitTx'
import { StaticNote } from 'modals/Utils/StaticNote'
import { StaticNote } from 'overlay/modals/Utils/StaticNote'
import { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { planckToUnitBn, timeleftAsString } from 'utils'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { useUnstaking } from 'hooks/useUnstaking'
import { ModalNotes } from 'kits/Overlay/structure/ModalNotes'
import { ModalPadding } from 'kits/Overlay/structure/ModalPadding'
import { StatWrapper, StatsWrapper } from 'library/Modal/Wrappers'
import { StaticNote } from 'modals/Utils/StaticNote'
import { StaticNote } from 'overlay/modals/Utils/StaticNote'
import type { Dispatch, ForwardedRef, SetStateAction } from 'react'
import { forwardRef } from 'react'
import { useTranslation } from 'react-i18next'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { ActionItem } from 'library/ActionItem'
import { Warning } from 'library/Form/Warning'
import { Close } from 'library/Modal/Close'
import { SubmitTx } from 'library/SubmitTx'
import { StaticNote } from 'modals/Utils/StaticNote'
import { StaticNote } from 'overlay/modals/Utils/StaticNote'
import { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { planckToUnitBn, timeleftAsString } from 'utils'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { CardHeaderWrapper } from 'library/Card/Wrappers'
import { Close } from 'library/Modal/Close'
import { Title } from 'library/Modal/Title'
import { StyledSlider } from 'library/StyledSlider'
import { SliderWrapper } from 'modals/ManagePool/Wrappers'
import { SliderWrapper } from 'overlay/modals/ManagePool/Wrappers'
import 'rc-slider/assets/index.css'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
Expand Down

0 comments on commit 416aa6b

Please sign in to comment.