diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 1ec459a3..ca606e3c 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -39,10 +39,10 @@ jobs: - name: build local image run: | - docker-compose build --build-arg EXPLORER_IMAGE=${{ env.explorer_image }}:${{ steps.setBranch.outputs.branch }} --build-arg WALLET_IMAGE=${{ env.wallet_image }}:${{ steps.setBranch.outputs.branch }} + docker compose build --build-arg EXPLORER_IMAGE=${{ env.explorer_image }}:${{ steps.setBranch.outputs.branch }} --build-arg WALLET_IMAGE=${{ env.wallet_image }}:${{ steps.setBranch.outputs.branch }} export EXPLORER_IMAGE=${{ env.explorer_image }}:${{ steps.setBranch.outputs.branch }} export WALLET_IMAGE=${{ env.wallet_image }}:${{ steps.setBranch.outputs.branch }} - docker-compose up -d + docker compose up -d docker cp camino-suite-host-container:/app/camino-suite ./ mkdir -p /home/runner/.cache docker cp camino-suite-host-container:/root/.cache/Cypress /home/runner/.cache/ @@ -102,10 +102,10 @@ jobs: - name: build local image run: | - docker-compose build --build-arg EXPLORER_IMAGE=${{ env.explorer_image }}:${{ steps.setBranch.outputs.branch }} --build-arg WALLET_IMAGE=${{ env.wallet_image }}:${{ steps.setBranch.outputs.branch }} + docker compose build --build-arg EXPLORER_IMAGE=${{ env.explorer_image }}:${{ steps.setBranch.outputs.branch }} --build-arg WALLET_IMAGE=${{ env.wallet_image }}:${{ steps.setBranch.outputs.branch }} export EXPLORER_IMAGE=${{ env.explorer_image }}:${{ steps.setBranch.outputs.branch }} export WALLET_IMAGE=${{ env.wallet_image }}:${{ steps.setBranch.outputs.branch }} - docker-compose up -d + docker compose up -d docker cp camino-suite-host-container:/app/camino-suite ./ mkdir -p /home/runner/.cache docker cp camino-suite-host-container:/root/.cache/Cypress /home/runner/.cache/ diff --git a/nginx.conf b/nginx.conf index cbe6f2a6..b01d3cee 100644 --- a/nginx.conf +++ b/nginx.conf @@ -7,13 +7,13 @@ server { try_files $uri $uri/ /index.html =404; } - location = /wallet/ { + location = /wallet/ { return 301 /login; } location = /explorer/ { - return 301 /explorer/camino/c-chain; + return 301 /explorer/c-chain; } include /etc/nginx/extra-conf.d/*.conf; -} +} \ No newline at end of file diff --git a/src/components/Navbar/Account.tsx b/src/components/Navbar/Account.tsx index 9c3e2bdd..ad640cf7 100644 --- a/src/components/Navbar/Account.tsx +++ b/src/components/Navbar/Account.tsx @@ -1,5 +1,5 @@ -import { mdiCog, mdiLogout } from '@mdi/js' -import { Box, Chip, MenuItem, MenuList, Select, Typography, useTheme } from '@mui/material' +import { mdiCheckDecagram, mdiCog, mdiLogout } from '@mdi/js' +import { Box, MenuItem, MenuList, Select, Typography, useTheme } from '@mui/material' import React, { useEffect, useState } from 'react' import { getNameOfWallet, getPchainAddress } from '../../helpers/walletStore' import { useAppDispatch, useAppSelector } from '../../hooks/reduxHooks' @@ -43,6 +43,7 @@ export default function Account({ handleCloseSidebar }: LoginIconProps) { navigate('/settings') handleCloseSidebar() } + useEffect(() => { dispatch( updatePchainAddress({ address: getPchainAddress(), walletName: getNameOfWallet() }), @@ -56,6 +57,24 @@ export default function Account({ handleCloseSidebar }: LoginIconProps) { <> + { + navigate('/settings/verify-wallet') + handleCloseSidebar() + }} + sx={{ + typography: 'body2', + width: '100%', + maxWidth: '326px', + display: 'flex', + alignItems: 'center', + justifyContent: 'start', + gap: '8px', + }} + > + + Verify Wallet + Settings {auth && } - - - - - - - + { - handleKeyDown(e) + onClick={() => { + navigate('/settings/verify-wallet') + setOpen(v => !v) }} - sx={{ typography: 'body2', width: '100%', maxWidth: '326px' }} - > - - - { handleKeyDown(e) }} sx={{ - typography: 'body1', + typography: 'body2', width: '100%', maxWidth: '326px', - position: 'relative', + display: 'flex', + alignItems: 'center', + justifyContent: 'start', + gap: '8px', }} > - - + + Verify Wallet { diff --git a/src/components/Navbar/LoadMyKeysComponent.tsx b/src/components/Navbar/LoadMyKeysComponent.tsx index 46bd2a31..1225c0a4 100644 --- a/src/components/Navbar/LoadMyKeysComponent.tsx +++ b/src/components/Navbar/LoadMyKeysComponent.tsx @@ -5,7 +5,7 @@ import { mountKyesComponent } from 'wallet/mountKyesComponent' import { useAppDispatch } from '../../hooks/reduxHooks' import { useEffectOnce } from '../../hooks/useEffectOnce' import useWallet from '../../hooks/useWallet' -import { updateNotificationStatus } from '../../redux/slices/app-config' +import { updateAccount, updateNotificationStatus } from '../../redux/slices/app-config' const StyledBox = styled(Box)(({ theme }) => ({ display: 'flex', @@ -43,11 +43,13 @@ const LoadMyKeysComponent = () => { const dispatch = useAppDispatch() const dispatchNotification = ({ message, type }) => dispatch(updateNotificationStatus({ message, severity: type })) + const setAccount = account => dispatch(updateAccount(account)) const { updateStore } = useWallet() useEffectOnce(() => { mountKyesComponent(ref.current, { dispatchNotification, updateStore, + setAccount }) }) // eslint-disable-line react-hooks/exhaustive-deps diff --git a/src/constants/footer-consts.tsx b/src/constants/footer-consts.tsx index 7b24613f..8855c7b7 100644 --- a/src/constants/footer-consts.tsx +++ b/src/constants/footer-consts.tsx @@ -1,12 +1,3 @@ -import { - DISCORD, - GITHUB, - LINKEDIN, - TELEGRAM_ANNOUNCEMENTS, - TELEGRAM_CAMINO, - X, - YOUTUBE, -} from './route-paths' import { DiscordIcon, GithubIcon, @@ -16,6 +7,15 @@ import { XIcon, YoutubeIcon, } from '../assets' +import { + DISCORD, + GITHUB, + LINKEDIN, + TELEGRAM_ANNOUNCEMENTS, + TELEGRAM_CAMINO, + X, + YOUTUBE, +} from './route-paths' import React from 'react' @@ -133,21 +133,30 @@ export const FooterLinks = [ name: 'Camino Network', links: [ { - text: 'Ecosystem', + text: 'The Network', url: 'https://camino.network/ecosystem/', }, { - text: 'Travel', - url: 'https://camino.network/travel/', + text: 'Use Cases', + url: 'https://camino.network/partners/', }, { text: 'Validators', url: 'https://camino.network/validators/', }, { - text: 'Developers', - url: 'https://camino.network/developer/', + text: 'Web3 Travel', + url: 'https://camino.network/travel/', + }, + { + text: 'Camino Messenger', + url: 'https://camino.network/messenger', }, + ], + }, + { + name: 'Discover', + links: [ { text: 'Community', url: 'https://camino.network/community/', @@ -156,6 +165,14 @@ export const FooterLinks = [ text: 'Blog', url: 'https://camino.network/blog/', }, + { + text: 'News', + url: 'https://camino.network/news', + }, + { + text: 'Entities', + url: 'https://camino.network/entities/', + }, ], }, { @@ -187,21 +204,4 @@ export const FooterLinks = [ }, ], }, - { - name: 'Public Sale', - links: [ - { - text: 'Get CAM', - url: 'https://camino.network/public-sale/', - }, - { - text: 'Disclaimer', - url: 'https://camino.network/public-sale-disclaimer/', - }, - { - text: 'Terms & Conditions', - url: 'https://camino.network/static/docs/Terms_and_Conditions_of_Use_Public_Sale_2024.pdf', - }, - ], - }, ] diff --git a/src/constants/route-paths.ts b/src/constants/route-paths.ts index 26aeadec..11eb9339 100644 --- a/src/constants/route-paths.ts +++ b/src/constants/route-paths.ts @@ -39,3 +39,5 @@ export const CCHAIN = BASE_PATH + '/c-chain' export const XCHAIN = BASE_PATH + '/x-chain' export const PCHAIN = BASE_PATH + '/p-chain' + +export const TERMS_OF_USE_URL = 'https://camino.network/terms/' \ No newline at end of file diff --git a/src/layout/RoutesSuite.tsx b/src/layout/RoutesSuite.tsx index ec2cb699..797141ee 100644 --- a/src/layout/RoutesSuite.tsx +++ b/src/layout/RoutesSuite.tsx @@ -13,13 +13,13 @@ import MountAccessComponent from '../views/access/MountAccessComponent' import Create from '../views/create/Create' import ExplorerApp from '../views/explorer/ExplorerApp' import LandingPage from '../views/landing/LandingPage' -import Legal from '../views/legal/Legal' import LoginPage from '../views/login/LoginPage' import Partners from '../views/partners' import CreatedOffers from '../views/partners/CreatedOffers' import Foundation from '../views/partners/Foundation' import Partner from '../views/partners/Partner' import MultisigWallet from '../views/settings/MultisigWallet' +import VerifyWallet from '../views/settings/VerifyWallet' import Settings from '../views/settings/index' import VoteApp from '../views/vote/VoteApp' import Wallet from '../views/wallet/WalletApp' @@ -122,6 +122,7 @@ export default function RoutesSuite() { } /> } /> } /> + } /> }> } /> @@ -134,7 +135,6 @@ export default function RoutesSuite() { } /> } /> - } /> }> } /> } /> diff --git a/src/views/legal/Legal.tsx b/src/views/legal/Legal.tsx deleted file mode 100644 index ecc5a633..00000000 --- a/src/views/legal/Legal.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React, { useEffect, useRef } from 'react' -import { mountLegal } from 'wallet/mountLegal' - -const LoadLegal = () => { - const ref = useRef(null) - useEffect(() => { - mountLegal(ref.current) - }, []) - - return ( -
-
-
- ) -} - -export default function Legal() { - return ( - Loading...
}> - - - ) -} diff --git a/src/views/login/LoginPage.tsx b/src/views/login/LoginPage.tsx index 6dd3baff..e128e789 100644 --- a/src/views/login/LoginPage.tsx +++ b/src/views/login/LoginPage.tsx @@ -7,6 +7,8 @@ import Icon from '@mdi/react' import { Grid } from '@mui/material' import { styled } from '@mui/material/styles' import { mountAccounts } from 'wallet/mountAccounts' +import { TERMS_OF_USE_URL } from '../../constants/route-paths' + const StyledExternalLink = styled('a')(({ theme }) => ({ color: theme.palette.text.primary, @@ -161,7 +163,7 @@ export default function LoginPage() { By using this application, you agree to the  { if (path === '/settings') setValue(0) else if (path === '/settings/manage-multisig') setValue(1) + else if (path === '/settings/verify-wallet') setValue(2) else setValue(0) dispatch(changeActiveApp('Network')) }, [path]) // eslint-disable-line react-hooks/exhaustive-deps @@ -46,6 +47,15 @@ export default function Links() { key={1} sx={{ '&::after': { display: value === 1 ? 'block' : 'none' } }} />, + navigate('verify-wallet')} + {...a11yProps(2)} + key={2} + sx={{ '&::after': { display: value === 2 ? 'block' : 'none' } }} + />, ] const partnersTabs = [ diff --git a/src/views/settings/VerifyWallet.tsx b/src/views/settings/VerifyWallet.tsx new file mode 100644 index 00000000..6e40ed42 --- /dev/null +++ b/src/views/settings/VerifyWallet.tsx @@ -0,0 +1,37 @@ +import React, { useEffect, useRef } from 'react' +// @ts-ignore +import { Box } from '@mui/material' +import { styled } from '@mui/material/styles' +import { mountVerifyWalletSetting } from 'wallet/mountVerifyWalletSetting' + +const StyledBox = styled(Box)(({ theme }) => ({ + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + width: '100%', + height: '100%', + '@media (max-width: 600px)': { + justifyContent: 'flex-start', + }, +})) + +const LoadVerifyWalletSetting = () => { + const ref = useRef(null) + useEffect(() => { + mountVerifyWalletSetting(ref.current) + }, []) // eslint-disable-line react-hooks/exhaustive-deps + + return ( + +
+ + ) +} + +export default function VerifyWalletSetting() { + return ( + Loading...
}> + + + ) +}