From 51e30be0518b15dce6b55d7010184de2b16f4507 Mon Sep 17 00:00:00 2001 From: Monalisha Mishra <42746736+mishramonalisha76@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:14:32 +0530 Subject: [PATCH] Fixed create channel ui , fixed message for unlock profile, removed governance from sidebar (#1817) * fixed minor ui issues * fixed minor ui issues * fixed minor ui issues * fixed select text color * fixed select text color * fixed select text color * fixed chain issue --- src/blocks/select/Select.tsx | 2 +- src/common/components/Stepper.tsx | 7 +- src/config/NavigationList.js | 67 ++++++++----------- src/modules/addNewChain/AddNewChain.tsx | 13 ++-- src/modules/createChannel/CreateChannel.tsx | 27 ++++---- .../sendNotification/SendNotification.form.ts | 3 +- .../sendNotification/SendNotification.tsx | 1 + .../SendNotification.utils.tsx | 3 +- 8 files changed, 63 insertions(+), 60 deletions(-) diff --git a/src/blocks/select/Select.tsx b/src/blocks/select/Select.tsx index efec828b97..f45b1de264 100644 --- a/src/blocks/select/Select.tsx +++ b/src/blocks/select/Select.tsx @@ -155,7 +155,7 @@ const StyledOption = styled(ComboboxOption)` align-items: center; padding: var(--spacing-xxxs, 4px); gap: var(--spacing-xxs, 8px); - color: var(--components-dropdown-text-default, #17181b); + color: var(--components-list-item-text-default); font-family: var(--font-family); font-size: ${textVariants['bs-regular'].fontSize}; font-style: ${textVariants['bs-regular'].fontStyle}; diff --git a/src/common/components/Stepper.tsx b/src/common/components/Stepper.tsx index 2462d3beb4..1d8cd7e9b7 100644 --- a/src/common/components/Stepper.tsx +++ b/src/common/components/Stepper.tsx @@ -3,6 +3,7 @@ import { FC } from 'react'; // Components import { Box, Text } from 'blocks'; +import { css } from 'styled-components'; type StepperProps = { steps: Array<{ label: string; value: string }>; @@ -20,6 +21,8 @@ const Stepper: FC = ({ steps, setActiveStepKey, completedSteps }) {steps.map((step, index) => ( = ({ steps, setActiveStepKey, completedSteps }) display="flex" flexDirection="column" gap="spacing-xs" - width="180px" + css={css` + flex: 1; + `} cursor="pointer" onClick={() => handleChangeActiveStep(step.value)} > diff --git a/src/config/NavigationList.js b/src/config/NavigationList.js index 7f78444675..9753135b25 100644 --- a/src/config/NavigationList.js +++ b/src/config/NavigationList.js @@ -88,11 +88,8 @@ const NavigationList = { }, }, }, - - }, Messsaging: { - chat: { src: 'chatOffIcon', activeSrc: 'chatOnIcon', @@ -118,12 +115,8 @@ const NavigationList = { }, }, }, - - - }, Developers: { - createChannel: { uid: GLOBALS.CONSTANTS.NAVBAR_IDENTIFIERS.CREATE_CHANNEL, src: 'createChannelIcon', @@ -176,11 +169,7 @@ const NavigationList = { }, }, }, - - - - - } + }, }, third: { yieldv2: { @@ -257,31 +246,31 @@ const NavigationList = { // } // } // }, - governance: { - uid: GLOBALS.CONSTANTS.NAVBAR_IDENTIFIERS.GOVERNANCE, - src: 'govOffIcon', - activeSrc: 'govOnIcon', - iconFactory: null, - name: 'Governance', - title: 'Governance', - alt: 'Governance', - href: APP_PATHS.Govern, - newTab: false, - isRoute: true, - hasMenuLogic: true, - hidden: false, - headerTag: { - title: 'Governance', - light: { - bg: GLOBALS.COLORS.GRADIENT_SECONDARY, - fg: themeLight.headerTagFg, - }, - dark: { - bg: themeDark.headerTagBg, - fg: themeDark.headerTagFg, - }, - }, - }, + // governance: { + // uid: GLOBALS.CONSTANTS.NAVBAR_IDENTIFIERS.GOVERNANCE, + // src: 'govOffIcon', + // activeSrc: 'govOnIcon', + // iconFactory: null, + // name: 'Governance', + // title: 'Governance', + // alt: 'Governance', + // href: APP_PATHS.Govern, + // newTab: false, + // isRoute: true, + // hasMenuLogic: true, + // hidden: false, + // headerTag: { + // title: 'Governance', + // light: { + // bg: GLOBALS.COLORS.GRADIENT_SECONDARY, + // fg: themeLight.headerTagFg, + // }, + // dark: { + // bg: themeDark.headerTagBg, + // fg: themeDark.headerTagFg, + // }, + // }, + // }, // incentives: { // src: 'incentivesOffIcon', @@ -471,8 +460,8 @@ const NavigationList = { }, }, }, - } -} + }, +}; // // remove secret feature // if ( diff --git a/src/modules/addNewChain/AddNewChain.tsx b/src/modules/addNewChain/AddNewChain.tsx index 9574a7ea1c..1a5748f662 100644 --- a/src/modules/addNewChain/AddNewChain.tsx +++ b/src/modules/addNewChain/AddNewChain.tsx @@ -171,11 +171,13 @@ const AddNewChain: FC = () => { ) : channelDetails || alaisDetails ? ( <> - setActiveStepKey(key as ActiveStepKey)} - /> + + setActiveStepKey(key as ActiveStepKey)} + /> + {activeStepKey === 'newaddress' && ( { type={UNLOCK_PROFILE_TYPE.MODAL} showConnectModal={true} onClose={handleCloseAuthModal} + description="Unlock your profile to proceed." /> )} diff --git a/src/modules/createChannel/CreateChannel.tsx b/src/modules/createChannel/CreateChannel.tsx index 1e8686e367..fa78105459 100644 --- a/src/modules/createChannel/CreateChannel.tsx +++ b/src/modules/createChannel/CreateChannel.tsx @@ -144,7 +144,7 @@ const CreateChannel = () => { 'Creating your channel, Aligning pixels, adjusting padding... This may take some time.', 'Redirecting... Please do not refresh' ); - navigate(`${APP_PATHS.ChannelDashboard}/${account}`) + navigate(`${APP_PATHS.ChannelDashboard}/${account}`); }, 3000); } }, @@ -213,14 +213,16 @@ const CreateChannel = () => { return ( handleCreateNewChannel(values)}> @@ -246,12 +248,13 @@ const CreateChannel = () => { alignItems="center" alignSelf="stretch" > - setActiveStepKey(key as ActiveStepKey)} - /> - + + setActiveStepKey(key as ActiveStepKey)} + /> + {activeStepKey == 'channelInfo' && ( { return yup.object().shape({ @@ -31,7 +32,7 @@ export const getValidationSchema = (isSubsetRecipientPresent: boolean) => { export const getFormInitialValues = (delegateesOptions: SelectOption[]) => { return { channelAddress: delegateesOptions[0]?.value || '', - chainId: '11155111', + chainId: appConfig.coreContractChain.toString(), type: 'BROADCAST' as NotificationType, recipient: '', titleChecked: false, diff --git a/src/modules/sendNotification/SendNotification.tsx b/src/modules/sendNotification/SendNotification.tsx index d6f5ad5639..e40d6e7c21 100644 --- a/src/modules/sendNotification/SendNotification.tsx +++ b/src/modules/sendNotification/SendNotification.tsx @@ -71,6 +71,7 @@ const SendNotification: FC = () => { type={UNLOCK_PROFILE_TYPE.MODAL} showConnectModal={true} onClose={() => setIsAuthModalVisible(false)} + description="Unlock your profile to proceed." /> )} diff --git a/src/modules/sendNotification/SendNotification.utils.tsx b/src/modules/sendNotification/SendNotification.utils.tsx index 5c72fe8331..aff6ae980f 100644 --- a/src/modules/sendNotification/SendNotification.utils.tsx +++ b/src/modules/sendNotification/SendNotification.utils.tsx @@ -1,6 +1,7 @@ import { NotificationType } from '@pushprotocol/restapi'; import { Box } from 'blocks'; +import { appConfig } from 'config'; import { convertAddressToAddrCaip } from 'helpers/CaipHelper'; import { ChannelSetting } from 'helpers/channel/types'; @@ -12,7 +13,7 @@ export const getChannelChainList = (channelDetails: ChannelDetails) => { channelDetails?.aliases ?.filter((alias) => alias.is_alias_verified) ?.map((alias) => parseInt(alias.alias_blockchain_id)) || []; - return [...aliases, 11155111]; + return [...aliases, appConfig.coreContractChain]; }; export const getChannelDelegatesOptions = (delegatees: [ChannelDetails]) => {