diff --git a/src/components/appMenu/CircularMenu/CircularMenu.tsx b/src/components/appMenu/CircularMenu/CircularMenu.tsx index a97f437d0..fea678383 100644 --- a/src/components/appMenu/CircularMenu/CircularMenu.tsx +++ b/src/components/appMenu/CircularMenu/CircularMenu.tsx @@ -1,4 +1,4 @@ -import getMenuItems from 'src/utils/appsMenu'; +import getMenuItems from 'src/utils/appsMenu/appsMenu'; import styles from './CircularMenu.module.scss'; import _ from 'lodash'; import CircularMenuItem from './CircularMenuItem'; diff --git a/src/components/appMenu/MobileMenu/MobileMenu.tsx b/src/components/appMenu/MobileMenu/MobileMenu.tsx index cf120930f..46803fbc6 100644 --- a/src/components/appMenu/MobileMenu/MobileMenu.tsx +++ b/src/components/appMenu/MobileMenu/MobileMenu.tsx @@ -1,6 +1,6 @@ import { useState, useRef } from 'react'; import { NavLink } from 'react-router-dom'; -import getMenuItems from 'src/utils/appsMenu'; +import getMenuItems from 'src/utils/appsMenu/appsMenu'; import styles from './MobileMenu.module.scss'; import cx from 'classnames'; import useOnClickOutside from 'src/hooks/useOnClickOutside'; diff --git a/src/components/appMenu/SubMenu/SubMenu.module.scss b/src/components/appMenu/SubMenu/SubMenu.module.scss index 97d9f9783..f4b3667ca 100644 --- a/src/components/appMenu/SubMenu/SubMenu.module.scss +++ b/src/components/appMenu/SubMenu/SubMenu.module.scss @@ -1,4 +1,4 @@ -$icon-size: 30px; +$icon-size: 25px; .subMenu { // position: absolute; @@ -20,8 +20,8 @@ $icon-size: 30px; .navLinkItem { display: grid; - grid-template-columns: 30px 1fr; - gap: 10px; + grid-template-columns: 25px 1fr; + gap: 7px; align-items: center; padding-left: 20px; font-size: 18px; diff --git a/src/components/appMenu/SubMenu/SubMenu.tsx b/src/components/appMenu/SubMenu/SubMenu.tsx index 2174c831c..c2f2778c9 100644 --- a/src/components/appMenu/SubMenu/SubMenu.tsx +++ b/src/components/appMenu/SubMenu/SubMenu.tsx @@ -1,4 +1,4 @@ -import { NavLink, useLocation } from 'react-router-dom'; +import { NavLink } from 'react-router-dom'; import { MenuItem } from 'src/types/menu'; import cx from 'classnames'; import { useMemo } from 'react'; @@ -17,6 +17,7 @@ function SubMenu({ selectedApp, closeMenu }: Props) { { name: 'main', to: selectedApp.to, + icon: selectedApp.icon, }, ...selectedApp.subItems, ] diff --git a/src/containers/application/Header/CurrentApp/CurrentApp.module.scss b/src/containers/application/Header/CurrentApp/CurrentApp.module.scss index 0d573f9c2..9d4f82206 100644 --- a/src/containers/application/Header/CurrentApp/CurrentApp.module.scss +++ b/src/containers/application/Header/CurrentApp/CurrentApp.module.scss @@ -59,6 +59,7 @@ width: 60px; height: 60px; position: relative; + object-fit: contain; } .btnContainerText { diff --git a/src/containers/application/Header/CurrentApp/ui/AppName/AppName.tsx b/src/containers/application/Header/CurrentApp/ui/AppName/AppName.tsx index b4828b107..9dc26459f 100644 --- a/src/containers/application/Header/CurrentApp/ui/AppName/AppName.tsx +++ b/src/containers/application/Header/CurrentApp/ui/AppName/AppName.tsx @@ -2,7 +2,7 @@ import { useLocation } from 'react-router-dom'; import { CHAIN_ID } from 'src/constants/config'; import { PATTERN_CYBER } from 'src/constants/patterns'; import { routes } from 'src/routes'; -import getMenuItems from 'src/utils/appsMenu'; +import getMenuItems from 'src/utils/appsMenu/appsMenu'; import findApp from 'src/utils/findApp'; import { Helmet } from 'react-helmet'; import styles from './AppName.module.scss'; diff --git a/src/containers/application/Header/CurrentApp/utils/findSelectAppByUrl.ts b/src/containers/application/Header/CurrentApp/utils/findSelectAppByUrl.ts index 0f36cf2ef..d29770e49 100644 --- a/src/containers/application/Header/CurrentApp/utils/findSelectAppByUrl.ts +++ b/src/containers/application/Header/CurrentApp/utils/findSelectAppByUrl.ts @@ -11,14 +11,19 @@ const findSelectAppByUrl = ( ) => { let pathname = url; const isRobot = url.includes('@') || url.includes('neuron/'); + const isOracle = url.includes('oracle'); - const getMenuItemsObj = reduceRobotSubItems(passport, address); + const itemsMenuObj = reduceRobotSubItems(passport, address); if (isRobot) { pathname = routes.robot.path; } - const value = findApp(getMenuItemsObj, pathname); + if (isOracle) { + pathname = routes.oracle.path; + } + + const value = findApp(itemsMenuObj, pathname); return value; }; diff --git a/src/containers/application/Header/CurrentApp/utils/reduceRobotSubItems.ts b/src/containers/application/Header/CurrentApp/utils/reduceRobotSubItems.ts index 5287e2ed2..0c5810e88 100644 --- a/src/containers/application/Header/CurrentApp/utils/reduceRobotSubItems.ts +++ b/src/containers/application/Header/CurrentApp/utils/reduceRobotSubItems.ts @@ -4,7 +4,7 @@ import { Nullable, Option } from 'src/types'; import { Citizenship } from 'src/types/citizenship'; import { MenuItem, MenuItems } from 'src/types/menu'; import { Networks } from 'src/types/networks'; -import getMenuItems from 'src/utils/appsMenu'; +import getMenuItems from 'src/utils/appsMenu/appsMenu'; const reduceRobotSubItems = ( passport: Nullable, diff --git a/src/containers/mint/Mint.module.scss b/src/containers/mint/Mint.module.scss index c5136a96f..81b13cfb5 100644 --- a/src/containers/mint/Mint.module.scss +++ b/src/containers/mint/Mint.module.scss @@ -19,6 +19,5 @@ align-items: center; margin: 64px 8px 0 8px; grid-gap: 16px; - padding-bottom: 150px; position: relative; } diff --git a/src/features/TimeHistory/ui/RouteItem/RouteItem.tsx b/src/features/TimeHistory/ui/RouteItem/RouteItem.tsx index ed72dd67e..2628f9d4b 100644 --- a/src/features/TimeHistory/ui/RouteItem/RouteItem.tsx +++ b/src/features/TimeHistory/ui/RouteItem/RouteItem.tsx @@ -1,4 +1,4 @@ -import getMenuItems from 'src/utils/appsMenu'; +import getMenuItems from 'src/utils/appsMenu/appsMenu'; import DEFAULT_IMG from 'images/large-orange-circle.png'; import { Link } from 'react-router-dom'; import findApp from 'src/utils/findApp'; diff --git a/src/image/.DS_Store b/src/image/.DS_Store index 9a2822546..46b8f790e 100644 Binary files a/src/image/.DS_Store and b/src/image/.DS_Store differ diff --git a/src/pages/Keys/Keys.tsx b/src/pages/Keys/Keys.tsx index d8c366484..3fc2bb69b 100644 --- a/src/pages/Keys/Keys.tsx +++ b/src/pages/Keys/Keys.tsx @@ -1,11 +1,11 @@ import { useDispatch, useSelector } from 'react-redux'; import { RootState } from 'src/redux/store'; -import KeyItem from './KeyItem/KeyItem'; -import { Display, DisplayTitle, MainContainer } from 'src/components'; +import { Display, DisplayTitle } from 'src/components'; import ActionBar from 'src/pages/Keys/ActionBar/actionBar'; import { initPocket } from 'src/redux/features/pocket'; -import styles from './Keys.module.scss'; import { useState } from 'react'; +import styles from './Keys.module.scss'; +import KeyItem from './KeyItem/KeyItem'; import KeyItemSecrets from './KeyItem/KeyItemSecrets'; import { KEY_LIST_TYPE } from './types'; @@ -30,7 +30,7 @@ function Keys() { return ( <> - }> + }>
{bostromAccounts && bostromAccounts.length > 0 ? ( bostromAccounts.map(({ cyber: account }) => { diff --git a/src/pages/Settings/Layout/Layout.module.scss b/src/pages/Settings/Layout/Layout.module.scss index 3c379ad0f..d227a807a 100644 --- a/src/pages/Settings/Layout/Layout.module.scss +++ b/src/pages/Settings/Layout/Layout.module.scss @@ -1,8 +1,10 @@ @import '../../../layouts/variables.module.scss'; +$size-columns: 200px; + .wrapper { display: grid; - grid-template-columns: 200px minmax(200px, 62%); + grid-template-columns: $size-columns minmax($size-columns, calc(62% - $size-columns)); grid-template-rows: 1fr; justify-content: center; diff --git a/src/pages/robot/SensePage.tsx b/src/pages/robot/SensePage.tsx index 1d0319935..0d28a63d1 100644 --- a/src/pages/robot/SensePage.tsx +++ b/src/pages/robot/SensePage.tsx @@ -1,5 +1,4 @@ import SenseRoutingWrapper from 'src/features/sense/ui/SenseRoutingWrapper'; -import { useRobotContext } from './robot.context'; import Taverna from 'src/containers/taverna'; import { useAppSelector } from 'src/redux/hooks'; diff --git a/src/pages/teleport/bridge/actionBar.bridge.tsx b/src/pages/teleport/bridge/actionBar.bridge.tsx index d53d9fa99..f5478a0bf 100644 --- a/src/pages/teleport/bridge/actionBar.bridge.tsx +++ b/src/pages/teleport/bridge/actionBar.bridge.tsx @@ -1,9 +1,4 @@ import { useState, useCallback } from 'react'; -import { - ActionBar as ActionBarContainer, - Pane, - Button, -} from '@cybercongress/gravity'; import { MsgTransfer } from 'cosmjs-types/ibc/applications/transfer/v1/tx'; import Long from 'long'; import BigNumber from 'bignumber.js'; @@ -15,11 +10,8 @@ import { SigningStargateClient, } from '@cosmjs/stargate'; import { DEFAULT_GAS_LIMITS } from 'src/constants/config'; -import { - ActionBarContentText, - LinkWindow, - ActionBar as ActionBarCenter, -} from '../../../components'; +import { getNowUtcNumber } from 'src/utils/date'; +import { LinkWindow, ActionBar as ActionBarCenter } from '../../../components'; import { LEDGER } from '../../../utils/config'; import { fromBech32, @@ -31,7 +23,6 @@ import networks from '../../../utils/networkListIbc'; import { TxsType, TypeTxsT } from '../type'; import ActionBarPingTxs from '../components/actionBarPingTxs'; import { useIbcHistory } from '../../../features/ibc-history/historyContext'; -import { getNowUtcNumber } from 'src/utils/date'; const { STAGE_INIT, STAGE_ERROR, STAGE_SUBMITTED } = LEDGER; @@ -259,15 +250,12 @@ function ActionBar({ stateActionBar }: { stateActionBar: Props }) { if (stage === STAGE_CONFIRMED_IBC) { return ( - - - Transaction Successful: {' '} + + + Transaction Successful:{' '} {trimString(txHashIbc, 6, 6)} - - - + + ); } diff --git a/src/types/menu.ts b/src/types/menu.ts index cbfeef5e2..f33368c0f 100644 --- a/src/types/menu.ts +++ b/src/types/menu.ts @@ -1,4 +1,4 @@ -import getMenuItems from 'src/utils/appsMenu'; +import getMenuItems from 'src/utils/appsMenu/appsMenu'; export type MenuItems = ReturnType; export type MenuItem = MenuItems[0]; diff --git a/src/utils/appsMenu.ts b/src/utils/appsMenu/appsMenu.ts similarity index 63% rename from src/utils/appsMenu.ts rename to src/utils/appsMenu/appsMenu.ts index d2f6dbfa5..7293399ff 100644 --- a/src/utils/appsMenu.ts +++ b/src/utils/appsMenu/appsMenu.ts @@ -1,7 +1,6 @@ import nebulaIcon from 'images/temple/nebula.png'; import teleport from 'images/temple/teleport.png'; import hfr from 'images/temple/hfr.png'; -import temple from 'images/temple/temple.png'; import robot from 'images/temple/robot.png'; import shpere from 'images/temple/shpere.png'; import senate from 'images/temple/senate.png'; @@ -21,10 +20,14 @@ const getMenuItems = () => { icon: robot, to: '/robot', subItems: [ - { name: 'sense', to: 'sense' }, - { name: 'brain', to: 'brain' }, - { name: 'time', to: 'time' }, - { name: 'sigma', to: 'sigma' }, + { name: 'sense', to: 'sense', icon: require('./images/dna.png') }, + { name: 'brain', to: 'brain', icon: require('./images/brain.png') }, + { + name: 'time', + to: 'time', + icon: require('./images/horizontal-traffic-light.png'), + }, + { name: 'sigma', to: 'sigma', icon: require('./images/sigma@2x.png') }, ], // subItems: myRobotLinks, }, @@ -33,15 +36,40 @@ const getMenuItems = () => { to: '/', icon: oracle, subItems: [ - { name: 'Particles', to: '/particles' }, - { name: 'Stats', to: '/oracle/stats' }, - { name: 'Blocks', to: '/network/bostrom/blocks' }, - { name: 'Txs', to: '/network/bostrom/tx' }, - { name: 'Contracts', to: '/contracts' }, - { name: 'Libs', to: '/libs' }, + { + name: 'Particles', + to: '/particles', + icon: require('./images/horizontal-traffic-light.png'), + }, + { + name: 'Stats', + to: '/oracle/stats', + icon: require('./images/avatar@2x.png'), + }, + { + name: 'Blocks', + to: '/network/bostrom/blocks', + icon: require('./images/gold-blocks.png'), + }, + { + name: 'Txs', + to: '/network/bostrom/tx', + icon: require('./images/horizontal-traffic-light.png'), + }, + { + name: 'Contracts', + to: '/contracts', + icon: require('./images/doc@2x.png'), + }, + { name: 'Libs', to: '/libs', icon: require('./images/database.png') }, ], }, - { name: 'Temple', to: routes.temple.path, subItems: [], icon: temple }, + { + name: 'Docs', + to: 'https://docs.cyb.ai', + subItems: [], + icon: require('images/temple/autonomous-semantic-programs.png'), + }, { name: 'Nebula', to: '/nebula', subItems: [], icon: nebulaIcon }, { name: 'Teleport', @@ -49,9 +77,21 @@ const getMenuItems = () => { icon: teleport, active: false, subItems: [ - { name: 'Send', to: routes.teleport.send.path }, - { name: 'Bridge', to: routes.teleport.bridge.path }, - { name: 'Swap', to: routes.teleport.swap.path }, + { + name: 'Send', + to: routes.teleport.send.path, + icon: require('./images/rocket-send@2x.png'), + }, + { + name: 'Bridge', + to: routes.teleport.bridge.path, + icon: require('./images/arrow-swap@2x.png'), + }, + { + name: 'Swap', + to: routes.teleport.swap.path, + icon: require('./images/swap.png'), + }, ], }, { @@ -59,16 +99,34 @@ const getMenuItems = () => { icon: warp, to: '/warp', subItems: [ - { name: 'Add liquidity', to: '/warp/add-liquidity' }, - { name: 'Create pool', to: '/warp/create-pool' }, - { name: 'Sub liquidity', to: '/warp/sub-liquidity' }, + { + name: 'Add liquidity', + to: '/warp/add-liquidity', + icon: require('images/msgs_ic_pooladd.svg'), + }, + { + name: 'Create pool', + to: '/warp/create-pool', + icon: require('images/flask-outline.svg'), + }, + { + name: 'Sub liquidity', + to: '/warp/sub-liquidity', + icon: require('images/msgs_ic_poolremove.svg'), + }, ], }, { name: 'Sphere', icon: shpere, to: routes.sphere.path, - subItems: [{ name: 'Heroes at rest', to: routes.sphereJailed.path }], + subItems: [ + { + name: 'Heroes at rest', + to: routes.sphereJailed.path, + icon: require('./images/astronaut.png'), + }, + ], }, { name: 'HFR', icon: hfr, to: '/hfr', subItems: [] }, // { name: 'Lifeforms', to: '/contracts', subItems: [] }, @@ -86,13 +144,13 @@ const getMenuItems = () => { CHAIN_ID === Networks.BOSTROM ? { name: 'Cyberver 🟣', - icon: require('../containers/application/images/cyberver.png'), + icon: require('./images/cyberver.png'), to: 'https://spacepussy.ai/cyberver', subItems: [], } : { name: 'cyberver', - icon: require('../containers/application/images/cyberver.png'), + icon: require('./images/cyberver.png'), to: '/cyberver', subItems: [ { @@ -184,9 +242,21 @@ const getMenuItems = () => { icon: portal, to: '/portal', subItems: [ - { name: 'Citizenship', to: '/citizenship' }, - { name: 'Gift', to: '/gift' }, - { name: 'Map', to: routes.portal.routes.map.path }, + { + name: 'Citizenship', + to: '/citizenship', + icon: require('./images/identification-card.png'), + }, + { + name: 'Gift', + to: '/gift', + icon: require('./images/wrapped-gift.png'), + }, + { + name: 'Map', + to: routes.portal.routes.map.path, + icon: require('./images/world-map.png'), + }, // { name: 'Release', to: '/release' }, ], }); diff --git a/src/utils/appsMenu/images/arrow-swap@2x.png b/src/utils/appsMenu/images/arrow-swap@2x.png new file mode 100644 index 000000000..6522bb4fd Binary files /dev/null and b/src/utils/appsMenu/images/arrow-swap@2x.png differ diff --git a/src/utils/appsMenu/images/astronaut.png b/src/utils/appsMenu/images/astronaut.png new file mode 100644 index 000000000..115f0e475 Binary files /dev/null and b/src/utils/appsMenu/images/astronaut.png differ diff --git a/src/utils/appsMenu/images/avatar@2x.png b/src/utils/appsMenu/images/avatar@2x.png new file mode 100644 index 000000000..006c5b7ab Binary files /dev/null and b/src/utils/appsMenu/images/avatar@2x.png differ diff --git a/src/utils/appsMenu/images/brain.png b/src/utils/appsMenu/images/brain.png new file mode 100644 index 000000000..9e8682154 Binary files /dev/null and b/src/utils/appsMenu/images/brain.png differ diff --git a/src/utils/appsMenu/images/cyberver.png b/src/utils/appsMenu/images/cyberver.png new file mode 100644 index 000000000..7d1a291cf Binary files /dev/null and b/src/utils/appsMenu/images/cyberver.png differ diff --git a/src/utils/appsMenu/images/database.png b/src/utils/appsMenu/images/database.png new file mode 100644 index 000000000..eae76d730 Binary files /dev/null and b/src/utils/appsMenu/images/database.png differ diff --git a/src/utils/appsMenu/images/dna.png b/src/utils/appsMenu/images/dna.png new file mode 100644 index 000000000..11c11bf74 Binary files /dev/null and b/src/utils/appsMenu/images/dna.png differ diff --git a/src/utils/appsMenu/images/doc@2x.png b/src/utils/appsMenu/images/doc@2x.png new file mode 100644 index 000000000..e4833c7fe Binary files /dev/null and b/src/utils/appsMenu/images/doc@2x.png differ diff --git a/src/utils/appsMenu/images/gold-blocks.png b/src/utils/appsMenu/images/gold-blocks.png new file mode 100644 index 000000000..1ead4ef94 Binary files /dev/null and b/src/utils/appsMenu/images/gold-blocks.png differ diff --git a/src/utils/appsMenu/images/graph-sphere@2x.png b/src/utils/appsMenu/images/graph-sphere@2x.png new file mode 100644 index 000000000..6d5989306 Binary files /dev/null and b/src/utils/appsMenu/images/graph-sphere@2x.png differ diff --git a/src/utils/appsMenu/images/horizontal-traffic-light.png b/src/utils/appsMenu/images/horizontal-traffic-light.png new file mode 100644 index 000000000..c1039a03a Binary files /dev/null and b/src/utils/appsMenu/images/horizontal-traffic-light.png differ diff --git a/src/utils/appsMenu/images/identification-card.png b/src/utils/appsMenu/images/identification-card.png new file mode 100644 index 000000000..de802dc2d Binary files /dev/null and b/src/utils/appsMenu/images/identification-card.png differ diff --git a/src/utils/appsMenu/images/link.png b/src/utils/appsMenu/images/link.png new file mode 100644 index 000000000..5b5b2accb Binary files /dev/null and b/src/utils/appsMenu/images/link.png differ diff --git a/src/utils/appsMenu/images/rocket-send@2x.png b/src/utils/appsMenu/images/rocket-send@2x.png new file mode 100644 index 000000000..447f2ad7c Binary files /dev/null and b/src/utils/appsMenu/images/rocket-send@2x.png differ diff --git a/src/utils/appsMenu/images/sigma@2x.png b/src/utils/appsMenu/images/sigma@2x.png new file mode 100644 index 000000000..4cb1da889 Binary files /dev/null and b/src/utils/appsMenu/images/sigma@2x.png differ diff --git a/src/utils/appsMenu/images/swap.png b/src/utils/appsMenu/images/swap.png new file mode 100644 index 000000000..99da03501 Binary files /dev/null and b/src/utils/appsMenu/images/swap.png differ diff --git a/src/utils/appsMenu/images/tag@2x.png b/src/utils/appsMenu/images/tag@2x.png new file mode 100644 index 000000000..ca1231a82 Binary files /dev/null and b/src/utils/appsMenu/images/tag@2x.png differ diff --git a/src/utils/appsMenu/images/world-map.png b/src/utils/appsMenu/images/world-map.png new file mode 100644 index 000000000..936fde5f9 Binary files /dev/null and b/src/utils/appsMenu/images/world-map.png differ diff --git a/src/utils/appsMenu/images/wrapped-gift.png b/src/utils/appsMenu/images/wrapped-gift.png new file mode 100644 index 000000000..098e3f766 Binary files /dev/null and b/src/utils/appsMenu/images/wrapped-gift.png differ