diff --git a/.env.development b/.env.development index 203f334..7de0eab 100644 --- a/.env.development +++ b/.env.development @@ -19,7 +19,8 @@ REACT_APP_SNAPSHOT_VOTING_API = "https://xtjyd0liqe.execute-api.ap-northeast-1.a +# REACT_APP_REQUEST_URL = 'http://192.253.237.94:9090' REACT_APP_REQUEST_URL = 'http://101.35.117.69:9090' # REACT_APP_REQUEST_URL = 'http://192.168.2.147:8080' -# REACT_APP_REQUEST_URL = 'http://192.168.2.28:8080' +# REACT_APP_REQUEST_URL = 'http://192.168.2.:8080' # REACT_APP_REQUEST_URL = 'http://6o7g1fv83e.51xd.pub' diff --git a/.env.production b/.env.production index ba50e11..b9fa4d6 100644 --- a/.env.production +++ b/.env.production @@ -20,4 +20,5 @@ REACT_APP_SNAPSHOT_VOTING_API = "https://xtjyd0liqe.execute-api.ap-northeast-1.a REACT_APP_REQUEST_URL = 'http://101.35.117.69:9090' +# REACT_APP_REQUEST_URL = 'http://192.253.237.94:9090' # REACT_APP_REQUEST_URL = 'http://192.168.2.210:8080' diff --git a/package.json b/package.json index ee9dcea..2fff3ac 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,11 @@ }, "dependencies": { "@binance-chain/bsc-connector": "^1.0.0", + "@emotion/react": "^11.9.0", + "@emotion/styled": "^11.8.1", "@ethersproject/experimental": "^5.0.1", + "@mui/material": "^5.8.3", + "@mui/styled-engine-sc": "^5.8.0", "@pancakeswap/sdk": "^2.3.2", "@pancakeswap/uikit": "^0.40.2", "@reduxjs/toolkit": "^1.5.0", @@ -51,7 +55,6 @@ "@web3-react/core": "^6.1.9", "@web3-react/injected-connector": "^6.0.7", "@web3-react/walletconnect-connector": "6.2.4", - "ethereumjs-abi": "0.6.8", "ajv": "^6.12.3", "bignumber.js": "^9.0.0", "canvas-confetti": "^1.3.3", @@ -59,6 +62,7 @@ "date-fns": "^2.21.3", "dayjs": "^1.11.1", "easymde": "^2.15.0", + "ethereumjs-abi": "0.6.8", "ethers": "^5.1.4", "graphql": "^15.5.0", "graphql-request": "^3.4.0", @@ -82,7 +86,7 @@ "react-window": "^1.8.6", "remark-gfm": "^1.0.0", "split-grid": "^1.0.11", - "styled-components": "^5.3.0", + "styled-components": "^5.3.5", "swiper": "^6.6.1", "typescript": "^4.3.2" }, diff --git a/public/images/loading.gif b/public/images/loading.gif new file mode 100644 index 0000000..69a6686 Binary files /dev/null and b/public/images/loading.gif differ diff --git a/public/images/nft/add.svg b/public/images/nft/add.svg new file mode 100644 index 0000000..4e86671 --- /dev/null +++ b/public/images/nft/add.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/public/images/nft/bg.svg b/public/images/nft/bg.svg new file mode 100644 index 0000000..280b30e --- /dev/null +++ b/public/images/nft/bg.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/public/images/nft/bottom-arrows.svg b/public/images/nft/bottom-arrows.svg new file mode 100644 index 0000000..d5e5f79 --- /dev/null +++ b/public/images/nft/bottom-arrows.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/public/images/nft/box.svg b/public/images/nft/box.svg new file mode 100644 index 0000000..a973694 --- /dev/null +++ b/public/images/nft/box.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/public/images/nft/close.svg b/public/images/nft/close.svg new file mode 100644 index 0000000..d7bdf5a --- /dev/null +++ b/public/images/nft/close.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/public/images/nft/common.svg b/public/images/nft/common.svg new file mode 100644 index 0000000..ca991d7 --- /dev/null +++ b/public/images/nft/common.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/public/images/nft/epic-icon.svg b/public/images/nft/epic-icon.svg new file mode 100644 index 0000000..f4fd1e4 --- /dev/null +++ b/public/images/nft/epic-icon.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/public/images/nft/epic.svg b/public/images/nft/epic.svg new file mode 100644 index 0000000..f270229 --- /dev/null +++ b/public/images/nft/epic.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/public/images/nft/hammer.svg b/public/images/nft/hammer.svg new file mode 100644 index 0000000..aed6403 --- /dev/null +++ b/public/images/nft/hammer.svg @@ -0,0 +1,11 @@ + + + + + + diff --git a/public/images/nft/legend-icon.svg b/public/images/nft/legend-icon.svg new file mode 100644 index 0000000..3bf726c --- /dev/null +++ b/public/images/nft/legend-icon.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/public/images/nft/legend.svg b/public/images/nft/legend.svg new file mode 100644 index 0000000..fe923e6 --- /dev/null +++ b/public/images/nft/legend.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/public/images/nft/reduce.svg b/public/images/nft/reduce.svg new file mode 100644 index 0000000..2ac475d --- /dev/null +++ b/public/images/nft/reduce.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/public/images/nft/share.svg b/public/images/nft/share.svg new file mode 100644 index 0000000..313683c --- /dev/null +++ b/public/images/nft/share.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/public/images/nft/uncommon-icon.svg b/public/images/nft/uncommon-icon.svg new file mode 100644 index 0000000..b44f3b6 --- /dev/null +++ b/public/images/nft/uncommon-icon.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/public/images/nft/uncommon.svg b/public/images/nft/uncommon.svg new file mode 100644 index 0000000..e425570 --- /dev/null +++ b/public/images/nft/uncommon.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/public/images/page/bazaar.jpg b/public/images/page/bazaar.jpg new file mode 100644 index 0000000..5327d42 Binary files /dev/null and b/public/images/page/bazaar.jpg differ diff --git a/public/images/page/compound.jpg b/public/images/page/compound.jpg new file mode 100644 index 0000000..dafa5cf Binary files /dev/null and b/public/images/page/compound.jpg differ diff --git a/public/images/page/nftBox.jpg b/public/images/page/nftBox.jpg new file mode 100644 index 0000000..cac9d23 Binary files /dev/null and b/public/images/page/nftBox.jpg differ diff --git a/public/index.html b/public/index.html index 308e168..5e7953a 100644 --- a/public/index.html +++ b/public/index.html @@ -8,11 +8,11 @@ - + - HighCity Swap + HiCity Swap import('./views/PoolFinder')) const RemoveLiquidity = lazy(() => import('./views/RemoveLiquidity')) const Referral = lazy(() => import('./views/Referral')) const Board = lazy(() => import('./views/Board')) -const Nft = lazy(() => import('./views/Nft')) +const BlindBox = lazy(() => import('./views/BlindBox')) const Announcement = lazy(() => import('./views/Announcement')) const Ido = lazy(() => import('./views/Ido')) +const NftBox = lazy(() => import('./views/NftBox')) +const Compound = lazy(() => import('./views/Compound')) +const Bazaar = lazy(() => import('./views/Bazaar')) // This config is required for number formatting BigNumber.config({ @@ -114,12 +117,21 @@ const App: React.FC = () => { - - + + + + + + + + + + + {/* diff --git a/src/components/Loader/PageLoader.tsx b/src/components/Loader/PageLoader.tsx index 086dbb0..71adaff 100644 --- a/src/components/Loader/PageLoader.tsx +++ b/src/components/Loader/PageLoader.tsx @@ -1,6 +1,6 @@ import React from 'react' import styled from 'styled-components' -import { Spinner } from '@pancakeswap/uikit' +import { Spinner, Image } from '@pancakeswap/uikit' import Page from '../Layout/Page' const Wrapper = styled(Page)` @@ -12,7 +12,8 @@ const Wrapper = styled(Page)` const PageLoader: React.FC = () => { return ( - + + {/* */} ) } diff --git a/src/components/Menu/config.ts b/src/components/Menu/config.ts index de4f67d..46813b4 100644 --- a/src/components/Menu/config.ts +++ b/src/components/Menu/config.ts @@ -7,6 +7,40 @@ const config: (t: ContextApi['t']) => MenuEntry[] = (t) => [ icon: 'HomeIcon', href: '/', }, + { + label: t('IDO Exchange'), + icon: 'Ido', + href: '/Ido', + }, + { + label: t('nft box'), + icon: 'NFTBox', + href: '/nftBox', + }, + { + label: t('nft compound'), + icon: 'Compound', + href: '/compound', + }, + { + label: t('nft bazaar'), + icon: 'Bazaar', + href: '/bazaar', + }, + // { + // label: t('NFT'), + // icon: 'GroupsIcon', + // items: [ + // { + // label: t('nft box'), + // href: '/nftBox', + // }, + // { + // label: t('compound'), + // href: '/compound', + // }, + // ], + // }, // { // label: t('Trade'), // icon: 'TradeIcon', @@ -25,21 +59,16 @@ const config: (t: ContextApi['t']) => MenuEntry[] = (t) => [ // // }, // ], // }, - { - label: t('IDO Exchange'), - icon: 'FarmIcon', - href: '/Ido', - }, - { - label: t('Exchange'), - icon: 'FarmIcon', - href: 'https://pancake.kiemtienonline360.com/#/swap', - }, - { - label: t('Liquidity'), - icon: 'FarmIcon', - href: 'https://pancake.kiemtienonline360.com/#/pool', - }, + // { + // label: t('Exchange'), + // icon: 'FarmIcon', + // href: 'https://pancake.kiemtienonline360.com/#/swap', + // }, + // { + // label: t('Liquidity'), + // icon: 'FarmIcon', + // href: 'https://pancake.kiemtienonline360.com/#/pool', + // }, // { // label: t('Farms'), // icon: 'FarmIcon', @@ -52,22 +81,22 @@ const config: (t: ContextApi['t']) => MenuEntry[] = (t) => [ // }, { label: t('recommend'), - icon: 'PoolIcon', + icon: 'Recommend', href: '/referral', }, - // { - // label: 'NFT', - // icon: 'TicketIcon', - // href: '/nft', - // }, + { + label: t('Blind box'), + icon: 'BlindBox', + href: '/blindBox', + }, { label: t('capital pool'), - icon: 'TicketIcon', + icon: 'Board', href: '/board', }, { label: t('announcement'), - icon: 'TicketIcon', + icon: 'Announcement', href: '/announcement', }, // { diff --git a/src/components/Menu/index.tsx b/src/components/Menu/index.tsx index 3d6d002..660f2aa 100644 --- a/src/components/Menu/index.tsx +++ b/src/components/Menu/index.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState, useMemo } from 'react' import { Menu as UikitMenu, ConnectorNames } from '@pancakeswap/uikit' import { useDispatch } from 'react-redux' -import { uccnDetail, indexInfo } from 'services/user' +import { uccnDetail, indexInfo, getProjectDoc } from 'services/user' import { useWeb3React } from '@web3-react/core' import { languageList } from 'config/localization/languages' import { useTranslation } from 'contexts/Localization' @@ -17,6 +17,7 @@ const Menu = (props) => { const account = useAccount() const { login, logout } = useAuth() const [hasWalletLogin, setHasWalletLogin] = useState(false) + const [documentAddress, setDocumentAddress] = useState('') const { isDark, toggleTheme } = useTheme() const hccPriceUsdt = usePriceHccUsdt() const { library } = useWeb3Provider() @@ -50,6 +51,11 @@ const Menu = (props) => { }) setSocialLink(list) } + const getDoc = async () => { + const result = await getProjectDoc() + const { data } = result.data + setDocumentAddress(data) + } // 钱包登录后 useEffect(() => { if (unActiveAccount && library.provider && hasWalletLogin) { @@ -59,6 +65,7 @@ const Menu = (props) => { }, [unActiveAccount, hasWalletLogin, library]) useEffect(() => { getDetails() + getDoc() }, []) return ( { cakePriceUsd={hccPriceUsdt} links={config(t)} socialLink={socialLink} + documentAddress={documentAddress} {...props} /> ) diff --git a/src/components/Modal/ModalInput.tsx b/src/components/Modal/ModalInput.tsx index c2ed52d..353e608 100644 --- a/src/components/Modal/ModalInput.tsx +++ b/src/components/Modal/ModalInput.tsx @@ -107,10 +107,11 @@ const ModalInput: React.FC = ({ {isBalanceZero && ( - {t('No tokens to stake')}:{' '} + {t('No tokens to stake')} + {/* :{' '} {t('Get %symbol%', { symbol })} - + */} )} diff --git a/src/components/Modal/UnOpenModel.tsx b/src/components/Modal/UnOpenModel.tsx new file mode 100644 index 0000000..48e70e7 --- /dev/null +++ b/src/components/Modal/UnOpenModel.tsx @@ -0,0 +1,76 @@ +import React, { useState, useEffect } from 'react' +import styled from 'styled-components' +import { useAccount } from 'state/userInfo/hooks' +import useRefresh from 'hooks/useRefresh' +import { Text, Flex, Button, Link } from '@pancakeswap/uikit' +import { useTranslation } from 'contexts/Localization' + +const ModelFlex = styled(Flex)` + position: fixed; + width: 100%; + height: calc(100vh - 64px); + top: 0; + align-items: center; + justify-content: center; + z-index: 998; +` +const Model = styled.div` + position: fixed; + width: 100%; + height: calc(100vh - 64px); + top: 0; + background: rgba(31, 11, 117, 0.39); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(5px); + align-items: center; + justify-content: center; + filter: blur(8px); + z-index: 99; +` +const ModelDiv = styled(Flex)` + width: 488px; + height: 204px; + background: #f3f2f9; + opacity: 1; + border-radius: 15px; + padding: 30px 0; + flex-direction: column; + justify-content: space-between; + align-items: center; +` +const HeaderText = styled(Text)` + font-size: 32px; + color: #333333; +` + +const TipText = styled(Text)` + font-size: 18px; + color: #999999; +` +const BtnText = styled(Link)` + height: 40px; + background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); + opacity: 1; + border-radius: 30px; + font-size: 14px; + color: #fff; + padding: 0 20px; +` + +const UnOpenModel: React.FC = () => { + const { t } = useTranslation() + + return ( + <> + + + + {t('Coming Soon')} + {t('This page is not currently open')} + {t('Viewing the Path Diagram')} + + + + ) +} +export default UnOpenModel diff --git a/src/components/Modal/index.ts b/src/components/Modal/index.ts index 975e488..f8e3300 100644 --- a/src/components/Modal/index.ts +++ b/src/components/Modal/index.ts @@ -1,2 +1,3 @@ export { default as ModalActions } from './ModalActions' export { default as ModalInput } from './ModalInput' +export { default as UnOpenModel } from './UnOpenModel' diff --git a/src/config/constants/contracts.ts b/src/config/constants/contracts.ts index 5db9f27..081051f 100644 --- a/src/config/constants/contracts.ts +++ b/src/config/constants/contracts.ts @@ -8,32 +8,32 @@ export default { 56: '0x6ab8463a4185b80905e05a9ff80a2d6b714b9e95', }, boardChef: { - 97: '0x4ECC687D67138694729433e77cD95eEE9a858E40', - 56: '0xD34871F12ace1BB8034E18009104b9dA60B84250', // NEED CHANGE 节点董事会合约 + 97: '0x82ab2659c3de15f48cd67f12668dca514b44070f', + 56: '0x82ab2659c3de15f48cd67f12668dca514b44070f', // NEED CHANGE 节点董事会合约 }, boardRewardChef: { - 97: '0xbCb980b6A4CD67d81B63B0bFA734B4116B218700', - 56: '0xD34871F12ace1BB8034E18009104b9dA60B84250', // NEED CHANGE 节点董事会分红合约 + 97: '0x44a7b703a90b87e54abff5ae0861e917c828d062', + 56: '0x44a7b703a90b87e54abff5ae0861e917c828d062', // NEED CHANGE 节点董事会分红合约 }, holderChef: { - 97: '0x8faafb4ba8945917e7fe024dbbad0a5fb1da2181', - 56: '0xD34871F12ace1BB8034E18009104b9dA60B84250', // NEED CHANGE 持币人 + 97: '0xe3031f378f201dca46361a34e3fd12e50bdd202f', + 56: '0xe3031f378f201dca46361a34e3fd12e50bdd202f', // NEED CHANGE 持币人 }, holderRewardChef: { - 97: '0x61FB526924c6BAC9A08E146Da103B19c0DFA1899', - 56: '0x46271393dd6f2c8798a44f857888aa6a85af3527', // NEED CHANGE 持币人分红 + 97: '0x9ee1c805a9508c0799b157ebbe3108d57c8d8588', + 56: '0x9ee1c805a9508c0799b157ebbe3108d57c8d8588', // NEED CHANGE 持币人分红 }, referralChef: { - 97: '0xe94282DA5166AD3FEB82F7aE299b2D5DFDF392Ae', - 56: '0xf42D1e1883C2FAA058dfa0D301556EB2d964859a', // NEED CHANGE 邀请或则军团长 + 97: '0x0866962d208e91ea8804db3f547cccf22fe39ea7', + 56: '0x0866962d208e91ea8804db3f547cccf22fe39ea7', // NEED CHANGE 邀请或则军团长 }, referralRewardChef: { - 97: '0xf42D1e1883C2FAA058dfa0D301556EB2d964859a', - 56: '0xf42D1e1883C2FAA058dfa0D301556EB2d964859a', // NEED CHANGE 邀请或则军团长收益 + 97: '0x0fb12ffe4b38730b80c26f44fa540eabfd03a30e', + 56: '0x0fb12ffe4b38730b80c26f44fa540eabfd03a30e', // NEED CHANGE 邀请或则军团长收益 }, idoPurchase: { - 97: '0xCCFD5B33774a1568A322FCa262D3378Ff8CcdeCB', - 56: '0xCCFD5B33774a1568A322FCa262D3378Ff8CcdeCB', // NEED CHANGE IDO兑换 + 97: '0x2f562A9fE0325501A6Aa92cd9e2081B026fC35aa', + 56: '0x2f562A9fE0325501A6Aa92cd9e2081B026fC35aa', // NEED CHANGE IDO兑换 }, lotteryV2: { 97: '0x5790c3534F30437641541a0FA04C992799602998', diff --git a/src/config/constants/meta.ts b/src/config/constants/meta.ts index 41f3def..13fb305 100644 --- a/src/config/constants/meta.ts +++ b/src/config/constants/meta.ts @@ -2,7 +2,7 @@ import { ContextApi } from 'contexts/Localization/types' import { PageMeta } from './types' export const DEFAULT_META: PageMeta = { - title: 'HighCitySwap', + title: 'HiCitySwap', description: 'The most popular AMM on BSC by user count! Earn CAKE through yield farming or win it in the Lottery, then stake it in Syrup Pools to earn more tokens! Initial Farm Offerings (new token launch model pioneered by PancakeSwap), NFTs, and more, on a platform you can trust.', image: 'https://pancakeswap.finance/images/hero.png', @@ -12,47 +12,47 @@ export const getCustomMeta = (path: string, t: ContextApi['t']): PageMeta => { switch (path) { case '/': return { - title: `${t('Home')} | ${t('PancakeSwap')}`, + title: `${t('Home')}`, } - case '/competition': + case '/compound': return { - title: `${t('Trading Battle')} | ${t('PancakeSwap')}`, + title: `${t('compound')}`, } - case '/prediction': + case '/nftBox': return { - title: `${t('Prediction')} | ${t('PancakeSwap')}`, + title: `${t('nft box')}`, } case '/farms': return { - title: `${t('Farms')} | ${t('PancakeSwap')}`, + title: `${t('Farms')}`, } case '/pools': return { - title: `${t('Pools')} | ${t('PancakeSwap')}`, + title: `${t('Pools')}`, } case '/lottery': return { - title: `${t('Lottery')} | ${t('PancakeSwap')}`, + title: `${t('Lottery')}`, } case '/collectibles': return { - title: `${t('Collectibles')} | ${t('PancakeSwap')}`, + title: `${t('Collectibles')}`, } case '/ifo': return { - title: `${t('Initial Farm Offering')} | ${t('PancakeSwap')}`, + title: `${t('Initial Farm Offering')}`, } case '/teams': return { - title: `${t('Leaderboard')} | ${t('PancakeSwap')}`, + title: `${t('Leaderboard')}`, } case '/profile/tasks': return { - title: `${t('Task Center')} | ${t('PancakeSwap')}`, + title: `${t('Task Center')}`, } case '/profile': return { - title: `${t('Your Profile')} | ${t('PancakeSwap')}`, + title: `${t('Your Profile')}`, } default: return null diff --git a/src/config/constants/tokens.ts b/src/config/constants/tokens.ts index 6dcd817..790884e 100644 --- a/src/config/constants/tokens.ts +++ b/src/config/constants/tokens.ts @@ -73,7 +73,7 @@ const tokens = { symbol: 'HCC', address: { 56: '0x20de22029ab63cf9A7Cf5fEB2b737Ca1eE4c82A6', - 97: '0xE7619D544bD06f4d7362c8aA06a4ca0Ea73ce8c2', + 97: '0x5554c56e94bf07a85206dfeb584c7cb7f7d21227', }, decimals: 18, projectLink: 'https://tranchess.com/', diff --git a/src/config/localization/languages.ts b/src/config/localization/languages.ts index 896a1b4..f65b2b5 100644 --- a/src/config/localization/languages.ts +++ b/src/config/localization/languages.ts @@ -1,63 +1,11 @@ import { Language } from '@pancakeswap/uikit' -export const AR: Language = { locale: 'ar-SA', language: 'العربية', code: 'ar' } -export const BN: Language = { locale: 'bn-BD', language: 'বাংলা', code: 'bn' } export const EN: Language = { locale: 'en-US', language: 'English', code: 'en' } -export const DE: Language = { locale: 'de-DE', language: 'Deutsch', code: 'de' } -export const EL: Language = { locale: 'el-GR', language: 'Ελληνικά', code: 'el' } -export const ESES: Language = { locale: 'es-ES', language: 'Español', code: 'es-ES' } -export const FI: Language = { locale: 'fi-FI', language: 'Suomalainen', code: 'fi' } -export const FIL: Language = { locale: 'fil-PH', language: 'Filipino', code: 'fil' } -export const FR: Language = { locale: 'fr-FR', language: 'Français', code: 'fr' } -export const HI: Language = { locale: 'hi-IN', language: 'हिंदी', code: 'hi' } -export const HU: Language = { locale: 'hu-HU', language: 'Magyar', code: 'hu' } -export const ID: Language = { locale: 'id-ID', language: 'Bahasa Indonesia', code: 'id' } -export const IT: Language = { locale: 'it-IT', language: 'Italiano', code: 'it' } -export const JA: Language = { locale: 'ja-JP', language: '日本語', code: 'ja' } -export const KO: Language = { locale: 'ko-KR', language: '한국어', code: 'ko' } -export const NL: Language = { locale: 'nl-NL', language: 'Nederlands', code: 'nl' } -export const PL: Language = { locale: 'pl-PL', language: 'Polski', code: 'pl' } -export const PTBR: Language = { locale: 'pt-BR', language: 'Português (Brazil)', code: 'pt-br' } -export const PTPT: Language = { locale: 'pt-PT', language: 'Português', code: 'pt-pt' } -export const RO: Language = { locale: 'ro-RO', language: 'Română', code: 'ro' } -export const RU: Language = { locale: 'ru-RU', language: 'Русский', code: 'ru' } -export const SVSE: Language = { locale: 'sv-SE', language: 'Svenska', code: 'sv' } -export const TA: Language = { locale: 'ta-IN', language: 'தமிழ்', code: 'ta' } -export const TR: Language = { locale: 'tr-TR', language: 'Türkçe', code: 'tr' } -export const UK: Language = { locale: 'uk-UA', language: 'Українська', code: 'uk' } -export const VI: Language = { locale: 'vi-VN', language: 'Tiếng Việt', code: 'vi' } export const ZHCN: Language = { locale: 'zh-CN', language: '简体中文', code: 'zh-cn' } -export const ZHTW: Language = { locale: 'zh-TW', language: '繁體中文', code: 'zh-tw' } export const languages = { - 'ar-SA': AR, - 'bn-BD': BN, 'en-US': EN, - 'de-DE': DE, - 'el-GR': EL, - 'es-ES': ESES, - 'fi-FI': FI, - 'fil-PH': FIL, - 'fr-FR': FR, - 'hi-IN': HI, - 'hu-HU': HU, - 'id-ID': ID, - 'it-IT': IT, - 'ja-JP': JA, - 'ko-KR': KO, - 'nl-NL': NL, - 'pl-PL': PL, - 'pt-BR': PTBR, - 'pt-PT': PTPT, - 'ro-RO': RO, - 'ru-RU': RU, - 'sv-SE': SVSE, - 'ta-IN': TA, - 'tr-TR': TR, - 'uk-UA': UK, - 'vi-VN': VI, 'zh-CN': ZHCN, - 'zh-TW': ZHTW, } export const languageList = Object.values(languages) diff --git a/src/config/localization/translations.json b/src/config/localization/translations.json index a11b707..d9c21b3 100644 --- a/src/config/localization/translations.json +++ b/src/config/localization/translations.json @@ -28,7 +28,6 @@ "XVS Tokens Earned": "XVS Tokens Earned", "Rewards will be calculated per block and total rewards will be distributed automatically at the end of each project’s farming period.": "Rewards will be calculated per block and total rewards will be distributed automatically at the end of each project’s farming period.", "Pool": "Pool", - "Coming Soon": "Coming Soon", "APY": "APY", "Total Liquidity": "Total Liquidity", "View on BscScan": "View on BscScan", @@ -1184,27 +1183,27 @@ "Confirm this transaction in your wallet": "Confirm this transaction in your wallet", "Dismiss": "Dismiss", - "Hcc Info": "HighCityCoin abbreviation HCC,cause HighCityTM cast,", - "Hcc Nft": "Its function is mainly in HighCitySwap On the purchase NFT、NFT Boxes and other tradeable products.", + "Hcc Info": "HiCityCoin abbreviation HCC,cause HiCityTM cast,", + "Hcc Nft": "Its function is mainly in HiCitySwap On the purchase NFT、NFT Boxes and other tradeable products.", "Hcc BTC": "meanwhile,HCC and BTC、ETH Have the same properties,They can trade freely.", "Bazaar": "NFT Bazaar", - "HlighCitySwapInfo": "HIighCitySwap the birth of,From the founder Liu Bus Enthusiastic pursuit of blockchain technology,He has always believed that blockchain technology could be used more widely。for this purpose,He made a brave decision,Abandon investments in other areas,Focus on the practical application of blockchain technology,Put yourself in a familiar field -- social networking on the Internet,Integration with blockchain technology,HighCitySwap Thus was born.That's where we started,Thank you for your support,HighCity The team will always move forward.", + "HlighCitySwapInfo": "HIighCitySwap the birth of,From the founder Liu Bus Enthusiastic pursuit of blockchain technology,He has always believed that blockchain technology could be used more widely。for this purpose,He made a brave decision,Abandon investments in other areas,Focus on the practical application of blockchain technology,Put yourself in a familiar field -- social networking on the Internet,Integration with blockchain technology,HiCitySwap Thus was born.That's where we started,Thank you for your support,HiCity The team will always move forward.", "Stage one: Origin": "Stage one: Origin", "Stage two: Action": "Stage two: Action", "Stage three: Creation": "Stage three: Creation", "Stage four: Integration": "Stage four: Integration", "Stage five: Closing the curtain": "Stage five: Closing the curtain", "The project concept was born in May 2021": "The project concept was born in May 2021;", - "Set up HighClty team in June 2021": "Set up HighClty team in June 2021;", + "Set up HiCity team in June 2021": "Set up HiCity team in June 2021;", "May 2021 -- January 2022 Team run-in": "May 2021 -- January 2022 Team run-in;", - "In April 2022, social networking and media release activities, HighCity coin started and dividend mechanism went online": "In April 2022, social networking and media release activities, HighCity coin started and dividend mechanism went online;", + "In April 2022, social networking and media release activities, HighCity coin started and dividend mechanism went online": "In April 2022, social networking and media release activities, HiCity coin started and dividend mechanism went online;", "In March 2022, project approval, web design, roadmap announcement, smart contract development": "In March 2022, project approval, web design, roadmap announcement, smart contract development;", "Launch of social software in December 2022": "Launch of social software in December 2022;", "Created by NFT in May 2022": "Created by NFT in May 2022;", "June 2022 social software development": "June 2022 social software development;", "December 2022 NFT bonus binding social software": "December 2022 NFT bonus binding social software;", - "In December 2022, HighCity Ecology was preliminarily completed": "In December 2022, HighCity Ecology was preliminarily completed;", - "HighCity Ecology completed in December 2022": "HighCity Ecology completed in December 2022", + "In December 2022, HighCity Ecology was preliminarily completed": "In December 2022, HiCity Ecology was preliminarily completed;", + "HighCity Ecology completed in December 2022": "HiCity Ecology completed in December 2022", "Maintain dividend income growth in December 2022": "Maintain dividend income growth in December 2022;", "Buy commander NFT": "Buy commander NFT", "Upgrade recommendation rights, can enjoy the share of secondary recommendation": "Upgrade recommendation rights, can enjoy the share of secondary recommendation", @@ -1213,7 +1212,7 @@ "First stage sharing ratio": "First stage sharing ratio", "Secondary split ratio": "Secondary split ratio", "Buy It Now": "Buy It Now", - "recommend": "recommend", + "recommend": "Recommend", "The lower the number of": "The lower the number of", "NFT total revenue": "NFT total revenue", "HCC total revenue": "HCC total revenue", @@ -1233,7 +1232,7 @@ "each time": "1. When the countdown is less than 1 hour, the countdown time will be increased by 1 hour each time", "last bid": "2. Each auction has a fixed 10% markup. After the countdown, the item will be awarded to the bidder who made the last bid", "commission fee": "3. After the auction is successful, the platform will charge 6% of the publisher's earnings as a commission fee", - "announcement": "announcement", + "announcement": "Announcement", "return": "return", "Total capital pool": "Total capital pool", "The total amount of dividends": "The total amount of dividends", @@ -1247,12 +1246,12 @@ "By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins": "By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins", "The commission": "The commission!", "footer %number% text": "By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins %number% The commission!", - "market value": "market value(24h)", + "market value": "market value", "Loaded all": "Loaded all", "HCC Currency amount": "HCC Currency amount", "Lock up time": "Lock up time", "possess LP": "possess LP", - "capital pool": "capital pool", + "capital pool": "Capital Pool", "Unclaimed income": "Unclaimed income", "pledge": "pledge", "top": "top", @@ -1271,7 +1270,7 @@ "How to use": "How to use", "person": "person", "Earnings will be cleared after forced cancellation. Confirm cancellation": "Earnings will be cleared after forced cancellation. Confirm cancellation", - "HighCitySwapInfo": "HIighCitySwap was born from the fanatical pursuit of blockchain technology by its founder Liu Bus, who always believes that blockchain technology can be applied more widely. For this reason, he made a brave decision to give up investment in other fields and focus on the practice and application of blockchain technology. He fused his familiar field -- Internet social interaction with blockchain technology and thus HighCitySwap was born. This is our beginning, thank you for your support, the HighCity team will always move forward.", + "HighCitySwapInfo": "HiCitySwap was born from the fanatical pursuit of blockchain technology by its founder Liu Bus, who always believes that blockchain technology can be applied more widely. For this reason, he made a brave decision to give up investment in other fields and focus on the practice and application of blockchain technology. He fused his familiar field -- Internet social interaction with blockchain technology and thus HiCitySwap was born. This is our beginning, thank you for your support, the HiCity team will always move forward.", "After pledge, income will lock warehouse%times%": "After pledge, income will lock warehouse%times%", "IDO exchange in the first phase": "IDO exchange in the first phase", "Opening time of next exchange period:": "Opening time of next exchange period:", @@ -1285,6 +1284,117 @@ "IDO Get": "IDO Get", "Estimated time of collection": "Estimated time of collection", "amount": "amount", - "Change the end": "Change the end", - "After purchase, it is expected to be available for collection in %time% time. Do you confirm the purchase": "After purchase, it is expected to be available for collection in %time% time. Do you confirm the purchase" + "Exchange not commenced": "Exchange not commenced", + "After purchase, it is expected to be available for collection in %time% time. Do you confirm the purchase": "After purchase, it is expected to be available for collection in %time% time. Do you confirm the purchase", + "Blind box": "Blind Box", + "nft box": "NFT Box", + "nft compound": "NFT Compound", + "total quantity": "total quantity", + "With the number": "With the number", + "Did not have": "Did not have", + "already owned": "already owned", + "epic": "epic", + "legend": "legend", + "uncommon": "uncommon", + "common": "common", + "time remaining": "time remaining", + "series": "series", + "French feast": "French feast", + "price": "price", + "quantity": "quantity", + "Coming Soon": "Coming Soon", + "This page is not currently open": "This page is not currently open", + "Viewing the Path Diagram": "Viewing the Path Diagram", + "nft bazaar": "NFT Bazaar", + "already received": "already received", + "help center": "help", + "social contact demo": "social contact demo", + "The rate of": "The rate of", + "%hour%hour": "%hour%hour", + "limit the quantity of": "limit the quantity of", + "time limit": "time limit", + "nft Smoking in the probability": "nft Smoking in the probability", + "%num%kind nft": "%num%kind nft", + "Selling immediately": "Selling immediately", + "Total quantity of ownership": "Total quantity of ownership", + "Compositing success preview": "Compositing success preview", + "nft name": "NFT name", + "not available": "not available", + "Number of successful synthesis": "Number of successful synthesis", + "Synthetic success rate": "Synthetic success rate", + "compound": "compound", + "Estimated synthesis cost": "Estimated synthesis cost", + "combination rules": "combination rules", + "1. Multiple same NFT can be used as raw materials for synthesis. The success rate of synthesis of different levels of NFT is different, the rare synthesis rate is 50%, epic synthesis rate is 40%, legend synthesis rate is 23%;": "1. Multiple same NFT can be used as raw materials for synthesis. The success rate of synthesis of different levels of NFT is different, the rare synthesis rate is 50%, epic synthesis rate is 40%, legend synthesis rate is 23%;", + "2. If the synthesis is successful, the user will get a more advanced NFT, and all NFT in the synthesis pool will be destroyed;": "2. If the synthesis is successful, the user will get a more advanced NFT, and all NFT in the synthesis pool will be destroyed;", + "3. If the synthesis fails, there will be no change or complete failure with different probabilities according to the NFT grade of the synthetic raw materials; No change will lose the cost of synthesis; Complete failure will result in loss of synthetic NFT materials and cost of synthesis;": "3. If the synthesis fails, there will be no change or complete failure with different probabilities according to the NFT grade of the synthetic raw materials; No change will lose the cost of synthesis; Complete failure will result in loss of synthetic NFT materials and cost of synthesis;", + "4. For example: fill two ordinary NFT into the synthesis pool, then the synthesis success probability is 50%; Probability of no change: 47%; A 3 percent chance of complete failure;": "4. For example: fill two ordinary NFT into the synthesis pool, then the synthesis success probability is 50%; Probability of no change: 47%; A 3 percent chance of complete failure;", + "reselect nft": "reselect NFT", + "add NFT": "add NFT", + "Synthesis of details": "Synthesis of details", + "Synthesis results: synthesis success, no change, synthesis failure;": "Synthesis results: synthesis success, no change, synthesis failure;", + "Successful synthesis: obtain more advanced NFT, and destroy the raw material NFT in the synthesis tank;": "Successful synthesis: obtain more advanced NFT, and destroy the raw material NFT in the synthesis tank;", + "No change: keep the NFT of raw material in the synthesis tank, but lose the synthesis cost;": "No change: keep the NFT of raw material in the synthesis tank, but lose the synthesis cost;", + "Synthesis failure: loss of raw material NFT in the synthesis tank and the synthesis cost during synthesis;": "Synthesis failure: loss of raw material NFT in the synthesis tank and the synthesis cost during synthesis;", + "compound probability:": "compound probability:", + "NFT name (grade) of successful synthesis = NFT name (grade) of raw material x quantity + synthesis cost": "NFT name (grade) of successful synthesis = NFT name (grade) of raw material x quantity + synthesis cost", + "bazaar": "bazaar", + "auction": "auction", + "I sell": "I sell", + "transaction record": "transaction record", + "The total volume": "The total volume", + "The total number of transactions": "The total number of transactions", + "Total number of auctions": "Total number of auctions", + "Total auction commission": "Total auction commission", + "trading value": "trading value", + + "Detail": "Detail", + "deal Hash": "deal Hash", + "Auctions a record": "Auctions a record", + "Auction rule": "Auction rule", + "1. When the countdown is less than 1 hour, the countdown time will be increased by 1 hour each time": "1. When the countdown is less than 1 hour, the countdown time will be increased by 1 hour each time", + "2. Each auction has a fixed 10% markup. After the countdown, the item will be awarded to the bidder who made the last bid": "2. Each auction has a fixed 10% markup. After the countdown, the item will be awarded to the bidder who made the last bid", + "3. After the auction is successful": "3. After the auction is successful, the platform will charge 6% of the publisher's earnings as a commission fee", + "4. After the auction, the publisher or the last bidder will collect revenue or NFT in the auction history. After one party of the bidder or the publisher receives revenue or NFT, the other party will automatically receive the corresponding revenue or NFT": "4. After the auction, the publisher or the last bidder will collect revenue or NFT in the auction history. After one party of the bidder or the publisher receives revenue or NFT, the other party will automatically receive the corresponding revenue or NFT", + "5. NFT shall not be traded or transferred after the auction is issued by the issuer": "5. NFT shall not be traded or transferred after the auction is issued by the issuer", + "All transactions": "All transactions", + "I released": "I released", + "I participate in": "I participate in", + "NFT name": "NFT name", + "starting price": "starting price", + "The latest offer": "The latest offer", + "Offer the time": "Offer the time", + "state": "state", + "operation": "operation", + "The wallet address": "The wallet address", + "auction price": "auction price", + "The auction time": "The auction time", + "In the auction": "In the auction", + "traded": "traded", + "latest release": "latest release", + "end time": "end time", + "Prices go from low to high": "Prices go from low to high", + "Prices go from high to low": "Prices go from high to low", + "Auction": "Auction", + "fixed price": "fixed price", + "sell NFT": "sell NFT", + "Selling way": "Selling way", + "Selling time": "Selling time", + "Add as a trading pair": "Add as a trading pair", + "reselect NFT": "reselect NFT", + "Auction countdown": "Auction countdown", + "present price%price%": "present price%price%", + "Fixed markup (%price% premium)": "Fixed markup (%price% premium)", + "owner": "owner", + "The male chain": "The male chain", + "on offer": "on offer", + "be sold": "be sold", + "have bought": "have bought", + "Has been selling": "Has been selling", + "Transaction history": "Transaction history", + "incident": "incident", + "unit price": "unit price", + "seller": "seller", + "purchaser": "purchaser", + "trading hour": "trading hour" } diff --git a/src/hooks/useGetDocumentTitlePrice.ts b/src/hooks/useGetDocumentTitlePrice.ts index 12a9214..db04b3c 100644 --- a/src/hooks/useGetDocumentTitlePrice.ts +++ b/src/hooks/useGetDocumentTitlePrice.ts @@ -5,7 +5,7 @@ const useGetDocumentTitlePrice = () => { const cakePriceBusd = useCakeBusdPrice() useEffect(() => { const cakePriceBusdString = cakePriceBusd ? cakePriceBusd.toFixed(2) : '' - document.title = `HighCity Swap - ${cakePriceBusdString}` + document.title = `HiCity Swap - ${cakePriceBusdString}` }, [cakePriceBusd]) } export default useGetDocumentTitlePrice diff --git a/src/services/bazaar.ts b/src/services/bazaar.ts new file mode 100644 index 0000000..65268fa --- /dev/null +++ b/src/services/bazaar.ts @@ -0,0 +1,11 @@ +import request from 'utils/request' + +export const getOfficialPage = (params) => { + return request.request({ + url: '/high_city/app/api/market/official/page', + method: 'get', + params, + }) +} + +export default getOfficialPage diff --git a/src/services/blindBox.ts b/src/services/blindBox.ts new file mode 100644 index 0000000..3144297 --- /dev/null +++ b/src/services/blindBox.ts @@ -0,0 +1,18 @@ +import request from 'utils/request' + +export const getBoxPage = (params) => { + return request.request({ + url: '/high_city/app/api/box/page', + method: 'get', + params, + }) +} + +export const getBoxDetail = (id) => { + return request.request({ + url: `/high_city/app/api/box/detail/${id}`, + method: 'get', + }) +} + +export default getBoxPage diff --git a/src/services/board.ts b/src/services/board.ts index fbb8ff9..3f81bd4 100644 --- a/src/services/board.ts +++ b/src/services/board.ts @@ -2,7 +2,7 @@ import request from 'utils/request' export const getBaseConfig = () => { return request.request({ - url: '/high_city/app/api/base/config', + url: '/high_city/app/api/base/config/bod/lock/time', method: 'get', }) } diff --git a/src/services/user.ts b/src/services/user.ts index 5146557..1a0346b 100644 --- a/src/services/user.ts +++ b/src/services/user.ts @@ -19,4 +19,11 @@ export const indexInfo = () => { }) } +export const getProjectDoc = () => { + return request.request({ + url: '/high_city/app/api/base/config/project/doc', + method: 'get', + }) +} + export default queryUserInfo diff --git a/src/utils/formatBalance.ts b/src/utils/formatBalance.ts index fa8d632..0e8027c 100644 --- a/src/utils/formatBalance.ts +++ b/src/utils/formatBalance.ts @@ -68,3 +68,6 @@ export const formatFixedNumber = (number: ethers.FixedNumber, displayDecimals = export const formatDivNumber = (number: BigNumber | number, decimals = 4) => { return new BigNumber(number).div(BIG_TEN.pow(decimals)).toNumber() } +export const formatTimeNumber = (number: BigNumber | number | string, decimals = 18) => { + return new BigNumber(number).times(BIG_TEN.pow(decimals)).toNumber() +} diff --git a/src/views/Announcement/components/Detail.tsx b/src/views/Announcement/components/Detail.tsx index 8186d32..f0a863f 100644 --- a/src/views/Announcement/components/Detail.tsx +++ b/src/views/Announcement/components/Detail.tsx @@ -3,6 +3,7 @@ import dayjs from 'dayjs' import styled from 'styled-components' import { useTranslation } from 'contexts/Localization' import { Text, Flex, Image, Input, Heading } from '@pancakeswap/uikit' +import './quill.snow.css' interface ListProps { title?: string @@ -13,10 +14,12 @@ interface ListProps { const DetailDiv = styled.div` width: 80%; + max-height: 85vh; background: rgba(255, 255, 255); border-radius: 20px; margin: 0 auto; box-sizing: border-box; + margin-top: 30px; padding: 40px 30px; ` const HeaderFlex = styled(Flex)` @@ -39,10 +42,14 @@ const TextTime = styled(Text)` padding: 30px 0 20px 0; border-bottom: 1px solid #e3e3e3; ` -const TextInfo = styled(Text)` +const TextInfo = styled.span` + display: block; font-size: 14px; color: #999999; margin-top: 30px; + max-height: calc(85vh - 240px); + line-height: 20px; + overflow-y: auto; ` const Detail: React.FC = ({ title, publishTime, content, close }) => { @@ -59,7 +66,11 @@ const Detail: React.FC = ({ title, publishTime, content, close }) => {title} {dayjs(publishTime).format('YYYY-MM-DD HH:mm')} - {content} + {/* */} + +
+ +
) diff --git a/src/views/Announcement/components/quill.snow.css b/src/views/Announcement/components/quill.snow.css new file mode 100644 index 0000000..ccf825d --- /dev/null +++ b/src/views/Announcement/components/quill.snow.css @@ -0,0 +1,945 @@ +/*! + * Quill Editor v1.3.7 + * https://quilljs.com/ + * Copyright (c) 2014, Jason Chen + * Copyright (c) 2013, salesforce.com + */ +.ql-container { + box-sizing: border-box; + font-family: Helvetica, Arial, sans-serif; + font-size: 13px; + height: 100%; + margin: 0px; + position: relative; +} +.ql-container.ql-disabled .ql-tooltip { + visibility: hidden; +} +.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before { + pointer-events: none; +} +.ql-clipboard { + left: -100000px; + height: 1px; + overflow-y: hidden; + position: absolute; + top: 50%; +} +.ql-clipboard p { + margin: 0; + padding: 0; +} +.ql-editor { + box-sizing: border-box; + line-height: 1.42; + height: 100%; + outline: none; + overflow-y: auto; + padding: 12px 15px; + tab-size: 4; + -moz-tab-size: 4; + text-align: left; + white-space: pre-wrap; + word-wrap: break-word; +} +.ql-editor > * { + cursor: text; +} +.ql-editor p, +.ql-editor ol, +.ql-editor ul, +.ql-editor pre, +.ql-editor blockquote, +.ql-editor h1, +.ql-editor h2, +.ql-editor h3, +.ql-editor h4, +.ql-editor h5, +.ql-editor h6 { + margin: 0; + padding: 0; + counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; +} +.ql-editor ol, +.ql-editor ul { + padding-left: 1.5em; +} +.ql-editor ol > li, +.ql-editor ul > li { + list-style-type: none; +} +.ql-editor ul > li::before { + content: '\2022'; +} +.ql-editor ul[data-checked=true], +.ql-editor ul[data-checked=false] { + pointer-events: none; +} +.ql-editor ul[data-checked=true] > li *, +.ql-editor ul[data-checked=false] > li * { + pointer-events: all; +} +.ql-editor ul[data-checked=true] > li::before, +.ql-editor ul[data-checked=false] > li::before { + color: #777; + cursor: pointer; + pointer-events: all; +} +.ql-editor ul[data-checked=true] > li::before { + content: '\2611'; +} +.ql-editor ul[data-checked=false] > li::before { + content: '\2610'; +} +.ql-editor li::before { + display: inline-block; + white-space: nowrap; + width: 1.2em; +} +.ql-editor li:not(.ql-direction-rtl)::before { + margin-left: -1.5em; + margin-right: 0.3em; + text-align: right; +} +.ql-editor li.ql-direction-rtl::before { + margin-left: 0.3em; + margin-right: -1.5em; +} +.ql-editor ol li:not(.ql-direction-rtl), +.ql-editor ul li:not(.ql-direction-rtl) { + padding-left: 1.5em; +} +.ql-editor ol li.ql-direction-rtl, +.ql-editor ul li.ql-direction-rtl { + padding-right: 1.5em; +} +.ql-editor ol li { + counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; + counter-increment: list-0; +} +.ql-editor ol li:before { + content: counter(list-0, decimal) '. '; +} +.ql-editor ol li.ql-indent-1 { + counter-increment: list-1; +} +.ql-editor ol li.ql-indent-1:before { + content: counter(list-1, lower-alpha) '. '; +} +.ql-editor ol li.ql-indent-1 { + counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; +} +.ql-editor ol li.ql-indent-2 { + counter-increment: list-2; +} +.ql-editor ol li.ql-indent-2:before { + content: counter(list-2, lower-roman) '. '; +} +.ql-editor ol li.ql-indent-2 { + counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9; +} +.ql-editor ol li.ql-indent-3 { + counter-increment: list-3; +} +.ql-editor ol li.ql-indent-3:before { + content: counter(list-3, decimal) '. '; +} +.ql-editor ol li.ql-indent-3 { + counter-reset: list-4 list-5 list-6 list-7 list-8 list-9; +} +.ql-editor ol li.ql-indent-4 { + counter-increment: list-4; +} +.ql-editor ol li.ql-indent-4:before { + content: counter(list-4, lower-alpha) '. '; +} +.ql-editor ol li.ql-indent-4 { + counter-reset: list-5 list-6 list-7 list-8 list-9; +} +.ql-editor ol li.ql-indent-5 { + counter-increment: list-5; +} +.ql-editor ol li.ql-indent-5:before { + content: counter(list-5, lower-roman) '. '; +} +.ql-editor ol li.ql-indent-5 { + counter-reset: list-6 list-7 list-8 list-9; +} +.ql-editor ol li.ql-indent-6 { + counter-increment: list-6; +} +.ql-editor ol li.ql-indent-6:before { + content: counter(list-6, decimal) '. '; +} +.ql-editor ol li.ql-indent-6 { + counter-reset: list-7 list-8 list-9; +} +.ql-editor ol li.ql-indent-7 { + counter-increment: list-7; +} +.ql-editor ol li.ql-indent-7:before { + content: counter(list-7, lower-alpha) '. '; +} +.ql-editor ol li.ql-indent-7 { + counter-reset: list-8 list-9; +} +.ql-editor ol li.ql-indent-8 { + counter-increment: list-8; +} +.ql-editor ol li.ql-indent-8:before { + content: counter(list-8, lower-roman) '. '; +} +.ql-editor ol li.ql-indent-8 { + counter-reset: list-9; +} +.ql-editor ol li.ql-indent-9 { + counter-increment: list-9; +} +.ql-editor ol li.ql-indent-9:before { + content: counter(list-9, decimal) '. '; +} +.ql-editor .ql-indent-1:not(.ql-direction-rtl) { + padding-left: 3em; +} +.ql-editor li.ql-indent-1:not(.ql-direction-rtl) { + padding-left: 4.5em; +} +.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right { + padding-right: 3em; +} +.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right { + padding-right: 4.5em; +} +.ql-editor .ql-indent-2:not(.ql-direction-rtl) { + padding-left: 6em; +} +.ql-editor li.ql-indent-2:not(.ql-direction-rtl) { + padding-left: 7.5em; +} +.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right { + padding-right: 6em; +} +.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right { + padding-right: 7.5em; +} +.ql-editor .ql-indent-3:not(.ql-direction-rtl) { + padding-left: 9em; +} +.ql-editor li.ql-indent-3:not(.ql-direction-rtl) { + padding-left: 10.5em; +} +.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right { + padding-right: 9em; +} +.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right { + padding-right: 10.5em; +} +.ql-editor .ql-indent-4:not(.ql-direction-rtl) { + padding-left: 12em; +} +.ql-editor li.ql-indent-4:not(.ql-direction-rtl) { + padding-left: 13.5em; +} +.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right { + padding-right: 12em; +} +.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right { + padding-right: 13.5em; +} +.ql-editor .ql-indent-5:not(.ql-direction-rtl) { + padding-left: 15em; +} +.ql-editor li.ql-indent-5:not(.ql-direction-rtl) { + padding-left: 16.5em; +} +.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right { + padding-right: 15em; +} +.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right { + padding-right: 16.5em; +} +.ql-editor .ql-indent-6:not(.ql-direction-rtl) { + padding-left: 18em; +} +.ql-editor li.ql-indent-6:not(.ql-direction-rtl) { + padding-left: 19.5em; +} +.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right { + padding-right: 18em; +} +.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right { + padding-right: 19.5em; +} +.ql-editor .ql-indent-7:not(.ql-direction-rtl) { + padding-left: 21em; +} +.ql-editor li.ql-indent-7:not(.ql-direction-rtl) { + padding-left: 22.5em; +} +.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right { + padding-right: 21em; +} +.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right { + padding-right: 22.5em; +} +.ql-editor .ql-indent-8:not(.ql-direction-rtl) { + padding-left: 24em; +} +.ql-editor li.ql-indent-8:not(.ql-direction-rtl) { + padding-left: 25.5em; +} +.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right { + padding-right: 24em; +} +.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right { + padding-right: 25.5em; +} +.ql-editor .ql-indent-9:not(.ql-direction-rtl) { + padding-left: 27em; +} +.ql-editor li.ql-indent-9:not(.ql-direction-rtl) { + padding-left: 28.5em; +} +.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right { + padding-right: 27em; +} +.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right { + padding-right: 28.5em; +} +.ql-editor .ql-video { + display: block; + max-width: 100%; +} +.ql-editor .ql-video.ql-align-center { + margin: 0 auto; +} +.ql-editor .ql-video.ql-align-right { + margin: 0 0 0 auto; +} +.ql-editor .ql-bg-black { + background-color: #000; +} +.ql-editor .ql-bg-red { + background-color: #e60000; +} +.ql-editor .ql-bg-orange { + background-color: #f90; +} +.ql-editor .ql-bg-yellow { + background-color: #ff0; +} +.ql-editor .ql-bg-green { + background-color: #008a00; +} +.ql-editor .ql-bg-blue { + background-color: #06c; +} +.ql-editor .ql-bg-purple { + background-color: #93f; +} +.ql-editor .ql-color-white { + color: #fff; +} +.ql-editor .ql-color-red { + color: #e60000; +} +.ql-editor .ql-color-orange { + color: #f90; +} +.ql-editor .ql-color-yellow { + color: #ff0; +} +.ql-editor .ql-color-green { + color: #008a00; +} +.ql-editor .ql-color-blue { + color: #06c; +} +.ql-editor .ql-color-purple { + color: #93f; +} +.ql-editor .ql-font-serif { + font-family: Georgia, Times New Roman, serif; +} +.ql-editor .ql-font-monospace { + font-family: Monaco, Courier New, monospace; +} +.ql-editor .ql-size-small { + font-size: 0.75em; +} +.ql-editor .ql-size-large { + font-size: 1.5em; +} +.ql-editor .ql-size-huge { + font-size: 2.5em; +} +.ql-editor .ql-direction-rtl { + direction: rtl; + text-align: inherit; +} +.ql-editor .ql-align-center { + text-align: center; +} +.ql-editor .ql-align-justify { + text-align: justify; +} +.ql-editor .ql-align-right { + text-align: right; +} +.ql-editor.ql-blank::before { + color: rgba(0,0,0,0.6); + content: attr(data-placeholder); + font-style: italic; + left: 15px; + pointer-events: none; + position: absolute; + right: 15px; +} +.ql-snow.ql-toolbar:after, +.ql-snow .ql-toolbar:after { + clear: both; + content: ''; + display: table; +} +.ql-snow.ql-toolbar button, +.ql-snow .ql-toolbar button { + background: none; + border: none; + cursor: pointer; + display: inline-block; + float: left; + height: 24px; + padding: 3px 5px; + width: 28px; +} +.ql-snow.ql-toolbar button svg, +.ql-snow .ql-toolbar button svg { + float: left; + height: 100%; +} +.ql-snow.ql-toolbar button:active:hover, +.ql-snow .ql-toolbar button:active:hover { + outline: none; +} +.ql-snow.ql-toolbar input.ql-image[type=file], +.ql-snow .ql-toolbar input.ql-image[type=file] { + display: none; +} +.ql-snow.ql-toolbar button:hover, +.ql-snow .ql-toolbar button:hover, +.ql-snow.ql-toolbar button:focus, +.ql-snow .ql-toolbar button:focus, +.ql-snow.ql-toolbar button.ql-active, +.ql-snow .ql-toolbar button.ql-active, +.ql-snow.ql-toolbar .ql-picker-label:hover, +.ql-snow .ql-toolbar .ql-picker-label:hover, +.ql-snow.ql-toolbar .ql-picker-label.ql-active, +.ql-snow .ql-toolbar .ql-picker-label.ql-active, +.ql-snow.ql-toolbar .ql-picker-item:hover, +.ql-snow .ql-toolbar .ql-picker-item:hover, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected, +.ql-snow .ql-toolbar .ql-picker-item.ql-selected { + color: #06c; +} +.ql-snow.ql-toolbar button:hover .ql-fill, +.ql-snow .ql-toolbar button:hover .ql-fill, +.ql-snow.ql-toolbar button:focus .ql-fill, +.ql-snow .ql-toolbar button:focus .ql-fill, +.ql-snow.ql-toolbar button.ql-active .ql-fill, +.ql-snow .ql-toolbar button.ql-active .ql-fill, +.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill, +.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill, +.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill, +.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill, +.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill, +.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill, +.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill, +.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill, +.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill, +.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill, +.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill, +.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill, +.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill, +.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, +.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill, +.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, +.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill, +.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, +.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill, +.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill { + fill: #06c; +} +.ql-snow.ql-toolbar button:hover .ql-stroke, +.ql-snow .ql-toolbar button:hover .ql-stroke, +.ql-snow.ql-toolbar button:focus .ql-stroke, +.ql-snow .ql-toolbar button:focus .ql-stroke, +.ql-snow.ql-toolbar button.ql-active .ql-stroke, +.ql-snow .ql-toolbar button.ql-active .ql-stroke, +.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke, +.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke, +.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke, +.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke, +.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke, +.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke, +.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke, +.ql-snow.ql-toolbar button:hover .ql-stroke-miter, +.ql-snow .ql-toolbar button:hover .ql-stroke-miter, +.ql-snow.ql-toolbar button:focus .ql-stroke-miter, +.ql-snow .ql-toolbar button:focus .ql-stroke-miter, +.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter, +.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter, +.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter, +.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter, +.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, +.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter, +.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter, +.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter, +.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter, +.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter { + stroke: #06c; +} +@media (pointer: coarse) { + .ql-snow.ql-toolbar button:hover:not(.ql-active), + .ql-snow .ql-toolbar button:hover:not(.ql-active) { + color: #444; + } + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill, + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill { + fill: #444; + } + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke, + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter { + stroke: #444; + } +} +.ql-snow { + box-sizing: border-box; +} +.ql-snow * { + box-sizing: border-box; +} +.ql-snow .ql-hidden { + display: none; +} +.ql-snow .ql-out-bottom, +.ql-snow .ql-out-top { + visibility: hidden; +} +.ql-snow .ql-tooltip { + position: absolute; + transform: translateY(10px); +} +.ql-snow .ql-tooltip a { + cursor: pointer; + text-decoration: none; +} +.ql-snow .ql-tooltip.ql-flip { + transform: translateY(-10px); +} +.ql-snow .ql-formats { + display: inline-block; + vertical-align: middle; +} +.ql-snow .ql-formats:after { + clear: both; + content: ''; + display: table; +} +.ql-snow .ql-stroke { + fill: none; + stroke: #444; + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 2; +} +.ql-snow .ql-stroke-miter { + fill: none; + stroke: #444; + stroke-miterlimit: 10; + stroke-width: 2; +} +.ql-snow .ql-fill, +.ql-snow .ql-stroke.ql-fill { + fill: #444; +} +.ql-snow .ql-empty { + fill: none; +} +.ql-snow .ql-even { + fill-rule: evenodd; +} +.ql-snow .ql-thin, +.ql-snow .ql-stroke.ql-thin { + stroke-width: 1; +} +.ql-snow .ql-transparent { + opacity: 0.4; +} +.ql-snow .ql-direction svg:last-child { + display: none; +} +.ql-snow .ql-direction.ql-active svg:last-child { + display: inline; +} +.ql-snow .ql-direction.ql-active svg:first-child { + display: none; +} +.ql-snow .ql-editor h1 { + font-size: 2em; +} +.ql-snow .ql-editor h2 { + font-size: 1.5em; +} +.ql-snow .ql-editor h3 { + font-size: 1.17em; +} +.ql-snow .ql-editor h4 { + font-size: 1em; +} +.ql-snow .ql-editor h5 { + font-size: 0.83em; +} +.ql-snow .ql-editor h6 { + font-size: 0.67em; +} +.ql-snow .ql-editor a { + text-decoration: underline; +} +.ql-snow .ql-editor blockquote { + border-left: 4px solid #ccc; + margin-bottom: 5px; + margin-top: 5px; + padding-left: 16px; +} +.ql-snow .ql-editor code, +.ql-snow .ql-editor pre { + background-color: #f0f0f0; + border-radius: 3px; +} +.ql-snow .ql-editor pre { + white-space: pre-wrap; + margin-bottom: 5px; + margin-top: 5px; + padding: 5px 10px; +} +.ql-snow .ql-editor code { + font-size: 85%; + padding: 2px 4px; +} +.ql-snow .ql-editor pre.ql-syntax { + background-color: #23241f; + color: #f8f8f2; + overflow: visible; +} +.ql-snow .ql-editor img { + max-width: 100%; +} +.ql-snow .ql-picker { + color: #444; + display: inline-block; + float: left; + font-size: 14px; + font-weight: 500; + height: 24px; + position: relative; + vertical-align: middle; +} +.ql-snow .ql-picker-label { + cursor: pointer; + display: inline-block; + height: 100%; + padding-left: 8px; + padding-right: 2px; + position: relative; + width: 100%; +} +.ql-snow .ql-picker-label::before { + display: inline-block; + line-height: 22px; +} +.ql-snow .ql-picker-options { + background-color: #fff; + display: none; + min-width: 100%; + padding: 4px 8px; + position: absolute; + white-space: nowrap; +} +.ql-snow .ql-picker-options .ql-picker-item { + cursor: pointer; + display: block; + padding-bottom: 5px; + padding-top: 5px; +} +.ql-snow .ql-picker.ql-expanded .ql-picker-label { + color: #ccc; + z-index: 2; +} +.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill { + fill: #ccc; +} +.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke { + stroke: #ccc; +} +.ql-snow .ql-picker.ql-expanded .ql-picker-options { + display: block; + margin-top: -1px; + top: 100%; + z-index: 1; +} +.ql-snow .ql-color-picker, +.ql-snow .ql-icon-picker { + width: 28px; +} +.ql-snow .ql-color-picker .ql-picker-label, +.ql-snow .ql-icon-picker .ql-picker-label { + padding: 2px 4px; +} +.ql-snow .ql-color-picker .ql-picker-label svg, +.ql-snow .ql-icon-picker .ql-picker-label svg { + right: 4px; +} +.ql-snow .ql-icon-picker .ql-picker-options { + padding: 4px 0px; +} +.ql-snow .ql-icon-picker .ql-picker-item { + height: 24px; + width: 24px; + padding: 2px 4px; +} +.ql-snow .ql-color-picker .ql-picker-options { + padding: 3px 5px; + width: 152px; +} +.ql-snow .ql-color-picker .ql-picker-item { + border: 1px solid transparent; + float: left; + height: 16px; + margin: 2px; + padding: 0px; + width: 16px; +} +.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg { + position: absolute; + margin-top: -9px; + right: 0; + top: 50%; + width: 18px; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before, +.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before, +.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before { + content: attr(data-label); +} +.ql-snow .ql-picker.ql-header { + width: 98px; +} +.ql-snow .ql-picker.ql-header .ql-picker-label::before, +.ql-snow .ql-picker.ql-header .ql-picker-item::before { + content: 'Normal'; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { + content: 'Heading 1'; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { + content: 'Heading 2'; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { + content: 'Heading 3'; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { + content: 'Heading 4'; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { + content: 'Heading 5'; +} +.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before, +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { + content: 'Heading 6'; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { + font-size: 2em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { + font-size: 1.5em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { + font-size: 1.17em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { + font-size: 1em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { + font-size: 0.83em; +} +.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { + font-size: 0.67em; +} +.ql-snow .ql-picker.ql-font { + width: 108px; +} +.ql-snow .ql-picker.ql-font .ql-picker-label::before, +.ql-snow .ql-picker.ql-font .ql-picker-item::before { + content: 'Sans Serif'; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before { + content: 'Serif'; +} +.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before, +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before { + content: 'Monospace'; +} +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before { + font-family: Georgia, Times New Roman, serif; +} +.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before { + font-family: Monaco, Courier New, monospace; +} +.ql-snow .ql-picker.ql-size { + width: 98px; +} +.ql-snow .ql-picker.ql-size .ql-picker-label::before, +.ql-snow .ql-picker.ql-size .ql-picker-item::before { + content: 'Normal'; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before { + content: 'Small'; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before { + content: 'Large'; +} +.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before, +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before { + content: 'Huge'; +} +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before { + font-size: 10px; +} +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before { + font-size: 18px; +} +.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before { + font-size: 32px; +} +.ql-snow .ql-color-picker.ql-background .ql-picker-item { + background-color: #fff; +} +.ql-snow .ql-color-picker.ql-color .ql-picker-item { + background-color: #000; +} +.ql-toolbar.ql-snow { + border: 1px solid #ccc; + box-sizing: border-box; + font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; + padding: 8px; +} +.ql-toolbar.ql-snow .ql-formats { + margin-right: 15px; +} +.ql-toolbar.ql-snow .ql-picker-label { + border: 1px solid transparent; +} +.ql-toolbar.ql-snow .ql-picker-options { + border: 1px solid transparent; + box-shadow: rgba(0,0,0,0.2) 0 2px 8px; +} +.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label { + border-color: #ccc; +} +.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options { + border-color: #ccc; +} +.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected, +.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover { + border-color: #000; +} +.ql-toolbar.ql-snow + .ql-container.ql-snow { + border-top: 0px; +} +.ql-snow .ql-tooltip { + background-color: #fff; + border: 1px solid #ccc; + box-shadow: 0px 0px 5px #ddd; + color: #444; + padding: 5px 12px; + white-space: nowrap; +} +.ql-snow .ql-tooltip::before { + content: "Visit URL:"; + line-height: 26px; + margin-right: 8px; +} +.ql-snow .ql-tooltip input[type=text] { + display: none; + border: 1px solid #ccc; + font-size: 13px; + height: 26px; + margin: 0px; + padding: 3px 5px; + width: 170px; +} +.ql-snow .ql-tooltip a.ql-preview { + display: inline-block; + max-width: 200px; + overflow-x: hidden; + text-overflow: ellipsis; + vertical-align: top; +} +.ql-snow .ql-tooltip a.ql-action::after { + border-right: 1px solid #ccc; + content: 'Edit'; + margin-left: 16px; + padding-right: 8px; +} +.ql-snow .ql-tooltip a.ql-remove::before { + content: 'Remove'; + margin-left: 8px; +} +.ql-snow .ql-tooltip a { + line-height: 26px; +} +.ql-snow .ql-tooltip.ql-editing a.ql-preview, +.ql-snow .ql-tooltip.ql-editing a.ql-remove { + display: none; +} +.ql-snow .ql-tooltip.ql-editing input[type=text] { + display: inline-block; +} +.ql-snow .ql-tooltip.ql-editing a.ql-action::after { + border-right: 0px; + content: 'Save'; + padding-right: 0px; +} +.ql-snow .ql-tooltip[data-mode=link]::before { + content: "Enter link:"; +} +.ql-snow .ql-tooltip[data-mode=formula]::before { + content: "Enter formula:"; +} +.ql-snow .ql-tooltip[data-mode=video]::before { + content: "Enter video:"; +} +.ql-snow a { + color: #06c; +} +.ql-container.ql-snow { + border: 1px solid #ccc; +} diff --git a/src/views/Announcement/index.tsx b/src/views/Announcement/index.tsx index 80a1ea8..2d8842a 100644 --- a/src/views/Announcement/index.tsx +++ b/src/views/Announcement/index.tsx @@ -1,4 +1,5 @@ import React, { useState, useEffect, useMemo, useRef } from 'react' +import Pagination from '@mui/material/Pagination' import styled from 'styled-components' import { useTranslation } from 'contexts/Localization' // import Container from 'components/Layout/Container' @@ -16,9 +17,10 @@ const ContainerMain = styled.div` background: ${({ theme }) => theme.colors.gradients.bubblegum}; ` const MainDiv = styled.div` + padding: 20px 0; width: 100%; min-height: calc(100vh - 64px); - box-sizing: border-box; + /* box-sizing: border-box; */ ` const TableDiv = styled.div` width: 80%; @@ -126,39 +128,26 @@ const Announcement: React.FC = () => { const [searchTitle, setSearchTitle] = useState('') const [detailVisible, setDetailVisible] = useState(false) const [list, setList] = useState([]) - const [totalVisible, setTotalVisible] = useState(false) const [detailData, setDetailData] = useState({ title: '', publishTime: 0, content: '' }) + const [count, setCount] = useState(undefined) const getList = async (page: number, size: number, title?: string, type?: string) => { - if (totalVisible) return - if (type) { - setList([]) - } const data = await getAnnouncementPage({ page, size, title }) - const dataList = type ? data.content : [...list, ...data.content] - setList(dataList) - if (data.content.length === 0 || !data.content) { - setTotalVisible(true) - } + setCount(getTotalPageNum(data.total, data.size)) + setList(data.content) } - - const onScrollCapture = () => { - const innerHeight = window.innerHeight - const screenH = Math.ceil(innerHeight + window.scrollY) - const eleH = document.documentElement.offsetHeight - if (screenH >= eleH) { - setPage(pageNum + 1) - } + /** + * [getTotalPageNum 获取页码总数] + * @param {[type]} totalRecord [总记录] + * @param {[type]} pageSize [每页记录条数] + * @return {[type]} [总页码数据] + */ + const getTotalPageNum = (total, pageSize) => { + const countTotal = ((Number(total) + Number(pageSize) - 1) / Number(pageSize)).toString() + return parseInt(countTotal) } useEffect(() => { - if (!totalVisible) { - window.addEventListener('scroll', onScrollCapture) - getList(pageNum, 10, searchTitle) - } - - return () => { - window.removeEventListener('scroll', onScrollCapture) - } - }, [pageNum]) + getList(pageNum, 10, searchTitle) + }, []) const lookDetail = async (id) => { const data = await getAnnouncementDetail(id) @@ -167,7 +156,7 @@ const Announcement: React.FC = () => { } const searchList = () => { setList([]) - setTotalVisible(false) + // setTotalVisible(false) getList(1, 10, searchTitle, 'search') } const close = () => { @@ -179,7 +168,7 @@ const Announcement: React.FC = () => {
{list.map((item) => ( lookDetail(item.id)}> - + ))}
@@ -189,9 +178,15 @@ const Announcement: React.FC = () => { const { value: inputValue } = evt.target setSearchTitle(inputValue) } + + const pageChange = (event, page) => { + setPage(page) + getList(page, 10, searchTitle) + } + return ( - + {detailVisible ? ( { {renderContent()} - {totalVisible ? {t('Loaded all')} : ''} - - {/*
*/} - {/* {list.map((item) => ( - lookDetail(item.id)}> - - - ))} */} + + + )} diff --git a/src/views/Bazaar/components/AuctionRecord.tsx b/src/views/Bazaar/components/AuctionRecord.tsx new file mode 100644 index 0000000..335953e --- /dev/null +++ b/src/views/Bazaar/components/AuctionRecord.tsx @@ -0,0 +1,195 @@ +import React, { useState } from 'react' +import styled from 'styled-components' +import { Text, Button, Image, Flex } from '@pancakeswap/uikit' +import { useTranslation } from 'contexts/Localization' + +interface AuctionRecordProps { + onDismiss?: () => void +} + +const FlexMain = styled.div` + width: 70%; + height: 658px; + background: #fff; + font-size: 18px; + color: #999999; + z-index: 9999; + border-radius: 15px; + position: relative; +` +const CloseImage = styled(Image)` + cursor: pointer; + position: absolute; + top: 30px; + right: 30px; +` +const HeaderText = styled(Text)` + font-size: 24px; + color: #333333; + margin-top: 40px; + text-align: center; +` + +const TypeFlex = styled(Flex)` + flex-wrap: wrap; + align-items: center; + margin-top: 35px; + padding-left: 30px; + & > .active { + background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); + color: #fff; + } +` +const TypeItem = styled(Flex)` + width: 128px; + height: 42px; + border: 1px solid #1fc7d4; + border-radius: 30px; + align-items: center; + justify-content: center; + font-size: 12px; + color: #1fc7d4; + margin-right: 15px; + cursor: pointer; +` +const TableThemed = styled(Flex)` + margin-top: 30px; + height: 56px; + align-items: center; + flex-wrap: wrap; +` +const ThemedItem = styled.div` + width: 16.6%; + height: 56px; + line-height: 56px; + text-align: center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 16px; + color: #666666; + border-top: 1px solid #e3e3e3; +` +const TableBody = styled.div`` +const TrFlex = styled(Flex)` + /* height: 80px; */ + padding: 10px 0; + border-top: 1px solid #e3e3e3; + align-items: center; + flex-wrap: wrap; +` +const TdFlex = styled(Flex)` + align-items: center; + justify-content: center; + flex-wrap: wrap; + width: 16.6%; + color: #666666; + font-size: 14px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +` +const TdImage = styled(Image)` + margin-right: 20px; +` +const TdBtnFlex = styled(Flex)` + width: 16.6%; + flex-direction: column; + justify-content: center; + align-items: center; +` +const DetailButton = styled(Button)` + width: 80px; + height: 30px; + background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); + border-radius: 30px; + font-size: 12px; +` +const HashText = styled(Text)` + cursor: pointer; + font-size: 14px; + color: #1fc7d4; + margin-top: 5px; + border-bottom: 1px solid #1fc7d4; +` + +const AuctionRecord: React.FC = ({ onDismiss }) => { + const { t } = useTranslation() + + const typeList = [ + { label: t('All transactions'), value: '1' }, + { label: t('I released'), value: '2' }, + { label: t('I participate in'), value: '3' }, + ] + const [typeIndex, setTypeIndex] = useState(0) + + const ThemedList = [ + t('NFT name'), + t('starting price'), + t('The latest offer'), + t('Offer the time'), + t('state'), + t('operation'), + ] + + const list = [ + { + name: 'Cat goddess Emerald ', + icon: '', + price: '1', + newPrice: '2', + time: '2022-02-02', + status: '已售卖', + id: '1', + }, + ] + + return ( + + + {t('Auctions a record')} + + {typeList.map((item, index) => { + return ( + setTypeIndex(index)} + > + {item.label} + + ) + })} + + <> + + {ThemedList.map((item) => { + return {item} + })} + + + {list.map((item) => { + return ( + + + + {item.name} + + {item.price} + {item.newPrice} + {item.time} + {item.status} + + {t('Detail')} + {t('deal Hash')} + + + ) + })} + + + + ) +} + +export default AuctionRecord diff --git a/src/views/Bazaar/components/AuctionRule.tsx b/src/views/Bazaar/components/AuctionRule.tsx new file mode 100644 index 0000000..36b4a72 --- /dev/null +++ b/src/views/Bazaar/components/AuctionRule.tsx @@ -0,0 +1,52 @@ +import React from 'react' +import styled from 'styled-components' +import { Text, Button, Image, Flex } from '@pancakeswap/uikit' +import { useTranslation } from 'contexts/Localization' + +const FlexMain = styled.div` + margin-top: 30px; + padding: 34px 30px; + background: #fff; + box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.16); + border-radius: 20px; +` +const HeaderText = styled(Text)` + font-size: 24px; + color: #333333; + text-align: center; + margin-bottom: 30px; +` +const DetailText = styled(Text)` + font-size: 14px; + color: #666666; + margin-bottom: 6px; +` + +const AuctionRule: React.FC = () => { + const { t } = useTranslation() + + return ( + + {t('Auction rule')} + + {t('1. When the countdown is less than 1 hour, the countdown time will be increased by 1 hour each time')} + + + {t( + '2. Each auction has a fixed 10% markup. After the countdown, the item will be awarded to the bidder who made the last bid', + )} + + {t('3. After the auction is successful')} + + {t( + '4. After the auction, the publisher or the last bidder will collect revenue or NFT in the auction history. After one party of the bidder or the publisher receives revenue or NFT, the other party will automatically receive the corresponding revenue or NFT', + )} + + + {t('5. NFT shall not be traded or transferred after the auction is issued by the issuer')} + + + ) +} + +export default AuctionRule diff --git a/src/views/Bazaar/components/AuctionTable.tsx b/src/views/Bazaar/components/AuctionTable.tsx new file mode 100644 index 0000000..6ade69d --- /dev/null +++ b/src/views/Bazaar/components/AuctionTable.tsx @@ -0,0 +1,103 @@ +import React, { useState } from 'react' +import styled from 'styled-components' +import { Text, Flex } from '@pancakeswap/uikit' +import { useTranslation } from 'contexts/Localization' + +const FlexMain = styled.div` + margin-top: 30px; + height: 405px; + background: #fff; + font-size: 18px; + color: #999999; + z-index: 9999; + position: relative; + background: #fff; + box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.16); + border-radius: 20px; +` +const HeaderText = styled(Text)` + font-size: 24px; + color: #333333; + text-align: center; + padding: 30px 0; +` + +const TableThemed = styled(Flex)` + height: 42px; + align-items: center; +` +const ThemedItem = styled.div` + width: 100%; + height: 42px; + line-height: 42px; + text-align: center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 16px; + color: #666666; + border-top: 1px solid #e3e3e3; +` +const TableBody = styled.div`` +const TrFlex = styled(Flex)` + height: 42px; + border-top: 1px solid #e3e3e3; + align-items: center; + /* flex-wrap: wrap; */ +` +const TdFlex = styled(Flex)` + align-items: center; + justify-content: center; + width: 100%; + color: #666666; + font-size: 16px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +` + +const AuctionTable: React.FC = () => { + const { t } = useTranslation() + + const ThemedList = [t('The wallet address'), 'HASH', t('auction price'), t('The auction time'), t('state')] + + const list = [ + { + name: 'Cat goddess Emerald ', + icon: '', + price: '1', + newPrice: '2', + time: '2022-02-02', + status: '已售卖', + id: '1', + }, + ] + + return ( + + {t('Auctions a record')} + <> + + {ThemedList.map((item) => { + return {item} + })} + + + {list.map((item) => { + return ( + + {item.name} + {item.price} + {item.newPrice} + {item.time} + {item.status} + + ) + })} + + + + ) +} + +export default AuctionTable diff --git a/src/views/Bazaar/components/Content.tsx b/src/views/Bazaar/components/Content.tsx new file mode 100644 index 0000000..040e26c --- /dev/null +++ b/src/views/Bazaar/components/Content.tsx @@ -0,0 +1,325 @@ +import React, { useState, useEffect } from 'react' +import styled, { keyframes } from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import Pagination from '@mui/material/Pagination' +import { Flex, Text, Input, Image, Dropdown } from '@pancakeswap/uikit' +import { useAccount } from 'state/userInfo/hooks' +import useRefresh from 'hooks/useRefresh' + +import { useGetOfficialPage } from '../hooks' +import HeaderOperation from './HeaderOperation' +import ContentShop from './ContentShop' +import Transaction from './Transaction' +import ShopDetail from './ShopDetail' + +interface ListProps { + coverResource?: CoverResourceProps + grade?: string + id?: string + name?: string + price?: undefined + priceList?: PriceProps[] + type?: string +} +interface CoverResourceProps { + path?: string + url?: string +} +interface PriceProps { + label?: string + value?: string +} + +const HeaderFlex = styled(Flex)` + width: 100%; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; +` +const TypeFlex = styled(Flex)` + width: 330px; + height: 40px; + justify-content: space-between; + align-items: center; + border: 1px solid #1fc7d4; + border-radius: 30px; + & > .active { + color: #fff; + background: linear-gradient(180deg, #7be0fc 0%, #9961f0 100%); + } +` +const TypeItem = styled(Flex)` + width: 110px; + height: 40px; + font-size: 14px; + color: #1fc7d4; + justify-content: center; + align-items: center; + cursor: pointer; + border-radius: 30px; +` +const StatusFlex = styled(Flex)` + justify-content: space-between; + align-items: center; + flex-wrap: wrap; + margin-top: 30px; +` +const StatusFlexContent = styled(Flex)` + align-items: center; + flex-wrap: wrap; + & > .statusActive { + background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); + color: #fff; + } +` +const StatusFlexItem = styled(Flex)` + flex-wrap: wrap; + align-items: center; + justify-content: center; + margin-right: 20px; + width: 104px; + height: 40px; + border: 1px solid #1fc7d4; + border-radius: 30px; + font-size: 12px; + color: #1fc7d4; + margin-bottom: 5px; + cursor: pointer; +` +const SearchDiv = styled(Flex)` + box-sizing: border-box; + width: 270px; + align-items: center; + justify-content: center; + margin: 30px 0 35px 0; +` + +const InputMain = styled(Flex)` + width: 100%; + height: 45px; + border: 1px solid #1fc7d4; + border-radius: 30px; + box-sizing: border-box; + align-items: center; + justify-content: space-between; + padding: 0 4px; +` + +const SearchInput = styled(Input)` + background-color: transparent; + width: calc(100% - 80px); + :focus { + } +` +const SearchBtn = styled.div` + width: 50px; + height: 37px; + background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); + border-radius: 19px; + display: flex; + align-items: center; + justify-content: center; +` + +const SelectFlex = styled(Flex)` + align-items: center; + cursor: pointer; +` +const SelectMain = styled(Flex)` + z-index: 999; + width: 120px; +` +const SelectText = styled(Text)` + font-size: 16px; + width: 120px; + color: #666666; + margin-left: 4px; +` +const FlexOption = styled(Flex)` + align-items: center; + justify-content: center; + width: 120px; + height: 40px; + cursor: pointer; + z-index: 999; +` + +const Content: React.FC = () => { + const { t } = useTranslation() + const [detailVisible, setDetailVisible] = useState(false) + const typeList = [ + { label: t('All'), type: 1 }, + { label: t('bazaar'), type: 2 }, + { label: t('auction'), type: 3 }, + ] + const [typeIndex, setTypeIndex] = useState(0) + const auctionList = [ + { label: t('In the auction'), value: '0' }, + { label: t('traded'), value: '1' }, + ] + const [auctionSelect, setAuctionSelect] = useState({ label: t('In the auction'), value: '0' }) + const newPrice = [ + { label: t('The latest offer'), value: '0' }, + { label: t('latest release'), value: '1' }, + { label: t('end time'), value: '2' }, + { label: t('Prices go from low to high'), value: '3' }, + { label: t('Prices go from high to low'), value: '4' }, + ] + const [priceSelect, setPriceSelect] = useState({ label: t('The latest offer'), value: '0' }) + const [searchTitle, setSearchTitle] = useState('') + + const [list, setList] = useState([]) + const statusList = [ + { label: t('All'), id: '1' }, + { label: t('epic'), id: '2' }, + { label: t('legend'), id: '3' }, + { label: t('uncommon'), id: '4' }, + { label: t('common'), id: '5' }, + ] + const [statusIndex, setStatusIndex] = useState(0) + + const [pageNum, setPage] = useState(1) + + const [count, setCount] = useState(undefined) + + const getOfficialPage = useGetOfficialPage() + + const getData = async () => { + const params = { + page: pageNum, + size: 10, + } + const data = await getOfficialPage(params) + const arr = [] + data.content.forEach((item) => { + const obj = item + obj.priceList = [] + Object.keys(obj.price).forEach((childItem) => { + obj.priceList.push({ label: childItem, value: obj.price[childItem] }) + }) + obj.price = undefined + arr.push(obj) + }) + setList(arr) + setCount(getTotalPageNum(data.total, data.size)) + } + + useEffect(() => { + getData() + }, [pageNum]) + + const handleChange = (evt: React.ChangeEvent) => { + const { value } = evt.target + setSearchTitle(value) + } + const searchList = () => { + console.log('search') + } + const showDetail = () => { + setDetailVisible(!detailVisible) + } + const pageChange = (e, page) => { + setPage(page) + } + const getTotalPageNum = (total, pageSize) => { + const countTotal = ((Number(total) + Number(pageSize) - 1) / Number(pageSize)).toString() + return parseInt(countTotal) + } + + return ( + <> + {detailVisible && } + + {!detailVisible && ( + <> + + + {typeList.map((item, index) => { + return ( + setTypeIndex(index)} + className={typeIndex === index ? 'active' : ''} + > + {item.label} + + ) + })} + + + + + + + + {statusList.map((item, index) => { + return ( + setStatusIndex(index)} + className={statusIndex === index ? 'statusActive' : ''} + > + {item.label} + + ) + })} + + + + + + {auctionSelect.label} + + } + > + {auctionList.map((item) => { + return ( + setAuctionSelect(item)}> + {item.label} + + ) + })} + + + + + + {priceSelect.label} + + } + > + {newPrice.map((item) => { + return ( + setPriceSelect(item)}> + {item.label} + + ) + })} + + + + + + + + + + + + + + + + + + )} + + ) +} +export default Content diff --git a/src/views/Bazaar/components/ContentShop.tsx b/src/views/Bazaar/components/ContentShop.tsx new file mode 100644 index 0000000..ea990d5 --- /dev/null +++ b/src/views/Bazaar/components/ContentShop.tsx @@ -0,0 +1,125 @@ +import React, { useState, useEffect } from 'react' +import styled, { keyframes } from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { formatTimeNumber } from 'utils/formatBalance' +import { Flex, Text, Image } from '@pancakeswap/uikit' +import { useAccount } from 'state/userInfo/hooks' +import useRefresh from 'hooks/useRefresh' +import { TOKEN_SYMBOL } from 'config/index' + +import ShopList from './ShopList' + +interface ContentShop { + list?: ListProps[] + getDetail?: () => void +} + +interface ListProps { + coverResource?: CoverResourceProps + grade?: string + id?: string + name?: string + price?: undefined + priceList?: PriceProps[] + type?: string +} +interface CoverResourceProps { + path?: string + url?: string +} +interface PriceProps { + label?: string + value?: string +} +const ShopMain = styled.div` + width: 100%; + display: grid; + gap: 18px; + grid-template-rows: 1fr; + margin: 0px auto; + grid-template-columns: repeat(4, 1fr); + box-sizing: border-box; + cursor: pointer; + ${({ theme }) => theme.mediaQueries.xs} { + grid-template-columns: repeat(2, 1fr); + } + ${({ theme }) => theme.mediaQueries.md} { + grid-template-columns: repeat(3, 1fr); + } + ${({ theme }) => theme.mediaQueries.lg} { + grid-template-columns: repeat(4, 1fr); + } +` +const ShopFlex = styled(Flex)` + flex-direction: column; + background: rgba(255, 255, 255, 0.39); + box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.15); + opacity: 1; + border-radius: 20px; + position: relative; +` + +const ShopName = styled(Text)` + padding: 10px 0 14px 0; + text-align: center; + font-size: 18px; + color: #666666; + border-bottom: 1px solid #e3e3e3; +` +const ShopFooter = styled(Flex)` + padding: 15px; + justify-content: space-between; +` +const FooterLabel = styled(Text)` + font-size: 14px; + color: #999999; +` +const FooterValue = styled(Text)` + width: 40%; + font-size: 16px; + color: #1fc7d4; +` + +const ContentShop: React.FC = ({ list, getDetail }) => { + const { t } = useTranslation() + + const showDetail = () => { + getDetail() + } + + return ( + + {list.map((item) => { + return ( + + + {item.name} + + {t('trading value')} + + {item.priceList.map((childItem, index) => { + return ( + + {/* <>{formatTimeNumber(childItem.value)} */} + <>{Number(childItem.value).toFixed(2)} + {childItem.label} + {index === 0 && item.priceList.length === 2 && -} + + ) + })} + + + + ) + })} + + ) +} +export default ContentShop diff --git a/src/views/Bazaar/components/FlexCom.tsx b/src/views/Bazaar/components/FlexCom.tsx new file mode 100644 index 0000000..00ba00f --- /dev/null +++ b/src/views/Bazaar/components/FlexCom.tsx @@ -0,0 +1,58 @@ +import React from 'react' +import styled from 'styled-components' +import { Flex, Text, Link } from '@pancakeswap/uikit' + +interface FlexProps { + name: string + value: string + paddings?: string + leftColor?: string + rightColor?: string + typeLink?: string + size?: string + textColor?: string + rightSize?: string +} + +const FlexDiv = styled(Flex)` + justify-content: space-between; + align-items: center; + margin-top: 14px; +` +const TextLink = styled(Text)` + cursor: pointer; +` + +const FlexCom: React.FC = ({ + name, + value, + paddings = '0px', + leftColor = '#666666', + rightColor = 'textSubtle', + typeLink, + size = '14px', + textColor = '#666666', + rightSize = '14px', +}) => { + const openPage = () => { + window.open(typeLink) + } + + return ( + + {name} + {typeLink ? ( + + {value} + + ) : ( + {value} + )} + + ) +} +export default FlexCom diff --git a/src/views/Bazaar/components/HeaderOperation.tsx b/src/views/Bazaar/components/HeaderOperation.tsx new file mode 100644 index 0000000..6724deb --- /dev/null +++ b/src/views/Bazaar/components/HeaderOperation.tsx @@ -0,0 +1,56 @@ +import React, { useState, useEffect } from 'react' +import styled, { keyframes } from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Flex, Button, Text, Input, Image, useModal, Dropdown } from '@pancakeswap/uikit' +import { useAccount } from 'state/userInfo/hooks' +import useRefresh from 'hooks/useRefresh' + +import TransactionRecord from './TransactionRecord' +import AuctionRecord from './AuctionRecord' +import SellModal from './SellModal' + +interface HeaderOperationProps { + activeIndex?: number +} + +const HeaderButton = styled(Button)` + width: 110px; + height: 40px; + border: 1px solid #1fc7d4; + border-radius: 30px; + font-size: 14px; + color: #1fc7d4; + background-color: #fff; + + ${({ theme }) => theme.mediaQueries.xs} { + margin-top: 10px; + margin-right: 20px; + margin-left: 0px; + } + ${({ theme }) => theme.mediaQueries.lg} { + margin-top: 0px; + margin-left: 20px; + margin-right: 0px; + } +` + +const HeaderOperation: React.FC = ({ activeIndex }) => { + const { t } = useTranslation() + + const [onTransactionRecord] = useModal() + const [onAuctionRecord] = useModal() + const [onSellModal] = useModal() + + return ( + + {t('I sell')} + {/* 当顶部切换选中的是全部和市场则显示交易记录,选中拍卖时展示拍卖纪录 */} + {activeIndex === 2 ? ( + {t('Auctions a record')} + ) : ( + {t('transaction record')} + )} + + ) +} +export default HeaderOperation diff --git a/src/views/Bazaar/components/SellModal.tsx b/src/views/Bazaar/components/SellModal.tsx new file mode 100644 index 0000000..d9d8c3f --- /dev/null +++ b/src/views/Bazaar/components/SellModal.tsx @@ -0,0 +1,357 @@ +import React, { useState } from 'react' +import styled from 'styled-components' +import { Text, Button, Image, Input, Flex, Dropdown } from '@pancakeswap/uikit' +import { useTranslation } from 'contexts/Localization' +import ShopList from './ShopList' +import ShopModal from './ShopModal' + +interface sellModalProps { + onDismiss?: () => void +} + +const FlexMain = styled.div` + width: 70%; + min-height: 598px; + overflow-y: auto; + background: #fff; + font-size: 18px; + color: #999999; + z-index: 9999; + border-radius: 15px; + position: relative; + ${({ theme }) => theme.mediaQueries.xs} { + width: 90%; + } + ${({ theme }) => theme.mediaQueries.lg} { + width: 70%; + } +` +const CloseImage = styled(Image)` + cursor: pointer; + position: absolute; + top: 30px; + right: 30px; +` +const HeaderText = styled(Text)` + font-size: 24px; + color: #333333; + margin-top: 40px; + text-align: center; +` +const SelectFlex = styled(Flex)` + align-items: center; + justify-content: space-between; + flex-wrap: wrap; + padding: 35px 100px 30px 100px; + border-bottom: 1px solid #e3e3e3; + ${({ theme }) => theme.mediaQueries.xs} { + justify-content: center; + } + ${({ theme }) => theme.mediaQueries.lg} { + justify-content: space-between; + } +` +const SellingWayFlex = styled(Flex)` + align-items: center; + justify-content: space-between; + width: 400px; + height: 35px; + background: #eeeaf4; + border: 1px solid #d7caec; + border-radius: 18px; + padding: 0 15px; + color: #666666; + font-size: 16px; + ${({ theme }) => theme.mediaQueries.xs} { + width: 280px; + } + ${({ theme }) => theme.mediaQueries.lg} { + width: 400px; + } +` +const WayFlex = styled(Flex)` + width: 400px; + flex-direction: column; +` +const FlexOption = styled(Flex)` + align-items: center; + justify-content: center; + width: 400px; + height: 40px; + cursor: pointer; + + ${({ theme }) => theme.mediaQueries.xs} { + width: 280px; + } + ${({ theme }) => theme.mediaQueries.lg} { + width: 400px; + } +` +const SellInput = styled(Input)` + margin-top: 20px; + width: 400px; + height: 35px; + background: #eeeaf4; + border: 1px solid #d7caec; + border-radius: 18px; + + ${({ theme }) => theme.mediaQueries.xs} { + width: 280px; + } + ${({ theme }) => theme.mediaQueries.lg} { + width: 400px; + } +` +const FlexPrice = styled(Flex)` + width: 500px; + flex-wrap: wrap; + align-items: center; + + ${({ theme }) => theme.mediaQueries.xs} { + width: 100%; + justify-content: center; + margin-top: 10px; + } + ${({ theme }) => theme.mediaQueries.lg} { + width: 500px; + justify-content: flex-start; + } +` +const TransactionMain = styled(Flex)` + align-items: center; + ${({ theme }) => theme.mediaQueries.xs} { + margin-top: 10px; + } + ${({ theme }) => theme.mediaQueries.lg} { + margin-top: 0px; + } +` +const PriceItem = styled(Flex)` + width: 180px; + /* margin-right: 80px; */ + flex-direction: column; +` +const FlexCoinOption = styled(Flex)` + align-items: center; + justify-content: center; + width: 180px; + height: 40px; + cursor: pointer; +` +const PriceWay = styled(Flex)` + align-items: center; + justify-content: space-between; + width: 180px; + height: 35px; + background: #eeeaf4; + border: 1px solid #d7caec; + border-radius: 18px; + padding: 0 15px; + color: #666666; + font-size: 16px; +` +const PriceInput = styled(Input)` + width: 180px; + height: 35px; + margin-top: 20px; +` +const AddButton = styled(Button)` + width: 140px; + height: 35px; + border: 1px solid #1fc7d4; + border-radius: 30px; + font-size: 14px; + color: #1fc7d4; + background-color: #fff; + margin-left: 80px; + + ${({ theme }) => theme.mediaQueries.xs} { + margin-left: 0px; + margin-top: 10px; + } + ${({ theme }) => theme.mediaQueries.lg} { + margin-left: 80px; + margin-top: 0px; + } +` +const Shop = styled(Flex)` + /* min-height: 366px; */ + padding: 30px 0; + align-items: center; + justify-content: center; + flex-direction: column; +` +const AddNftButton = styled(Button)` + width: 176px; + height: 42px; + background: linear-gradient(269deg, #1fc8d3 0%, #1fd4b0 100%); + border-radius: 21px; + color: #fff; + font-size: 14px; +` +const PriceImage = styled(Image)` + margin: 0 10px; + width: 20px; + height: 20px; + cursor: pointer; +` +const ShopFlex = styled(Flex)` + width: 278px; + flex-direction: column; + background: #fff; + box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.15); + opacity: 1; + border-radius: 20px; + position: relative; +` + +const ShopName = styled(Text)` + padding: 26px 0; + text-align: center; + font-size: 18px; + color: #666666; + background: #fff; + border-radius: 0 0 20px 20px; +` +const ShopButton = styled(Button)` + width: 176px; + height: 42px; + background: linear-gradient(269deg, #1fc8d3 0%, #1fd4b0 100%); + border-radius: 20px; + font-size: 14px; + color: #ffffff; + margin-top: 20px; +` +const SelectShopModal = styled(Flex)` + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + align-items: center; + justify-content: center; + background: rgba(31, 11, 117, 0.39); + z-index: 999; + /* background-color: #7a6eaa; */ +` + +const SellModal: React.FC = ({ onDismiss }) => { + const { t } = useTranslation() + const [tradingOnList, setTradingOnList] = useState([{ price: '', value: 'HCC', id: 1 }]) + const [sellingWay, setSellingWay] = useState(undefined) + const [coin, setCoin] = useState({ label: 'HCC', value: 'HCC' }) + const [shopData, setShopData] = useState({ label: 'Cat goddess Emerald ', type: 1, id: 1 }) + const [showModal, setShowModal] = useState(false) + + const coinList = [ + { label: 'HCC', value: 'HCC' }, + { label: 'USDT', value: 'USDT' }, + ] + + const SellingWayList = [ + { label: t('Auction'), value: '0' }, + { label: t('fixed price'), value: '1' }, + ] + + const selectTradingOn = (index, value) => { + tradingOnList[index].value = value + setTradingOnList([...tradingOnList]) + } + const addTradingOn = () => { + tradingOnList.push({ price: '', value: 'HCC', id: 2 }) + setTradingOnList([...tradingOnList]) + } + const reduceTradingOn = () => { + tradingOnList.splice(1, 1) + setTradingOnList([...tradingOnList]) + } + + const onSelectNft = () => { + setShowModal(!showModal) + } + const close = () => { + setShowModal(false) + } + + return ( + + + {t('sell NFT')} + + + + {sellingWay ? sellingWay.label : t('Selling way')} + + + } + > + {SellingWayList.map((item) => { + return ( + setSellingWay(item)}> + {item.label} + + ) + })} + + {sellingWay?.value === '0' && } + + + <> + {tradingOnList.map((item, index) => { + return ( + + + + {item.value} + + + } + > + {coinList.map((coinItem) => { + return ( + selectTradingOn(index, coinItem.value)}> + {coinItem.label} + + ) + })} + + + + {index === 0 && tradingOnList.length === 2 && ( + + )} + {index === 1 && ( + + )} + + ) + })} + + {tradingOnList.length < 2 && {t('Add as a trading pair')}} + + + + {/* {t('add NFT)} */} + + + {shopData.label} + + {t('Selling immediately')} + {t('reselect NFT')} + + {showModal && ( + + + + )} + + ) +} + +export default SellModal diff --git a/src/views/Bazaar/components/ShopDetail.tsx b/src/views/Bazaar/components/ShopDetail.tsx new file mode 100644 index 0000000..5eb4fa4 --- /dev/null +++ b/src/views/Bazaar/components/ShopDetail.tsx @@ -0,0 +1,133 @@ +import React, { useState, useEffect } from 'react' +import styled, { keyframes } from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Heading, Flex, Button, Text, Input, Image, useModal } from '@pancakeswap/uikit' +import { useAccount } from 'state/userInfo/hooks' +import useRefresh from 'hooks/useRefresh' +import ShopList from './ShopList' +import FlexCom from './FlexCom' +import AuctionTable from './AuctionTable' +import TransactionTable from './TransactionTable' +import AuctionRule from './AuctionRule' + +interface DetailProps { + close: () => void +} + +const HeaderFlex = styled(Flex)` + width: 100%; + align-items: center; +` +const FirstText = styled(Text)` + font-size: 16px; + color: #1fc7d4; + cursor: pointer; +` +const ShopText = styled(Text)` + color: #666666; + font-size: 16px; + cursor: pointer; +` +const MainFlex = styled(Flex)` + margin-top: 36px; + padding: 30px; + background: rgba(255, 255, 255, 0.39); + box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.16); + border-radius: 20px; + align-items: center; + justify-content: space-between; + ${({ theme }) => theme.mediaQueries.xs} { + flex-wrap: wrap; + justify-content: center; + } + ${({ theme }) => theme.mediaQueries.lg} { + flex-wrap: nowrap; + justify-content: space-between; + } +` +const ShopFlex = styled(Flex)` + width: 476px; + flex-direction: column; + background: #fff; + box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.15); + opacity: 1; + border-radius: 20px; + position: relative; +` +const Detail = styled.div` + width: 614px; + min-height: 580px; + box-sizing: border-box; + background: rgba(245, 255, 255, 0.39); + box-shadow: 0px 2px 8px rgba(0, 67, 70, 0.15); + border-radius: 20px; + padding: 20px 30px; + margin-left: 30px; + ${({ theme }) => theme.mediaQueries.xs} { + margin-top: 30px; + margin-left: 0px; + width: 482px; + } + ${({ theme }) => theme.mediaQueries.lg} { + margin-left: 30px; + width: 614px; + } +` +const TitleText = styled(Text)` + font-size: 28px; + color: #333333; + text-align: center; + margin-top: 8px; +` +const PriceButton = styled(Button)` + width: 100%; + height: 60px; + background: linear-gradient(269deg, #1fc8d3 0%, #1fd4b0 100%); + border-radius: 30px; + font-size: 16px; + margin: 30px 0; +` + +const ShopDetail: React.FC = ({ close }) => { + const { t } = useTranslation() + + const [shopData, setShopData] = useState({ label: 'Cat goddess Emerald ', type: 1, id: 1 }) + return ( + <> + + {t('Bazaar')} + > Crumb 1 + + + + + + + + + + Cat goddess Emerald + + + {t('Fixed markup (%price% premium)', { price: '10%' })} + + + + + + + + + + + + + ) +} +export default ShopDetail diff --git a/src/views/Bazaar/components/ShopList.tsx b/src/views/Bazaar/components/ShopList.tsx new file mode 100644 index 0000000..d39180a --- /dev/null +++ b/src/views/Bazaar/components/ShopList.tsx @@ -0,0 +1,146 @@ +import React, { useState, useEffect } from 'react' +import styled, { keyframes } from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Flex, Image } from '@pancakeswap/uikit' + +const MainFlex = styled.div` + & > .epicBcg { + background-color: #ffd7d7; + } + & > .legendBcg { + background-color: #d7d7ff; + } + & > .uncommonBcg { + background-color: #cdf7d2; + } + & > .commonBcg { + background-color: #daf0ff; + } + + ${({ theme }) => theme.mediaQueries.xs} { + flex-direction: column; + } + ${({ theme }) => theme.mediaQueries.md} { + flex-direction: row; + } + ${({ theme }) => theme.mediaQueries.lg} { + flex-direction: row; + } +` + +const ShopItem = styled(Flex)` + background: rgba(255, 255, 255, 0.39); + box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.15); + flex-direction: column; + position: relative; + overflow: hidden; + cursor: pointer; + + & > .ribbon { + width: 106px; + height: 108px; + overflow: hidden; + position: absolute; + top: -6px; + left: -6px; + z-index: 10; + & > .ribbon1 { + line-height: 14px; + text-align: center; + transform: rotate(-45deg); + position: relative; + padding: 2px 0; + left: -36px; + top: 14px; + width: 121px; + color: white; + box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1); + letter-spacing: 1px; + font-size: 12px; + } + & > .epic { + background: linear-gradient(-90deg, #efea48 0%, #f32121 100%); + } + & > .legend { + background: linear-gradient(-90deg, #4b84f5 0%, #bc21f3 100%); + } + & > .uncommon { + background: linear-gradient(-90deg, #3dffec 0%, #24bf52 100%); + } + & > .common { + background: linear-gradient(-90deg, #b5e9f3 0%, #1195d9 100%); + } + } +` +const ItemText = styled(Flex)` + padding: 25px 0; + justify-content: center; +` + +interface ShopListItemProps { + item?: Detail + width?: number + height?: number + borderRadius?: string + grade?: string + img?: string +} +interface Detail { + label?: string + type?: number | string + id?: number | string +} + +const ShopList: React.FC = ({ + item, + width = 186, + height = 187, + borderRadius = '20px', + img, + grade, +}) => { + const { t } = useTranslation() + const getClassBcg = () => { + let bcg = '' + switch (grade) { + case 'EPIC': + bcg = 'epicBcg' + break + case 'LEGEND': + bcg = 'legendBcg' + break + case 'RARE': + bcg = 'uncommonBcg' + break + case 'NORMAL': + bcg = 'commonBcg' + break + default: + bcg = 'epicBcg' + } + return bcg + } + + return ( + + +
+ {grade === 'EPIC' &&
{t('epic')}
} + {grade === 'LEGEND' &&
{t('legend')}
} + {grade === 'RARE' &&
{t('uncommon')}
} + {grade === 'NORMAL' &&
{t('common')}
} +
+ {/* {item.type === 1 && } + {item.type === 2 && } + {item.type === 3 && } + {item.type === 4 && } */} + {img ? ( + + ) : ( + + )} +
+
+ ) +} +export default ShopList diff --git a/src/views/Bazaar/components/ShopModal.tsx b/src/views/Bazaar/components/ShopModal.tsx new file mode 100644 index 0000000..eafaaea --- /dev/null +++ b/src/views/Bazaar/components/ShopModal.tsx @@ -0,0 +1,150 @@ +import React, { useState, useEffect } from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Flex, Text, Button } from '@pancakeswap/uikit' +import ShopList from './ShopList' + +interface ShopProp { + name?: string | number + value?: string | number + onDismiss?: () => void + close: () => void +} + +const Main = styled.div` + width: 60%; + background-color: #fff; + padding: 30px 15px; + border-radius: 30px; + /* height: 80%; */ + z-index: 10; +` +const Shop = styled.div` + width: 100%; + display: grid; + gap: 18px; + grid-template-rows: 1fr; + margin: 0px auto; + grid-template-columns: repeat(4, 1fr); + box-sizing: border-box; + & > .active { + border: 3px solid #0deeff; + } + + ${({ theme }) => theme.mediaQueries.xs} { + grid-template-columns: repeat(2, 1fr); + } + ${({ theme }) => theme.mediaQueries.md} { + grid-template-columns: repeat(3, 1fr); + } + ${({ theme }) => theme.mediaQueries.lg} { + grid-template-columns: repeat(4, 1fr); + } +` +const ShopFlex = styled(Flex)` + flex-direction: column; + background: rgba(255, 255, 255, 0.39); + box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.15); + opacity: 1; + border-radius: 20px; + position: relative; +` +const ShopName = styled(Text)` + padding: 26px 0; + text-align: center; + font-size: 18px; + color: #666666; +` + +const SelectFlex = styled(Flex)` + position: absolute; + top: 10px; + right: 10px; + width: 30px; + height: 30px; + background: #fff; + border-radius: 50%; + z-index: 9; + align-items: center; + justify-content: center; +` +const SelectDiv = styled.div` + width: 15px; + height: 15px; + background: #0deeff; + border-radius: 50%; + margin-left: 1px; + margin-top: -1px; +` +const BtnFlex = styled(Flex)` + margin-top: 30px; + align-items: center; + flex-direction: column; +` +const AddButton = styled(Button)` + width: 176px; + height: 42px; + background: linear-gradient(269deg, #1fc8d3 0%, #1fd4b0 100%); + border-radius: 21px; + font-size: 14px; + color: #ffffff; +` +const OutButton = styled(Button)` + width: 176px; + height: 42px; + border: 1px solid #1fc7d4; + background-color: #fff; + border-radius: 21px; + color: #1fc7d4; + font-size: 14px; + margin-top: 20px; +` + +const ShopModal: React.FC = ({ name, value, onDismiss, close }) => { + const { t } = useTranslation() + const [list, setList] = useState([]) + + const pitchOn = (index) => { + const arr = [] + list.forEach((item, i) => { + const obj = item + obj.select = i === index ? !obj.select : false + arr.push(obj) + }) + setList([...arr]) + } + const onClose = () => { + close() + } + + useEffect(() => { + setList([ + { label: 'Cat goddess Emerald ', type: 1, id: 1, select: true }, + { label: 'Cat goddess Emerald ', type: 2, id: 2, select: false }, + { label: 'Cat goddess Emerald ', type: 3, id: 3, select: false }, + { label: 'Cat goddess Emerald ', type: 4, id: 4, select: false }, + { label: 'Cat goddess Emerald ', type: 1, id: 5, select: false }, + ]) + }, []) + + return ( +
+ + {list.map((item, index) => { + return ( + pitchOn(index)} className={item.select ? 'active' : ''}> + {item.select && } + + {item.label} + + ) + })} + + + {t('add NFT')} + {t('Sign out')} + +
+ ) +} +export default ShopModal diff --git a/src/views/Bazaar/components/Transaction.tsx b/src/views/Bazaar/components/Transaction.tsx new file mode 100644 index 0000000..529d939 --- /dev/null +++ b/src/views/Bazaar/components/Transaction.tsx @@ -0,0 +1,74 @@ +import React, { useState, useEffect } from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Flex, Text } from '@pancakeswap/uikit' +import { useAccount } from 'state/userInfo/hooks' +import useRefresh from 'hooks/useRefresh' + +const TransactionFlex = styled(Flex)` + margin-top: 30px; + background: linear-gradient(269deg, #1fc8d3 0%, #1fd4b0 100%); + border-radius: 13px; + padding: 30px 0px 40px 0px; + justify-content: space-between; + align-items: center; + ${({ theme }) => theme.mediaQueries.xs} { + flex-direction: column; + } + ${({ theme }) => theme.mediaQueries.lg} { + flex-direction: row; + } +` +const TransactionItem = styled(Flex)` + width: 25%; + flex-direction: column; + justify-content: center; + align-items: center; +` +const TransactionItemNum = styled(Text)` + font-size: 38px; + color: #ffffff; +` +const TransactionItemLabel = styled(Text)` + font-size: 16px; + color: #e4f8f7; +` +const Separate = styled.div` + height: 44px; + border-right: 1px solid #e4f8f7; + ${({ theme }) => theme.mediaQueries.xs} { + display: none; + } + ${({ theme }) => theme.mediaQueries.lg} { + display: block; + } +` + +const Transaction: React.FC = () => { + const { t } = useTranslation() + + return ( + + + 1.000000 + {t('The total volume')} + + + + 1.000000 + {t('The total number of transactions')} + + + + 1.000000 + {t('Total number of auctions')} + + + + 1.000000 + {t('Total auction commission')} + + + ) +} +export default Transaction diff --git a/src/views/Bazaar/components/TransactionRecord.tsx b/src/views/Bazaar/components/TransactionRecord.tsx new file mode 100644 index 0000000..60a2791 --- /dev/null +++ b/src/views/Bazaar/components/TransactionRecord.tsx @@ -0,0 +1,179 @@ +import React, { useState } from 'react' +import styled from 'styled-components' +import { Text, Button, Image, Flex } from '@pancakeswap/uikit' +import { useTranslation } from 'contexts/Localization' + +interface TransactionRecordProps { + onDismiss?: () => void +} + +const FlexMain = styled.div` + width: 70%; + height: 658px; + background: #fff; + font-size: 18px; + color: #999999; + z-index: 9999; + border-radius: 15px; + position: relative; +` +const CloseImage = styled(Image)` + cursor: pointer; + position: absolute; + top: 30px; + right: 30px; +` +const HeaderText = styled(Text)` + font-size: 24px; + color: #333333; + margin-top: 40px; + text-align: center; +` + +const TypeFlex = styled(Flex)` + flex-wrap: wrap; + align-items: center; + margin-top: 35px; + padding-left: 30px; + & > .active { + background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); + color: #fff; + } +` +const TypeItem = styled(Flex)` + width: 128px; + height: 42px; + border: 1px solid #1fc7d4; + border-radius: 30px; + align-items: center; + justify-content: center; + font-size: 12px; + color: #1fc7d4; + margin-right: 15px; + cursor: pointer; +` +const TableThemed = styled(Flex)` + margin-top: 30px; + height: 56px; + align-items: center; + flex-wrap: wrap; +` +const ThemedItem = styled.div` + width: 20%; + height: 56px; + line-height: 56px; + text-align: center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 16px; + color: #666666; + border-top: 1px solid #e3e3e3; +` +const TableBody = styled.div`` +const TrFlex = styled(Flex)` + padding: 10px 0; + border-top: 1px solid #e3e3e3; + align-items: center; + flex-wrap: wrap; +` +const TdFlex = styled(Flex)` + align-items: center; + justify-content: center; + flex-wrap: wrap; + width: 20%; + color: #666666; + font-size: 14px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +` +const TdImage = styled(Image)` + margin-right: 20px; +` +const TdBtnFlex = styled(Flex)` + width: 20%; + flex-direction: column; + justify-content: center; + align-items: center; +` +const DetailButton = styled(Button)` + width: 80px; + height: 30px; + background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); + border-radius: 30px; + font-size: 12px; +` +const HashText = styled(Text)` + cursor: pointer; + font-size: 14px; + color: #1fc7d4; + margin-top: 5px; + border-bottom: 1px solid #1fc7d4; +` + +const TransactionRecord: React.FC = ({ onDismiss }) => { + const { t } = useTranslation() + + const typeList = [ + { label: t('All transactions'), value: '1' }, + { label: t('on offer'), value: '2' }, + { label: t('be sold'), value: '3' }, + { label: t('have bought'), value: '4' }, + ] + const [typeIndex, setTypeIndex] = useState(0) + + const ThemedList = [t('NFT name'), t('price'), t('Time'), t('state'), t('operation')] + + const list = [ + { name: 'Cat goddess Emerald ', icon: '', price: '1', time: '2022-02-02', status: t('Has been selling'), id: '1' }, + ] + + return ( + + + {t('transaction record')} + + {typeList.map((item, index) => { + return ( + setTypeIndex(index)} + > + {item.label} + + ) + })} + + <> + + {ThemedList.map((item) => { + return {item} + })} + + + {list.map((item) => { + return ( + + + + {item.name} + + {item.price} + {item.time} + {item.status} + + {t('Detail')} + {t('deal Hash')} + + + ) + })} + + + + ) +} + +export default TransactionRecord diff --git a/src/views/Bazaar/components/TransactionTable.tsx b/src/views/Bazaar/components/TransactionTable.tsx new file mode 100644 index 0000000..b04ff4d --- /dev/null +++ b/src/views/Bazaar/components/TransactionTable.tsx @@ -0,0 +1,102 @@ +import React, { useState } from 'react' +import styled from 'styled-components' +import { Text, Flex } from '@pancakeswap/uikit' +import { useTranslation } from 'contexts/Localization' + +const FlexMain = styled.div` + margin-top: 30px; + height: 405px; + background: #fff; + font-size: 18px; + color: #999999; + z-index: 9999; + position: relative; + background: #fff; + box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.16); + border-radius: 20px; +` +const HeaderText = styled(Text)` + font-size: 24px; + color: #333333; + text-align: center; + padding: 30px 0; +` + +const TableThemed = styled(Flex)` + height: 42px; + align-items: center; +` +const ThemedItem = styled.div` + width: 100%; + height: 42px; + line-height: 42px; + text-align: center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 16px; + color: #666666; + border-top: 1px solid #e3e3e3; +` +const TableBody = styled.div`` +const TrFlex = styled(Flex)` + height: 42px; + border-top: 1px solid #e3e3e3; + align-items: center; +` +const TdFlex = styled(Flex)` + align-items: center; + justify-content: center; + width: 100%; + color: #666666; + font-size: 16px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +` + +const TransactionTable: React.FC = () => { + const { t } = useTranslation() + + const ThemedList = [t('incident'), t('unit price'), t('seller'), t('purchaser'), t('trading hour')] + + const list = [ + { + name: 'Cat goddess Emerald ', + icon: '', + price: '1', + newPrice: '2', + time: '2022-02-02', + status: '已售卖', + id: '1', + }, + ] + + return ( + + {t('Transaction history')} + <> + + {ThemedList.map((item) => { + return {item} + })} + + + {list.map((item) => { + return ( + + {item.name} + {item.price} + {item.newPrice} + {item.time} + {item.status} + + ) + })} + + + + ) +} + +export default TransactionTable diff --git a/src/views/Bazaar/hooks/index.ts b/src/views/Bazaar/hooks/index.ts new file mode 100644 index 0000000..4033c4a --- /dev/null +++ b/src/views/Bazaar/hooks/index.ts @@ -0,0 +1,12 @@ +import { useCallback } from 'react' +import { getOfficialPage } from 'services/bazaar' + +export const useGetOfficialPage = () => { + const data = async (params) => { + const result = await getOfficialPage(params) + return result + } + return data +} + +export default useGetOfficialPage diff --git a/src/views/Bazaar/index.tsx b/src/views/Bazaar/index.tsx new file mode 100644 index 0000000..c4f25e3 --- /dev/null +++ b/src/views/Bazaar/index.tsx @@ -0,0 +1,31 @@ +import React, { useState, useEffect } from 'react' +import styled from 'styled-components' +import Page from 'components/Layout/Page' +import { useAccount } from 'state/userInfo/hooks' +import useRefresh from 'hooks/useRefresh' +import { UnOpenModel } from 'components/Modal' +import Content from './components/Content' + +const PageContent = styled.div` + height: calc(100vh - 64px); + background-image: url('/images/home/bg.svg'); + background-size: cover; + background-repeat: no-repeat; + + /* background-image: url('/images/page/bazaar.jpg'); + background-position: 50%; + background-size: 50% 90%; + background-repeat: no-repeat; */ +` + +const Bazaar: React.FC = () => { + return ( + + + + + {/* */} + + ) +} +export default Bazaar diff --git a/src/views/BlindBox/component/FlexText.tsx b/src/views/BlindBox/component/FlexText.tsx new file mode 100644 index 0000000..109620a --- /dev/null +++ b/src/views/BlindBox/component/FlexText.tsx @@ -0,0 +1,28 @@ +import React from 'react' +import styled from 'styled-components' +import { Flex, Text } from '@pancakeswap/uikit' + +interface FlexProp { + name?: string | number + value?: string | number +} + +const MainFlex = styled(Flex)` + align-items: center; + margin-top: 12px; + padding: 0 20px; +` + +const FlexText: React.FC = ({ name, value }) => { + return ( + + + {name}: + + + {value} + + + ) +} +export default FlexText diff --git a/src/views/BlindBox/component/Header.tsx b/src/views/BlindBox/component/Header.tsx new file mode 100644 index 0000000..4d4da83 --- /dev/null +++ b/src/views/BlindBox/component/Header.tsx @@ -0,0 +1,90 @@ +import React, { useEffect } from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Flex, Text, useModal } from '@pancakeswap/uikit' +import SeriesDetail from './SeriesDetail' + +interface DetailProp { + beginTime?: string + coverResource: coverResourceProps + endTime?: string + id?: string + name?: string + priceList?: priceProps[] + price?: any + purchased?: string | number + total?: string | number + type?: string +} + +interface OperationProp { + detail: DetailProp +} +// interface listProps { +// beginTime?: string +// coverResource: coverResourceProps +// endTime?: string +// id?: string +// name?: string +// price: priceProps +// purchased?: string | number +// total?: string | number +// type?: string +// } +interface coverResourceProps { + path?: string + url?: string +} +interface priceProps { + label?: string + value?: string | number +} + +const HeaderFlex = styled(Flex)` + margin-top: 25px; + width: 100%; + align-items: center; + justify-content: space-between; +` +const TextKey = styled(Text)` + font-size: 22px; + color: #999999; +` +const TextVal = styled(Text)` + font-size: 22px; + color: #1fc7d4; + margin-left: 10px; +` + +const TipFlex = styled(Flex)` + width: 35px; + height: 35px; + background: rgba(237, 231, 246, 0.39); + border: 1px solid rgba(255, 255, 255, 0.14901960784313725); + box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1); + border-radius: 50%; + align-items: center; + justify-content: center; + font-size: 20px; + color: #666666; + margin-right: 20px; + z-index: 10; + cursor: pointer; +` + +const Header: React.FC = ({ detail }) => { + const { t } = useTranslation() + const [onSeriesDetail] = useModal() + + return ( + +
+ + {t('time remaining')} + {t('%hour%hour', { hour: 7 })} + + ? + + ) +} +export default Header diff --git a/src/views/BlindBox/component/Operation.tsx b/src/views/BlindBox/component/Operation.tsx new file mode 100644 index 0000000..606c166 --- /dev/null +++ b/src/views/BlindBox/component/Operation.tsx @@ -0,0 +1,88 @@ +import React, { useEffect, useState } from 'react' +import styled from 'styled-components' +import { formatTimeNumber } from 'utils/formatBalance' +import BigNumber from 'bignumber.js' +import { useTranslation } from 'contexts/Localization' +import { Flex, Text } from '@pancakeswap/uikit' +import { TOKEN_SYMBOL } from 'config/index' +import StepCom from './StepCom' + +interface DetailProp { + beginTime?: string + coverResource: coverResourceProps + endTime?: string + id?: string + name?: string + priceList?: priceProps[] + price?: any + purchased?: string | number + total?: string | number + type?: string +} + +interface OperationProp { + detail: DetailProp +} +interface coverResourceProps { + path?: string + url?: string +} +interface priceProps { + label?: string + value?: string | number +} + +const DetailDiv = styled.div` + margin-top: -100px; + padding-bottom: 45px; +` + +const DetailInfo = styled(Flex)` + padding: 0 21px; + margin-top: 15px; + justify-content: space-between; + align-items: center; +` +const HeaderFlex = styled(Flex)` + align-items: center; + justify-content: flex-end; +` +const HeaderText = styled(Text)` + color: #1fc7d4; + font-size: 24px; + margin: 0 5px 0 10px; +` + +const Operation: React.FC = ({ detail }) => { + const { t } = useTranslation() + + const [buyNum, setBuyNum] = useState(0) + + return ( + + + {t('series')} + {detail.name} + + + {t('price')} + + {detail.priceList.map((item, index) => { + return ( + + {formatTimeNumber(item.value)} + {item.label} + {index === 0 && detail.priceList.length === 2 && -} + + ) + })} + + + + {t('quantity')} + setBuyNum(v)} /> + + + ) +} +export default Operation diff --git a/src/views/BlindBox/component/SeriesDetail.tsx b/src/views/BlindBox/component/SeriesDetail.tsx new file mode 100644 index 0000000..0699f23 --- /dev/null +++ b/src/views/BlindBox/component/SeriesDetail.tsx @@ -0,0 +1,168 @@ +import React, { useEffect } from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Modal, Flex, Text, Image } from '@pancakeswap/uikit' +import { useGetBoxDetail } from '../hooks' +import ShopList from './ShopList' + +interface SeriesDetailProp { + name?: string | number + value?: string | number + onDismiss?: () => void + detail: DetailProp +} + +interface DetailProp { + beginTime?: string + coverResource: coverResourceProps + endTime?: string + id?: string + name?: string + priceList?: priceProps[] + price?: any + purchased?: string | number + total?: string | number + type?: string +} + +interface coverResourceProps { + path?: string + url?: string +} +interface priceProps { + label?: string + value?: string | number +} + +const Main = styled(Modal)` + width: 60%; + background-color: #fff; + padding: 30px 0; + border-radius: 30px; + height: 90%; + z-index: 10; +` +const FlexBetween = styled(Flex)` + justify-content: space-between; + align-items: center; +` +const TypeText = styled(Text)` + font-size: 28px; + color: #333333; +` +const TypeNum = styled(Text)` + font-size: 26px; + color: #1fc7d4; +` +const ProbabilityFlex = styled(Flex)` + width: 220px; + height: 44px; + border: 1px solid #d5d5d5; + opacity: 1; + border-radius: 5px; + font-size: 22px; + color: #666666; + align-items: center; + justify-content: center; +` +const TextNum = styled(Text)` + font-size: 22px; + color: #280d5f; +` +const Detail = styled.div` + /* border: 1px solid red; */ + height: calc(100vh - 320px); + overflow: auto; + padding-top: 30px; + /* border-left: 1px solid #d5d5d5; */ +` +const ShopText = styled(Text)` + font-size: 26px; + color: #3cbbcc; + margin-bottom: 15px; + padding-top: 20px; +` + +const Shop = styled.div` + width: 100%; + display: grid; + gap: 18px; + grid-template-rows: 1fr; + margin: 0px auto; + grid-template-columns: repeat(4, 1fr); + + ${({ theme }) => theme.mediaQueries.xs} { + grid-template-columns: repeat(2, 1fr); + } + ${({ theme }) => theme.mediaQueries.md} { + grid-template-columns: repeat(3, 1fr); + } + ${({ theme }) => theme.mediaQueries.lg} { + grid-template-columns: repeat(4, 1fr); + } +` +const ShopMain = styled.div` + border-bottom: 1px solid #d5d5d5; + border-left: 1px solid #d5d5d5; + padding: 0 20px 15px 20px; +` + +const SeriesDetail: React.FC = ({ name, value, onDismiss, detail }) => { + const { t } = useTranslation() + const list = [ + { + label: t('epic'), + type: '1', + list: [ + { label: 'Cat goddess Emerald ', id: 1, type: 1, probability: 1 }, + { label: 'Cat goddess Emerald ', id: 1, type: 1, probability: 2 }, + { label: 'Cat goddess Emerald ', id: 1, type: 1, probability: 3 }, + { label: 'Cat goddess Emerald ', id: 1, type: 1, probability: 4 }, + { label: 'Cat goddess Emerald ', id: 1, type: 1, probability: 5 }, + ], + }, + { label: t('legend'), type: '2', list: [{ label: 'Cat goddess Emerald ', id: 2, type: 2, probability: 6 }] }, + { label: t('uncommon'), type: '3', list: [{ label: 'Cat goddess Emerald ', id: 3, type: 3, probability: 7 }] }, + { label: t('common'), type: '4', list: [{ label: 'Cat goddess Emerald ', id: 4, type: 4, probability: 8 }] }, + ] + + const getDetail = useGetBoxDetail() + const getData = async () => { + const data = await getDetail(detail.id) + console.log(data) + } + + useEffect(() => { + getData() + }, []) + + return ( +
+ + {t('limit the quantity of')} + 10000 + + + + {t('nft Smoking in the probability')} + {t('%num%kind nft', { num: 100 })} + +
+ {list.map((item) => { + return ( + + {item.label} + + {item.list.map((childItem) => { + return + })} + + + ) + })} +
+
+
+ ) +} +export default SeriesDetail diff --git a/src/views/BlindBox/component/ShopList.tsx b/src/views/BlindBox/component/ShopList.tsx new file mode 100644 index 0000000..ebc8a2d --- /dev/null +++ b/src/views/BlindBox/component/ShopList.tsx @@ -0,0 +1,114 @@ +import React, { useState, useEffect } from 'react' +import styled, { keyframes } from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Flex, Image } from '@pancakeswap/uikit' + +const ShopItem = styled.div` + /* height: 358px; */ + border-radius: 20px; + /* background: rgba(255, 255, 255, 0.39); + box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.15); */ + position: relative; + overflow: hidden; + + & > .ribbon { + width: 106px; + height: 108px; + overflow: hidden; + position: absolute; + top: -6px; + left: -6px; + z-index: 10; + & > .ribbon1 { + line-height: 14px; + text-align: center; + transform: rotate(-45deg); + position: relative; + padding: 8px 0; + left: -33px; + top: 26px; + width: 150px; + color: white; + box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1); + letter-spacing: 1px; + font-size: 14px; + + ${({ theme }) => theme.mediaQueries.xs} { + padding: 2px 0; + left: -43px; + top: 16px; + } + ${({ theme }) => theme.mediaQueries.lg} { + padding: 8px 0; + left: -33px; + top: 26px; + } + } + & > .epic { + background: linear-gradient(180deg, #efea48 0%, #f32121 100%); + } + & > .legend { + background: linear-gradient(180deg, #4b84f5 0%, #bc21f3 100%); + } + & > .uncommon { + background: linear-gradient(180deg, #3dffec 0%, #24bf52 100%); + } + & > .common { + background: linear-gradient(180deg, #b5e9f3 0%, #1195d9 100%); + } + } +` +const ItemText = styled(Flex)` + padding: 10px 0; + justify-content: center; + font-size: 18px; + color: #707070; + text-align: center; +` +const ImageType = styled.img` + border-radius: 20px; +` +const ProbabilityFlex = styled(Flex)` + font-size: 26px; + justify-content: center; + color: #3cbbcc; +` +const ProbabilityTitle = styled(Flex)` + font-size: 18px; + color: #666666; + margin-top: 5px; + justify-content: center; +` + +interface ShopListItemProps { + item?: Detail +} +interface Detail { + label?: string + type?: number | string + id?: number | string + probability?: number | string +} + +const ShopList: React.FC = ({ item }) => { + const { t } = useTranslation() + + return ( + +
+ {item.type === 1 &&
{t('epic')}
} + {item.type === 2 &&
{t('legend')}
} + {item.type === 3 &&
{t('uncommon')}
} + {item.type === 4 &&
{t('common')}
} +
+ {item.type === 1 && } + {item.type === 2 && } + {item.type === 3 && } + {item.type === 4 && } + {item.label} + {item.probability}% + {t('The rate of')} +
+ ) +} +export default ShopList diff --git a/src/views/Nft/component/StepCom.tsx b/src/views/BlindBox/component/StepCom.tsx similarity index 59% rename from src/views/Nft/component/StepCom.tsx rename to src/views/BlindBox/component/StepCom.tsx index 55d1826..362c757 100644 --- a/src/views/Nft/component/StepCom.tsx +++ b/src/views/BlindBox/component/StepCom.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react' import styled from 'styled-components' -import { Text, Flex, Image, Button } from '@pancakeswap/uikit' +import { Flex, Text, Button } from '@pancakeswap/uikit' const SubButton = styled(Button)` width: 25px; @@ -25,27 +25,38 @@ const AddButton = styled(Button)` padding: 0; ` -export default function StepCom() { - const [valNumber, setInputState] = useState(1) +interface StepProp { + number?: number + max?: number + value?: (v) => void +} - const onAdd = (type) => { +const StepCom: React.FC = ({ number, max = 5, value }) => { + const [valNumber, setInputState] = useState(number) + + const onChange = (type) => { + let num = valNumber if (type === 'add') { - setInputState(valNumber + 1) + if (valNumber === max) return + num += 1 + value(num) + setInputState(num) } else { if (valNumber === 0) return - setInputState(valNumber - 1) + num -= 1 + value(num) + setInputState(num) } } return ( - {/* onAdd('sub')} width={25} height={25} /> */} - onAdd('sub')}>- + onChange('sub')}>- {valNumber} - onAdd('add')}>+ - {/* 1 onAdd('add')} width={25} height={25} /> */} + onChange('add')}>+ ) } +export default StepCom diff --git a/src/views/BlindBox/hooks/index.ts b/src/views/BlindBox/hooks/index.ts new file mode 100644 index 0000000..6f071f5 --- /dev/null +++ b/src/views/BlindBox/hooks/index.ts @@ -0,0 +1,21 @@ +import { useCallback } from 'react' +import { getBoxPage, getBoxDetail } from 'services/blindBox' + +// nft盒子 +export const useGetList = () => { + const data = async (page, size) => { + const result = await getBoxPage({ page, size }) + return result + } + return data +} +// nft详情 +export const useGetBoxDetail = () => { + const data = async (id) => { + const result = await getBoxDetail(id) + return result + } + return data +} + +export default useGetList diff --git a/src/views/BlindBox/index.tsx b/src/views/BlindBox/index.tsx new file mode 100644 index 0000000..9bfa307 --- /dev/null +++ b/src/views/BlindBox/index.tsx @@ -0,0 +1,224 @@ +import React, { useEffect, useState } from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { useAccount } from 'state/userInfo/hooks' +import UnlockButton from 'components/UnlockButton' +import SwiperCore, { Keyboard, Mousewheel, Pagination } from 'swiper' +import { Swiper, SwiperSlide } from 'swiper/react' +import { Card, Text, Flex, Image, Button } from '@pancakeswap/uikit' +import { UnOpenModel } from 'components/Modal' +import Header from './component/Header' +import Operation from './component/Operation' +import { useGetList } from './hooks' + +import 'swiper/swiper.min.css' +import 'swiper/components/pagination/pagination.min.css' + +SwiperCore.use([Keyboard, Mousewheel, Pagination]) + +interface listProps { + beginTime?: string + coverResource: coverResourceProps + endTime?: string + id?: string + name?: string + priceList?: priceProps[] + price?: any + purchased?: string | number + total?: string | number + type?: string +} +interface coverResourceProps { + path?: string + url?: string +} +interface priceProps { + label?: string + value?: string | number +} + +const MainFlex = styled(Flex)` + width: 100%; + min-height: calc(100vh - 64px); + align-items: center; + background: ${({ theme }) => theme.colors.gradients.bubblegum}; +` + +const SwiperDiv = styled(Swiper)` + height: 730px; + position: relative; + & > .swiper-wrapper > .swiper-slide > div > div { + background: transparent; + } + & > .swiper-container-horizontal > .swiper-pagination-bullets, + .swiper-pagination-custom, + .swiper-pagination-fraction { + /* position: absolute; */ + bottom: 130px; + } + & > .swiper-pagination { + bottom: 130px !important; + ${({ theme }) => theme.mediaQueries.xs} { + bottom: 260px !important; + } + ${({ theme }) => theme.mediaQueries.lg} { + bottom: 130px !important; + } + & > .swiper-pagination-bullet { + background: #fff; + width: 14px; + height: 9px; + opacity: 1; + border-radius: 3px; + z-index: 999; + } + & > .swiper-pagination-bullet-active { + background: #000; + } + } +` + +const BlindBoxFlex = styled(Flex)` + flex-direction: column; + align-items: center; + justify-content: center; +` + +const BlindBoxCard = styled.div` + width: 500px; + /* height: 590px; */ + background: #ffffff !important; + box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15); + opacity: 1; + border-radius: 20px; + margin: 0 auto; + position: relative; + + ${({ theme }) => theme.mediaQueries.xs} { + width: 350px; + } + ${({ theme }) => theme.mediaQueries.lg} { + width: 500px; + } + + & > .ribbon { + width: 106px; + height: 108px; + overflow: hidden; + position: absolute; + top: -0px; + left: 0px; + z-index: 10; + & > .ribbon1 { + line-height: 14px; + text-align: center; + transform: rotate(-45deg); + position: relative; + padding: 8px 0; + left: -33px; + top: 26px; + width: 150px; + color: white; + box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1); + letter-spacing: 1px; + font-size: 14px; + } + & > .limitQuantity { + background: linear-gradient(180deg, #4ee1b4 0%, #2183f3 100%); + } + & > .limitTime { + background: linear-gradient(180deg, #24bcf2 0%, #7e4ee1 100%); + } + } +` +const UnlockButtonDiv = styled(UnlockButton)` + width: 500px; + height: 45px; + background: linear-gradient(180deg, #7be0fc 0%, #9961f0 100%); + opacity: 1; + border-radius: 23px; + margin-top: 80px; + ${({ theme }) => theme.mediaQueries.xs} { + width: 350px; + } + ${({ theme }) => theme.mediaQueries.lg} { + width: 500px; + } +` +const BuyButton = styled(Button)` + width: 500px; + height: 45px; + background: linear-gradient(180deg, #7be0fc 0%, #9961f0 100%); + opacity: 1; + border-radius: 23px; + margin-top: 80px; + ${({ theme }) => theme.mediaQueries.xs} { + width: 350px; + } + ${({ theme }) => theme.mediaQueries.lg} { + width: 500px; + } +` + +const BlindBox: React.FC = () => { + const { t } = useTranslation() + const account = useAccount() + const [blindBoxList, setBlindBoxList] = useState() + + const getList = useGetList() + + const getData = async () => { + const { content } = await getList(1, 10) + const arr = [] + content.forEach((item) => { + const obj = item + obj.priceList = [] + Object.keys(obj.price).forEach((childItem) => { + obj.priceList.push({ label: childItem, value: obj.price[childItem] }) + }) + obj.price = undefined + arr.push(obj) + }) + setBlindBoxList(arr) + } + + useEffect(() => { + getData() + }, []) + + return ( + + {/* */} + + {blindBoxList?.map((item) => { + return ( + + + +
+ {item.type === 'QUANTITATIVE' ? ( +
{t('limit the quantity of')}
+ ) : ( +
{t('time limit')}
+ )} +
+
+ + + + {account ? {t('Buy It Now')} : } + + + ) + })} + + + ) +} +export default BlindBox diff --git a/src/views/Board/components/BoardCard/CardActionsContainer.tsx b/src/views/Board/components/BoardCard/CardActionsContainer.tsx index 135293b..3d618ab 100644 --- a/src/views/Board/components/BoardCard/CardActionsContainer.tsx +++ b/src/views/Board/components/BoardCard/CardActionsContainer.tsx @@ -90,7 +90,13 @@ const CardActions: React.FC = ({ board, account }) => { */} - + {/* */} {/* {t('Unclaimed income')} diff --git a/src/views/Board/components/BoardCard/HarvestAction.tsx b/src/views/Board/components/BoardCard/HarvestAction.tsx index beee83c..6e6d6a9 100644 --- a/src/views/Board/components/BoardCard/HarvestAction.tsx +++ b/src/views/Board/components/BoardCard/HarvestAction.tsx @@ -49,7 +49,7 @@ const HarvestAction: React.FC = ({ earnings, pid, board }) try { await onReward() toastSuccess( - `${t('Harvested')}!`, + `${t('already received')}!`, t('Your %symbol% earnings have been sent to your wallet!', { symbol: TOKEN_SYMBOL }), ) } catch (e) { diff --git a/src/views/Board/components/HeaderItem.tsx b/src/views/Board/components/HeaderItem.tsx index 444881c..64f5ffa 100644 --- a/src/views/Board/components/HeaderItem.tsx +++ b/src/views/Board/components/HeaderItem.tsx @@ -12,24 +12,28 @@ const HeaderMain = styled.div` height: 84px; background: linear-gradient(180deg, #c2f9ff 0%, #b596f5 100%); box-shadow: 0px 2px 1px #371588; - opacity: 0.5; border-radius: 20px; box-sizing: border-box; padding: 16px 0 0 20px; text-align: left; ` +const BalanceNum = styled(Balance)` + font-size: 24px; + color: #333333; +` + +const HeaderText = styled(Text)` + font-size: 14px; + color: #666666; +` + const HeaderItem: React.FC = ({ title, price }) => { return ( <> - {/* - {price} - */} - - - {title} - + + {title} ) diff --git a/src/views/Board/index.tsx b/src/views/Board/index.tsx index e84eeaf..06f852e 100644 --- a/src/views/Board/index.tsx +++ b/src/views/Board/index.tsx @@ -20,6 +20,7 @@ import useRefresh from 'hooks/useRefresh' import { fetchBoardUserDataAsync, fetchBoardsPublicDataAsync } from 'state/actions' import { useAccount } from 'state/userInfo/hooks' import { useTranslation } from 'contexts/Localization' +import { UnOpenModel } from 'components/Modal' import BoardCard from './components/BoardCard/BoardCard' import HeaderItem from './components/HeaderItem' @@ -29,6 +30,17 @@ const PageContent = styled.div` background-size: cover; ` +const HeadingText = styled(Text)` + font-size: 36px; + color: #333333; +` + +const BalanceNum = styled(Balance)` + font-size: 32px; + color: #1fc7d4; + margin-top: 10px; +` + const Header = styled.div` padding: 32px 0px; padding-left: 16px; @@ -127,12 +139,11 @@ const Boards: React.FC = () => { return ( +
- - {t('Total capital pool')} - - + {t('Total capital pool')} + {/* */} diff --git a/src/views/Compound/components/CombinationRules.tsx b/src/views/Compound/components/CombinationRules.tsx new file mode 100644 index 0000000..e029f5f --- /dev/null +++ b/src/views/Compound/components/CombinationRules.tsx @@ -0,0 +1,45 @@ +import React from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Text } from '@pancakeswap/uikit' + +const Explain = styled.div` + margin-top: 30px; + text-align: left; +` + +const ExplainText = styled(Text)` + font-size: 14px; + color: #999999; + margin-bottom: 10px; +` +const CombinationRules: React.FC = () => { + const { t } = useTranslation() + + return ( + + {t('combination rules')} + + {t( + '1. Multiple same NFT can be used as raw materials for synthesis. The success rate of synthesis of different levels of NFT is different, the rare synthesis rate is 50%, epic synthesis rate is 40%, legend synthesis rate is 23%;', + )} + + + {t( + '2. If the synthesis is successful, the user will get a more advanced NFT, and all NFT in the synthesis pool will be destroyed;', + )} + + + {t( + '3. If the synthesis fails, there will be no change or complete failure with different probabilities according to the NFT grade of the synthetic raw materials; No change will lose the cost of synthesis; Complete failure will result in loss of synthetic NFT materials and cost of synthesis;', + )} + + + {t( + '4. For example: fill two ordinary NFT into the synthesis pool, then the synthesis success probability is 50%; Probability of no change: 47%; A 3 percent chance of complete failure;', + )} + + + ) +} +export default CombinationRules diff --git a/src/views/Compound/components/CompoundBox.tsx b/src/views/Compound/components/CompoundBox.tsx new file mode 100644 index 0000000..b8bf9d2 --- /dev/null +++ b/src/views/Compound/components/CompoundBox.tsx @@ -0,0 +1,175 @@ +import React, { useState, useEffect } from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Text, Flex, Button, useModal } from '@pancakeswap/uikit' +import { TOKEN_SYMBOL } from 'config/index' +import Preview from './Preview' +import CombinationRules from './CombinationRules' +import SynthesisDetail from './SynthesisDetail' +import ShopList from './ShopList' +import ShopModal from './ShopModal' + +const PageContent = styled.div` + padding: 30px 0; + max-width: 1180px; + margin: 0 auto; +` +const FlexMain = styled(Flex)` + width: 100%; + background: rgba(255, 255, 255, 0.39); + box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15); + opacity: 1; + border-radius: 30px; + justify-content: space-between; +` + +const MainItem = styled.div` + width: 50%; + padding: 30px; + position: relative; +` + +const SelectButton = styled(Button)` + width: 176px; + height: 42px; + background: linear-gradient(269deg, #1fc8d3 0%, #1fd4b0 100%); + border: none; + border-radius: 30px; + color: #ffffff; + font-size: 14px; +` +const AddButton = styled(Button)` + position: absolute; + top: 50%; + left: 50%; + margin-top: -21px; + margin-left: -88px; + width: 176px; + height: 42px; + background: linear-gradient(269deg, #1fc8d3 0%, #1fd4b0 100%); + border: none; + border-radius: 30px; + color: #ffffff; + font-size: 14px; +` + +const CompoundFlex = styled(Flex)` + flex-direction: column; + justify-content: center; + align-items: center; + margin-top: 30px; +` +const ProbabilityFlex = styled(Flex)` + align-items: center; + justify-content: center; + flex-direction: column; + width: 260px; + height: 56px; + background: #fff5e9; + border-radius: 10px; +` + +const ProbabilityNum = styled(Text)` + font-size: 16px; + color: #333333; +` +const ProbabilityText = styled(Text)` + font-size: 12px; + color: #999999; +` + +const CompoundButton = styled(Button)` + width: 260px; + height: 56px; + background: linear-gradient(269deg, #1fc8d3 0%, #1fd4b0 100%); + border-radius: 30px; + border: none; + margin-top: 20px; + font-size: 16px; +` +const CostFlex = styled(Flex)` + align-items: center; + margin-top: 20px; +` + +const CostText = styled(Text)` + font-size: 14px; + color: #333333; +` + +const CostNum = styled(Text)` + font-size: 14px; + color: #1fc7d4; + margin-left: 10px; +` + +const Shop = styled.div` + width: 100%; + display: grid; + gap: 23px; + grid-template-rows: 1fr; + padding: 12px 0px; + margin: 0px auto; + grid-template-columns: repeat(4, 1fr); + + ${({ theme }) => theme.mediaQueries.xs} { + grid-template-columns: repeat(2, 1fr); + } + ${({ theme }) => theme.mediaQueries.sm} { + grid-template-columns: repeat(3, 1fr); + } + ${({ theme }) => theme.mediaQueries.md} { + grid-template-columns: repeat(3, 1fr); + } + ${({ theme }) => theme.mediaQueries.lg} { + grid-template-columns: repeat(3, 1fr); + } +` + +const CompoundBox: React.FC = () => { + const { t } = useTranslation() + const [onShopDetail] = useModal() + + const list = [ + { label: 'Cat goddess Emerald ', type: 1, id: 1 }, + { label: 'Cat goddess Emerald ', type: 2, id: 2 }, + { label: 'Cat goddess Emerald ', type: 3, id: 3 }, + { label: 'Cat goddess Emerald ', type: 4, id: 4 }, + { label: 'Cat goddess Emerald ', type: 1, id: 5 }, + ] + + return ( + + + + + + + 0% + {t('Synthetic success rate')} + + {t('compound')} + + {t('Estimated synthesis cost')} + -----{TOKEN_SYMBOL} + + + + + + + {list.map((item) => { + return + })} + + + {t('reselect nft')} + + {list.length === 0 && {t('add NFT')}} + + + + + ) +} +export default CompoundBox diff --git a/src/views/Compound/components/Preview.tsx b/src/views/Compound/components/Preview.tsx new file mode 100644 index 0000000..4fbc21e --- /dev/null +++ b/src/views/Compound/components/Preview.tsx @@ -0,0 +1,59 @@ +import React from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Text, Flex, Image } from '@pancakeswap/uikit' + +const PreviewFlex = styled(Flex)` + width: 100%; + background: #f3ffff; + box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.16); + opacity: 1; + border-radius: 15px; + align-items: center; + padding: 20px 30px; +` + +const FlexImg = styled(Flex)` + justify-content: center; + align-items: center; + width: 211px; + height: 213px; + background: rgba(31, 201, 208, 0.39); + border-radius: 20px; +` + +const PreviewDetail = styled.div` + margin-left: 30px; +` +const PreviewTitle = styled(Text)` + font-size: 22px; + color: #280d5f; +` +const NftName = styled(Text)` + margin-top: 15px; + color: #666666; + font-size: 16px; +` +const PreviewNum = styled(Text)` + font-size: 14px; + color: #1fc7d4; +` +const Preview: React.FC = () => { + const { t } = useTranslation() + + return ( + + + + + + {t('Compositing success preview')} + {t('nft name')} + {t('not available')} + {t('Number of successful synthesis')} + 0 + + + ) +} +export default Preview diff --git a/src/views/Compound/components/ShopList.tsx b/src/views/Compound/components/ShopList.tsx new file mode 100644 index 0000000..7061794 --- /dev/null +++ b/src/views/Compound/components/ShopList.tsx @@ -0,0 +1,132 @@ +import React, { useState, useEffect } from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Flex, Image } from '@pancakeswap/uikit' + +const MainFlex = styled.div` + & > .epicBcg { + background-color: #ffd7d7; + } + & > .legendBcg { + background-color: #d7d7ff; + } + & > .uncommonBcg { + background-color: #cdf7d2; + } + & > .commonBcg { + background-color: #daf0ff; + } + + ${({ theme }) => theme.mediaQueries.xs} { + flex-direction: column; + } + ${({ theme }) => theme.mediaQueries.md} { + flex-direction: row; + } + ${({ theme }) => theme.mediaQueries.lg} { + flex-direction: row; + } +` + +const ShopItem = styled(Flex)` + background: rgba(255, 255, 255, 0.39); + box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.15); + flex-direction: column; + position: relative; + overflow: hidden; + cursor: pointer; + + & > .ribbon { + width: 106px; + height: 108px; + overflow: hidden; + position: absolute; + top: -6px; + left: -6px; + z-index: 10; + & > .ribbon1 { + line-height: 14px; + text-align: center; + transform: rotate(-45deg); + position: relative; + padding: 2px 0; + left: -36px; + top: 14px; + width: 121px; + color: white; + box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1); + letter-spacing: 1px; + font-size: 12px; + } + & > .epic { + background: linear-gradient(-90deg, #efea48 0%, #f32121 100%); + } + & > .legend { + background: linear-gradient(-90deg, #4b84f5 0%, #bc21f3 100%); + } + & > .uncommon { + background: linear-gradient(-90deg, #3dffec 0%, #24bf52 100%); + } + & > .common { + background: linear-gradient(-90deg, #b5e9f3 0%, #1195d9 100%); + } + } +` +const ItemText = styled(Flex)` + padding: 25px 0; + justify-content: center; +` + +interface ShopListItemProps { + item?: Detail + width?: number + height?: number + borderRadius?: string +} +interface Detail { + label?: string + type?: number | string + id?: number | string +} + +const ShopList: React.FC = ({ item, width = 186, height = 187, borderRadius = '20px' }) => { + const { t } = useTranslation() + const getClassBcg = () => { + let bcg = '' + switch (item.type) { + case 1: + bcg = 'epicBcg' + break + case 2: + bcg = 'legendBcg' + break + case 3: + bcg = 'uncommonBcg' + break + case 4: + bcg = 'commonBcg' + break + default: + bcg = 'epicBcg' + } + return bcg + } + + return ( + + +
+ {item.type === 1 &&
{t('epic')}
} + {item.type === 2 &&
{t('legend')}
} + {item.type === 3 &&
{t('uncommon')}
} + {item.type === 4 &&
{t('common')}
} +
+ {item.type === 1 && } + {item.type === 2 && } + {item.type === 3 && } + {item.type === 4 && } +
+
+ ) +} +export default ShopList diff --git a/src/views/Compound/components/ShopModal.tsx b/src/views/Compound/components/ShopModal.tsx new file mode 100644 index 0000000..70e7fb3 --- /dev/null +++ b/src/views/Compound/components/ShopModal.tsx @@ -0,0 +1,140 @@ +import React, { useState, useEffect } from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Flex, Text, Button } from '@pancakeswap/uikit' +import ShopList from './ShopList' + +interface ShopProp { + name?: string | number + value?: string | number + onDismiss?: () => void +} + +const Main = styled.div` + width: 60%; + background-color: #fff; + padding: 30px 15px; + border-radius: 30px; + /* height: 80%; */ + z-index: 10; +` +const Shop = styled.div` + width: 100%; + display: grid; + gap: 18px; + grid-template-rows: 1fr; + margin: 0px auto; + grid-template-columns: repeat(4, 1fr); + box-sizing: border-box; + & > .active { + border: 3px solid #0deeff; + } + + ${({ theme }) => theme.mediaQueries.xs} { + grid-template-columns: repeat(2, 1fr); + } + ${({ theme }) => theme.mediaQueries.md} { + grid-template-columns: repeat(3, 1fr); + } + ${({ theme }) => theme.mediaQueries.lg} { + grid-template-columns: repeat(4, 1fr); + } +` +const ShopFlex = styled(Flex)` + flex-direction: column; + background: rgba(255, 255, 255, 0.39); + box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.15); + opacity: 1; + border-radius: 20px; + position: relative; +` +const ShopName = styled(Text)` + padding: 26px 0; + text-align: center; + font-size: 18px; + color: #666666; +` + +const SelectFlex = styled(Flex)` + position: absolute; + top: 10px; + right: 10px; + width: 30px; + height: 30px; + background: #fff; + border-radius: 50%; + z-index: 9; + align-items: center; + justify-content: center; +` +const SelectDiv = styled.div` + width: 15px; + height: 15px; + background: #0deeff; + border-radius: 50%; + margin-left: 1px; + margin-top: -1px; +` +const BtnFlex = styled(Flex)` + margin-top: 30px; + align-items: center; + flex-direction: column; +` +const AddButton = styled(Button)` + width: 176px; + height: 42px; + background: linear-gradient(269deg, #1fc8d3 0%, #1fd4b0 100%); + border-radius: 21px; + font-size: 14px; + color: #ffffff; +` +const OutButton = styled(Button)` + width: 176px; + height: 42px; + border: 1px solid #1fc7d4; + background-color: #fff; + border-radius: 21px; + color: #1fc7d4; + font-size: 14px; + margin-top: 20px; +` + +const ShopModal: React.FC = ({ name, value, onDismiss }) => { + const { t } = useTranslation() + const [list, setList] = useState([]) + + const pitchOn = (index) => { + list[index].select = !list[index].select + setList([...list]) + } + useEffect(() => { + setList([ + { label: 'Cat goddess Emerald ', type: 1, id: 1, select: true }, + { label: 'Cat goddess Emerald ', type: 2, id: 2, select: false }, + { label: 'Cat goddess Emerald ', type: 3, id: 3, select: false }, + { label: 'Cat goddess Emerald ', type: 4, id: 4, select: false }, + { label: 'Cat goddess Emerald ', type: 1, id: 5, select: false }, + ]) + }, []) + + return ( +
+ + {list.map((item, index) => { + return ( + pitchOn(index)} className={item.select ? 'active' : ''}> + {item.select && } + + {item.label} + + ) + })} + + + {t('add NFT')} + {t('Sign out')} + +
+ ) +} +export default ShopModal diff --git a/src/views/Compound/components/SynthesisDetail.tsx b/src/views/Compound/components/SynthesisDetail.tsx new file mode 100644 index 0000000..5add9d8 --- /dev/null +++ b/src/views/Compound/components/SynthesisDetail.tsx @@ -0,0 +1,51 @@ +import React from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Text } from '@pancakeswap/uikit' + +const Detail = styled.div` + width: 100%; + background: rgba(255, 255, 255, 0.39); + box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.16); + border-radius: 30px; + padding: 20px; + margin-top: 30px; +` +const DetailTitle = styled(Text)` + font-size: 24px; + color: #333333; + text-align: center; +` + +const DetailText = styled(Text)` + font-size: 14px; + color: #999999; + margin-bottom: 15px; +` + +const SynthesisDetail: React.FC = () => { + const { t } = useTranslation() + + return ( + + {t('Synthesis of details')} + {t('Synthesis results: synthesis success, no change, synthesis failure;')} + + {t('Successful synthesis: obtain more advanced NFT, and destroy the raw material NFT in the synthesis tank;')} + + + {t('No change: keep the NFT of raw material in the synthesis tank, but lose the synthesis cost;')} + + + {t( + 'Synthesis failure: loss of raw material NFT in the synthesis tank and the synthesis cost during synthesis;', + )} + + {t('compound probability:')} + + {t('NFT name (grade) of successful synthesis = NFT name (grade) of raw material x quantity + synthesis cost')} + + + ) +} +export default SynthesisDetail diff --git a/src/views/Compound/index.tsx b/src/views/Compound/index.tsx new file mode 100644 index 0000000..5888ec0 --- /dev/null +++ b/src/views/Compound/index.tsx @@ -0,0 +1,37 @@ +import React, { useState, useEffect } from 'react' +import styled from 'styled-components' +import { useAccount } from 'state/userInfo/hooks' +import useRefresh from 'hooks/useRefresh' +import { UnOpenModel } from 'components/Modal' +import CompoundBox from './components/CompoundBox' + +interface RoundDetailProps { + beginTime?: number + endTime?: number + price?: number + remaining?: number + token?: string + total?: number +} + +const PageContent = styled.div` + min-height: calc(100vh - 64px); + background-image: url('/images/nft/bg.svg'); + background-size: cover; + background-repeat: no-repeat; + + /* background-image: url('/images/page/compound.jpg'); + background-position: 50%; + background-size: 60% 90%; + background-repeat: no-repeat; */ +` + +const NftBox: React.FC = () => { + return ( + + {/* */} + + + ) +} +export default NftBox diff --git a/src/views/Home/HomeIndex.tsx b/src/views/Home/HomeIndex.tsx index a49a164..581a9a8 100644 --- a/src/views/Home/HomeIndex.tsx +++ b/src/views/Home/HomeIndex.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react' +import React, { useEffect, useRef } from 'react' import { useTranslation } from 'contexts/Localization' import { CACHE_INVITE_CODE } from 'config/constants/cacheKey' import useParsedQueryString from 'hooks/useParsedQueryString' diff --git a/src/views/Home/components/CourseCom.tsx b/src/views/Home/components/CourseCom.tsx index 8d64e91..2bd9e0b 100644 --- a/src/views/Home/components/CourseCom.tsx +++ b/src/views/Home/components/CourseCom.tsx @@ -1,4 +1,6 @@ -import React, { useState, useEffect } from 'react' +import React, { useState, MutableRefObject, useEffect, useRef } from 'react' +import { useLocation, useHistory, useParams } from 'react-router-dom' +import { FixedSizeList } from 'react-window' import styled from 'styled-components' import { Flex, Heading, Text, Box, Stepper, Step, Card } from '@pancakeswap/uikit' import { useTranslation } from 'contexts/Localization' @@ -40,17 +42,25 @@ const FlexMain = styled(Flex)` const CardDiv = styled(Card)` padding: 10px 20px; - width: 350px; + width: 330px; display: flex; flex-direction: column; justify-content: center; ` +const HeaderText = styled(Text)` + font-size: 22px; +` +const TextDetail = styled(Text)` + font-size: 14px; + color: #666; +` const CourseCom: React.FC = () => { const { t } = useTranslation() + const location = useLocation() + const ref = useRef(null) const [list, setListState] = useState([]) - useEffect(() => { setListState([ { @@ -58,7 +68,7 @@ const CourseCom: React.FC = () => { id: 1, list: [ { text: t('The project concept was born in May 2021') }, - { text: t('Set up HighCity team in June 2021') }, + { text: t('Set up HiCity team in June 2021') }, { text: t('May 2021 -- January 2022 Team run-in') }, ], }, @@ -97,33 +107,108 @@ const CourseCom: React.FC = () => { ], }, ]) + setTimeout(() => { + const offsetTop = ref.current.offsetTop + 100 + if (location.search) { + window.scrollTo({ + top: offsetTop, + behavior: 'smooth', + }) + } + }) }, [t]) return ( - <> +
- {list.map((item, index) => ( - + + + {t('Stage one: Origin')} + + {t('The project concept was born in May 2021')} + + + {t('Set up HiCity team in June 2021')} + + + {t('May 2021 -- January 2022 Team run-in')} + + + + + + {t('Stage two: Action')} + + {t( + 'In April 2022, social networking and media release activities, HighCity coin started and dividend mechanism went online', + )} + + + {t('In March 2022, project approval, web design, roadmap announcement, smart contract development')} + + + + + + {t('Stage three: Creation')} + + {t('Created by NFT in May 2022')} + + + {t('June 2022 social software development')} + + + + + + {t('Stage four: Integration')} + + {t('Launch of social software in December 2022')} + + + {t('December 2022 NFT bonus binding social software')} + + + {t('In December 2022, HighCity Ecology was preliminarily completed')} + + + + + + {t('Stage five: Closing the curtain')} + + {t('HighCity Ecology completed in December 2022')} + + + {t('Set up HiCity team in June 2021')} + + + {t('Maintain dividend income growth in December 2022')} + + + + {/* {list.map((item, index) => ( + - {item.title} + {item.title} {item.list.map((childItem) => { return ( - + {childItem.text} - + ) })} - ))} + ))} */} - +
) } diff --git a/src/views/Home/components/FlexItemCom.tsx b/src/views/Home/components/FlexItemCom.tsx index 9248b5d..29be68b 100644 --- a/src/views/Home/components/FlexItemCom.tsx +++ b/src/views/Home/components/FlexItemCom.tsx @@ -19,7 +19,7 @@ const ItemText = styled(Text)` const ItemSubText = styled(Text)` text-align: center; - font-size: 20px; + font-size: 16px; ` const FlexItemCom: React.FC = ({ name, valueNum }) => { diff --git a/src/views/Home/components/FristCom.tsx b/src/views/Home/components/FristCom.tsx index 8e4cc20..682559b 100644 --- a/src/views/Home/components/FristCom.tsx +++ b/src/views/Home/components/FristCom.tsx @@ -2,10 +2,10 @@ import React, { useState, useEffect } from 'react' import styled from 'styled-components' import { useDispatch } from 'react-redux' import { uccnDetail, indexInfo } from 'services/user' -import { Flex, Heading, Text, Box, Button, Image, Link } from '@pancakeswap/uikit' +import { Flex, Heading, Text, Box, Button, Image, Link, useModal } from '@pancakeswap/uikit' import { useTranslation } from 'contexts/Localization' import { usePriceHccUsdt } from 'state/hooks' -import { OutLink } from 'types/user' +import UnOpenModel from './UnOpenModel' import FlexItemCom from './FlexItemCom' @@ -32,6 +32,17 @@ const StyledPage = styled(Box)` width: 80%; } ` +const HeaderText = styled(Text)` + font-size: 52px; + color: #1fc7d4; + margin-bottom: 20px; +` + +const DetailText = styled(Text)` + font-size: 18px; + color: #666666; +` + const FlexDiv = styled(Flex)` justify-content: space-between; align-items: center; @@ -68,13 +79,19 @@ const BtnFlex = styled(Flex)` margin-top: 60px; } ` -const RadiusBtn = styled(Button)` + +const RadiusBtn = styled(Link)` border-radius: 50px; width: 170px; height: 60px; font-size: 18px; + display: flex; + align-items: center; + justify-content: center; margin-right: 20px; margin-bottom: 10px; + color: #fff; + text-align: center; background: linear-gradient(269deg, #1fc8d3 0%, #1fd4b0 100%); ${({ theme }) => theme.mediaQueries.xs} { width: 140px; @@ -90,6 +107,8 @@ const WhiteBtn = styled(Button)` width: 140px; height: 30px; border: 1px solid #1fc7d4; + color: #1fc7d4; + background-color: #fff; margin: 0px 35px 10px 0; ${({ theme }) => theme.mediaQueries.xs} { width: 140px; @@ -112,13 +131,14 @@ const BtnImage = styled(Image)` ` const ScoreDiv = styled(Flex)` - margin-top: 127px; + margin-top: 118px; background: #fff; box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.15); opacity: 1; border-radius: 15px; - padding: 59px 0; + padding: 44px 0; justify-content: space-between; + display: none; ${({ theme }) => theme.mediaQueries.xs} { margin-top: 50px; padding: 30px 0; @@ -140,6 +160,9 @@ const FristCom: React.FC = () => { volume: '', market: 0, }) + + const [onUnOpenModel] = useModal() + const hccPriceUsdt = usePriceHccUsdt() const [linkList, setLinkList] = useState([]) @@ -165,18 +188,18 @@ const FristCom: React.FC = () => { - + - - High City Coin - - {t('Hcc Info')} - {t('Hcc Nft')} - {t('Hcc BTC')} + Hi City Coin + {/* + Hi City Coin + */} + {t('Hcc Info')} + {t('Hcc Nft')} + {t('Hcc BTC')} - openLink('https://pancake.kiemtienonline360.com/#/swap')}> - {t('Exchange')} - + {t('IDO Exchange')} + {t('social contact demo')} {linkList?.map((item, index) => { return index < 6 ? ( @@ -200,11 +223,8 @@ const FristCom: React.FC = () => { - + - {/* {burned.map((item) => { - return - })} */} diff --git a/src/views/Home/components/IntroduceCom.tsx b/src/views/Home/components/IntroduceCom.tsx index 0420955..300c0fa 100644 --- a/src/views/Home/components/IntroduceCom.tsx +++ b/src/views/Home/components/IntroduceCom.tsx @@ -5,7 +5,7 @@ import { useTranslation } from 'contexts/Localization' const FirstPage = styled.div` background: linear-gradient(270deg, #eff6ff 0%, #e9fdff 100%); - padding: 100px 0 50px 0; + padding: 99px 0 37px 0; ` const StyledPage = styled(Box)` @@ -62,10 +62,10 @@ const MainDiv = styled.div` } ` -const HeadingDiv = styled(Heading)` +const HeadingDiv = styled(Text)` width: 100%; margin-top: 18px; - font-size: 36px; + font-size: 32px; color: #333333; ${({ theme }) => theme.mediaQueries.xs} { margin-top: 10px; @@ -81,6 +81,8 @@ const TextCom = styled(Text)` text-align: center; line-height: 32px; width: 100%; + font-size: 18px; + color: #666666; ${({ theme }) => theme.mediaQueries.xs} { margin-top: 20px; } @@ -103,7 +105,7 @@ const IntroduceCom: React.FC = () => {
- HighCitySwap + HiCitySwap {t('HighCitySwapInfo')} diff --git a/src/views/Home/components/UnOpenModel.tsx b/src/views/Home/components/UnOpenModel.tsx new file mode 100644 index 0000000..3f20a88 --- /dev/null +++ b/src/views/Home/components/UnOpenModel.tsx @@ -0,0 +1,40 @@ +import React from 'react' +import styled from 'styled-components' +import { Text, Button, Input, InputProps, Flex, Link } from '@pancakeswap/uikit' +import { useTranslation } from 'contexts/Localization' +import { BigNumber } from 'bignumber.js' + +const FlexMain = styled(Flex)` + width: 488px; + height: 204px; + background: #fff; + font-size: 18px; + color: #999999; + z-index: 9999; + border-radius: 15px; + flex-direction: column; + align-items: center; + justify-content: center; +` +const HeaderText = styled(Text)` + font-size: 32px; + color: #333333; +` + +const TipText = styled(Text)` + font-size: 18px; + color: #999999; +` + +const UnOpenModel: React.FC = () => { + const { t } = useTranslation() + + return ( + + {t('Coming Soon')} + {t('This page is not currently open')} + + ) +} + +export default UnOpenModel diff --git a/src/views/Ido/components/GetCard.tsx b/src/views/Ido/components/GetCard.tsx index 5c6b3a2..cd9962e 100644 --- a/src/views/Ido/components/GetCard.tsx +++ b/src/views/Ido/components/GetCard.tsx @@ -3,6 +3,7 @@ import dayjs from 'dayjs' import styled, { keyframes } from 'styled-components' import { useTranslation } from 'contexts/Localization' import { Flex, Text, Button, Input } from '@pancakeswap/uikit' +import { TOKEN_SYMBOL } from 'config/index' import { useHarvest } from '../hooks' interface GetCardProps { @@ -22,28 +23,26 @@ const FCard = styled.div` padding: 27px 20px; margin-top: 50px; ` +const TitleText = styled(Text)` + font-size: 20px; + color: #280d5f; +` +const PriceLabel = styled(Text)` + font-size: 18px; + color: #280d5f; +` +const PriceText = styled(Text)` + font-size: 18px; + color: #1fc7d4; +` +const TimeText = styled(Text)` + color: #280d5f; + font-size: 16px; +` const ExchangeCard: React.FC = ({ price = 0, time = 0 }) => { const { t } = useTranslation() - // const account = useAccount() - // const lockTime = useLockTime() - // const [time, setTime] = useState(0) - // const userInfo = useUserInfo() - // const [price, setPrice] = useState(0) - // const init = async () => { - // const data = await lockTime() - // console.log(data) - // setTime(data) - // const info = await userInfo(account) - // console.log(info) - // setPrice(info) - // } - // useEffect(() => { - // if (account) { - // init() - // } - // }, [account]) const harvest = useHarvest() const getPrice = async () => { const res = await harvest() @@ -57,15 +56,18 @@ const ExchangeCard: React.FC = ({ price = 0, time = 0 }) => { {/* 当前时间大于锁仓时间 不显示 */}
- {t('IDO Get')} + {t('IDO Get')} {new Date().getTime() <= time && ( - + {t('Estimated time of collection')}:{dayjs(time).format('YYYY-MM-DD HH:mm:ss')} - + )} - {t('amount')}: - {price}HCC + {t('amount')}: + + {price} + {TOKEN_SYMBOL} +
diff --git a/src/views/Ido/components/RateText.tsx b/src/views/Ido/components/RateText.tsx index c48a132..3c51a1e 100644 --- a/src/views/Ido/components/RateText.tsx +++ b/src/views/Ido/components/RateText.tsx @@ -4,23 +4,25 @@ import { useTranslation } from 'contexts/Localization' import { Flex, Text } from '@pancakeswap/uikit' const RateText = styled(Text)` - font-size: 30px; + font-size: 22px; + font-weight: bold; color: #280d5f; ${({ theme }) => theme.mediaQueries.xs} { - font-size: 25px; + font-size: 18px; } ${({ theme }) => theme.mediaQueries.lg} { - font-size: 30px; + font-size: 22px; } ` const RateNumber = styled(Text)` - font-size: 30px; + font-size: 22px; + font-weight: bold; color: #1fc7d4; ${({ theme }) => theme.mediaQueries.xs} { - font-size: 25px; + font-size: 18px; } ${({ theme }) => theme.mediaQueries.lg} { - font-size: 30px; + font-size: 22px; } ` const FlexRowCenter = styled(Flex)` @@ -30,6 +32,7 @@ const FlexRowCenter = styled(Flex)` const FlexCenter = styled(Flex)` justify-content: center; align-items: center; + margin-top: 12px; ${({ theme }) => theme.mediaQueries.xs} { flex-direction: column; @@ -56,15 +59,15 @@ const RateCom: React.FC = ({ status, roundDetail }) => { return ( <> - + {t('Exchange rate')}: {status === 'none' ? '-------' : `1USDT=${roundDetail?.price}HCC`} - + {t('gross')}:{status === 'none' ? ' -------- ' : `${roundDetail?.total}HCC`} - + {t('remaining quantity')}:{status === 'none' ? ' -------- ' : `${roundDetail?.remaining}HCC`} diff --git a/src/views/Ido/hooks/index.ts b/src/views/Ido/hooks/index.ts index 3bed001..f84effa 100644 --- a/src/views/Ido/hooks/index.ts +++ b/src/views/Ido/hooks/index.ts @@ -62,6 +62,7 @@ export const useBuyTransaction = () => { export const useGetRound = () => { const transaction = async () => { const data = await getPurchaseActivity() + console.log(data) if (!data) { return null } diff --git a/src/views/Ido/index.tsx b/src/views/Ido/index.tsx index 5b17e0a..b0488b2 100644 --- a/src/views/Ido/index.tsx +++ b/src/views/Ido/index.tsx @@ -24,6 +24,7 @@ const PageContent = styled.div` flex-direction: column; align-items: center; justify-content: center; + padding: 20px 0; ` const Exchange: React.FC = () => { @@ -40,7 +41,7 @@ const Exchange: React.FC = () => { const getRound = useGetRound() const init = async () => { const detail = await getRound() - if (!detail) { + if (!detail || detail.endTime < new Date().getTime() || roundDetail?.remaining === 0) { setStatus('none') } else if (detail.beginTime < new Date().getTime() && detail.endTime > new Date().getTime()) { setStatus('proceed') diff --git a/src/views/Nft/component/FlexText.tsx b/src/views/Nft/component/FlexText.tsx deleted file mode 100644 index 805530b..0000000 --- a/src/views/Nft/component/FlexText.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React, { useState } from 'react' -import styled from 'styled-components' -// import SearchInput from 'components/SearchInput' -import SwiperCore, { Keyboard, Mousewheel, Pagination } from 'swiper' -import { Swiper, SwiperSlide } from 'swiper/react' -import { Card, Button, Text, Flex, Image } from '@pancakeswap/uikit' - -export default function FlexText({ name, value }) { - return ( - - - {name}: - - - {value} - - - ) -} diff --git a/src/views/Nft/index.tsx b/src/views/Nft/index.tsx deleted file mode 100644 index 933b4b4..0000000 --- a/src/views/Nft/index.tsx +++ /dev/null @@ -1,208 +0,0 @@ -import React, { useState } from 'react' -import styled from 'styled-components' -// import SearchInput from 'components/SearchInput' -import SwiperCore, { Keyboard, Mousewheel, Pagination } from 'swiper' -import { Swiper, SwiperSlide } from 'swiper/react' -import { Card, Button, Text, Flex, Image } from '@pancakeswap/uikit' - -import FlexText from './component/FlexText' -// import Step from './component/Step' - -import StepCom from './component/StepCom' - -import 'swiper/swiper.min.css' - -import 'swiper/components/pagination/pagination.min.css' - -SwiperCore.use([Keyboard, Mousewheel, Pagination]) - -const MainDiv = styled.div` - width: 100%; - min-height: calc(100vh - 64px); - background: ${({ theme }) => theme.colors.gradients.bubblegum}; -` - -const StyledPage = styled.div` - display: flex; - flex-direction: column; - align-items: center; - width: 100%; - padding: 16px; - padding-bottom: 0; - - ${({ theme }) => theme.mediaQueries.xs} { - background-size: auto; - } - - ${({ theme }) => theme.mediaQueries.sm} { - padding: 24px; - padding-bottom: 0; - } - - ${({ theme }) => theme.mediaQueries.lg} { - padding-top: 32px; - min-height: calc(100vh - 64px); - } -` - -const BodyWrapper = styled(Card)` - padding-bottom: 20px; - border-radius: 24px; - /* width: 60%; */ - width: 500px; - overflow: visible; - position: relative; -` -const TextKey = styled(Text)` - font-size: 26px; - color: #999999; -` -const TextVal = styled(Text)` - font-size: 26px; - color: #1fc7d4; - margin-left: 10px; -` - -const FlexTime = styled(Flex)` - position: absolute; - width: 100%; - top: 20px; - justify-content: center; -` - -const HindDiv = styled.div` - width: 32px; - position: absolute; - top: -40px; - left: 0; - z-index: 10; -` -const BlindboxImage = styled(Image)` - max-width: 377px; - max-height: 367px; - z-index: 9; -` - -const Divs = styled.div` - box-sizing: border-box; - display: flex; - flex-direction: column; - align-items: center; - width: 100%; - padding: 16px; - padding-bottom: 0; - min-height: calc(100vh - 104px); - background: ${({ theme }) => theme.colors.gradients.bubblegum}; -` -const DetailDiv = styled.div` - margin-top: -100px; -` -const DetailInfo = styled(Flex)` - padding: 0 21px; - margin-top: 15px; -` - -const SwiperDiv = styled(Swiper)` - height: 730px; - & > .swiper-wrapper > .swiper-slide > div > div { - background: transparent; - } - - & > .swiper-pagination { - & > .swiper-pagination-bullet { - background: #fff; - width: 14px; - height: 9px; - opacity: 1; - border-radius: 3px; - } - & > .swiper-pagination-bullet-active { - background: #000; - } - } -` - -const Nft: React.FC = () => { - const [blindboxList] = useState([{ id: 1 }, { id: 2 }, { id: 3 }]) - const [hour, setHour] = useState('0') - const [minute, setMinute] = useState('0') - const [second, setSecond] = useState('0') - const countFun = (time) => { - // const timer: any = null - // let sys_second = new Date(time).getTime() - new Date().getTime() - // timer = setInterval(() => { - // // 防止倒计时出现负数 - // if (sys_second > 1000) { - // sys_second -= 1000 - // // let day = Math.floor(sys_second / 1000 / 3600 / 24) - // setHour(Math.floor((sys_second / 1000 / 3600) % 24)) - // setMinute(Math.floor((sys_second / 1000 / 60) % 60)) - // setSecond(Math.floor((sys_second / 1000) % 60)) - // // this.setState({ - // // day: day, - // // hour: hour < 10 ? '0' + hour : hour, - // // minute: minute < 10 ? '0' + minute : minute, - // // second: second < 10 ? '0' + second : second, - // // }) - // } else { - // clearInterval(timer) - // } - // }, 1000) - } - return ( - - - {blindboxList.map((item) => { - return ( - - - - - {/* - - */} - - 剩余时间 - 7小时 - - - - - 系列 - 法式盛宴 - - - 价格 - - - 500 - - 黄油 - - - - 数量 - - - - - - - - - - - - ) - })} - - - ) -} -export default Nft diff --git a/src/views/NftBox/components/Box.tsx b/src/views/NftBox/components/Box.tsx new file mode 100644 index 0000000..aa8a4b1 --- /dev/null +++ b/src/views/NftBox/components/Box.tsx @@ -0,0 +1,148 @@ +import React, { useState, useEffect } from 'react' +import Pagination from '@mui/material/Pagination' +import styled, { keyframes } from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Heading, Flex } from '@pancakeswap/uikit' +import { useAccount } from 'state/userInfo/hooks' +import useRefresh from 'hooks/useRefresh' +import ShopList from './ShopList' +import NumMain from './NumMain' + +const aaa = keyframes` +0% { + background-position: 0 50%; +} +50% { + background-position: 100% 50%; +} +100% { + background-position: 0% 50%; +} +` + +const PageContent = styled.div` + background: rgba(255, 255, 255, 0.39); + padding: 30px 0; + /* max-width: 70%; */ + max-width: 1180px; + margin: 0 auto; +` +const StatusFlex = styled(Flex)` + align-items: center; + flex-wrap: wrap; + margin-top: 30px; + /* padding: 0 23px; */ + & > .active { + background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); + color: #fff; + border: none; + } +` +const StatusButton = styled.div` + width: 104px; + height: 40px; + border: 1px solid #1fc7d4; + font-size: 12px; + color: #1fc7d4; + border-radius: 30px; + margin-right: 20px; + margin-bottom: 10px; + align-items: center; + justify-content: center; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; +` + +const HeadingTitle = styled(Heading)` + margin: 30px 0; + color: #333; + font-size: 28px; +` + +const Shop = styled.div` + width: 100%; + display: grid; + gap: 23px; + grid-template-rows: 1fr; + padding: 12px 0px; + margin: 0px auto; + grid-template-columns: repeat(4, 1fr); + + ${({ theme }) => theme.mediaQueries.xs} { + grid-template-columns: repeat(2, 1fr); + } + ${({ theme }) => theme.mediaQueries.sm} { + grid-template-columns: repeat(3, 1fr); + } + ${({ theme }) => theme.mediaQueries.md} { + grid-template-columns: repeat(3, 1fr); + } + ${({ theme }) => theme.mediaQueries.lg} { + grid-template-columns: repeat(4, 1fr); + } +` +const MainDiv = styled.div` + /* padding: 0 35px; */ +` + +const NftBox: React.FC = () => { + const { t } = useTranslation() + + const list = [ + { label: 'Cat goddess Emerald ', type: 1, id: 1 }, + { label: 'Cat goddess Emerald ', type: 2, id: 2 }, + { label: 'Cat goddess Emerald ', type: 3, id: 3 }, + { label: 'Cat goddess Emerald ', type: 4, id: 4 }, + { label: 'Cat goddess Emerald ', type: 1, id: 5 }, + ] + const status = [ + { label: t('All'), id: '1' }, + { label: t('epic'), id: '2' }, + { label: t('legend'), id: '3' }, + { label: t('uncommon'), id: '4' }, + { label: t('common'), id: '5' }, + ] + const [statusIndex, setStatusIndex] = useState(0) + + const cutStatus = (index) => { + setStatusIndex(index) + } + const pageChange = (event, page) => { + console.log(event) + console.log(page) + } + + return ( + + + + + + {status.map((item, index) => { + return ( + cutStatus(index)} + > + {item.label} + + ) + })} + + {t('Did not have')} + {/* 商品 */} + + {list.map((item) => { + return + })} + + + + + + ) +} +export default NftBox diff --git a/src/views/NftBox/components/DetailModal.tsx b/src/views/NftBox/components/DetailModal.tsx new file mode 100644 index 0000000..cf5810a --- /dev/null +++ b/src/views/NftBox/components/DetailModal.tsx @@ -0,0 +1,219 @@ +import React from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Modal, Flex, Text, Image, Button } from '@pancakeswap/uikit' +import FlexText from './FlexText' + +interface DetailProp { + item?: Detail + onDismiss?: () => void +} + +interface Detail { + label?: string + type?: number | string + id?: number | string +} +const Main = styled(Modal)` + width: 1050px; + background-color: #fff; + padding: 30px 0; + border-radius: 30px; + height: 680px; + z-index: 10; + ${({ theme }) => theme.mediaQueries.xs} { + width: 400px; + } + ${({ theme }) => theme.mediaQueries.md} { + width: 1050px; + } + ${({ theme }) => theme.mediaQueries.lg} { + width: 1050px; + } +` +const MainFlex = styled(Flex)` + align-items: center; + justify-content: space-between; + & > .epicBcg { + background-color: #ffd7d7; + } + & > .legendBcg { + background-color: #d7d7ff; + } + & > .uncommonBcg { + background-color: #cdf7d2; + } + & > .commonBcg { + background-color: #daf0ff; + } + + ${({ theme }) => theme.mediaQueries.xs} { + flex-direction: column; + } + ${({ theme }) => theme.mediaQueries.md} { + flex-direction: row; + } + ${({ theme }) => theme.mediaQueries.lg} { + flex-direction: row; + } +` +const ShopItem = styled(Flex)` + /* height: 358px; */ + border-radius: 20px; + justify-content: center; + align-items: center; + position: relative; + overflow: hidden; + cursor: pointer; + width: 401px; + height: 510px; + border-radius: 20px; + ${({ theme }) => theme.mediaQueries.xs} { + width: 201px; + height: 310px; + } + ${({ theme }) => theme.mediaQueries.md} { + width: 301px; + height: 410px; + } + ${({ theme }) => theme.mediaQueries.lg} { + width: 401px; + height: 510px; + } + + & > .ribbon { + width: 106px; + height: 108px; + overflow: hidden; + position: absolute; + top: -6px; + left: -6px; + z-index: 10; + & > .ribbon1 { + line-height: 14px; + text-align: center; + transform: rotate(-45deg); + position: relative; + padding: 8px 0; + left: -26px; + top: 24px; + width: 121px; + color: white; + box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1); + letter-spacing: 1px; + font-size: 14px; + } + & > .epic { + background: linear-gradient(-90deg, #efea48 0%, #f32121 100%); + } + & > .legend { + background: linear-gradient(-90deg, #4b84f5 0%, #bc21f3 100%); + } + & > .uncommon { + background: linear-gradient(-90deg, #3dffec 0%, #24bf52 100%); + } + & > .common { + background: linear-gradient(-90deg, #b5e9f3 0%, #1195d9 100%); + } + } +` + +const DetailFlex = styled(Flex)` + width: 550px; + flex-direction: column; + ${({ theme }) => theme.mediaQueries.xs} { + width: 310px; + margin-top: 10px; + } + ${({ theme }) => theme.mediaQueries.md} { + width: 450px; + margin-top: 0px; + } + ${({ theme }) => theme.mediaQueries.lg} { + width: 550px; + margin-top: 0px; + } +` +const CardMain = styled.div` + height: 380px; + background-color: #f5ffff; + border-radius: 20px; + padding: 50px 30px; +` + +const TitleText = styled(Text)` + font-size: 28px; + color: #333333; + text-align: center; +` + +const SellButton = styled(Button)` + height: 60px; + background: linear-gradient(269deg, #1fc8d3 0%, #1fd4b0 100%); + opacity: 1; + border-radius: 30px; + margin-top: 30px; +` + +const CenterDiv = styled.div` + height: 530px; + overflow-y: auto; +` + +const DetailModal: React.FC = ({ item, onDismiss }) => { + const { t } = useTranslation() + + const getClassBcg = () => { + let bcg = '' + switch (item.type) { + case 1: + bcg = 'epicBcg' + break + case 2: + bcg = 'legendBcg' + break + case 3: + bcg = 'uncommonBcg' + break + case 4: + bcg = 'commonBcg' + break + default: + bcg = 'epicBcg' + } + return bcg + } + + return ( +
+ + + +
+ {item.type === 1 &&
{t('epic')}
} + {item.type === 2 &&
{t('legend')}
} + {item.type === 3 &&
{t('uncommon')}
} + {item.type === 4 &&
{t('common')}
} +
+ {item.type === 1 && } + {item.type === 2 && } + {item.type === 3 && } + {item.type === 4 && } +
+ + + Cat goddess Emerald + + + + + + + {t('Selling immediately')} + +
+
+
+ ) +} +export default DetailModal diff --git a/src/views/NftBox/components/FlexText.tsx b/src/views/NftBox/components/FlexText.tsx new file mode 100644 index 0000000..3762b43 --- /dev/null +++ b/src/views/NftBox/components/FlexText.tsx @@ -0,0 +1,29 @@ +import React from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Text, Flex } from '@pancakeswap/uikit' + +interface FlexProp { + title: number | string + value: number | string + marginTop?: string + fontSize?: string + color?: string +} + +const MainFlex = styled(Flex)` + font-size: 14px; + color: #666666; + align-items: center; + justify-content: space-between; +` + +const FlexText: React.FC = ({ title, value, marginTop = '20px', color = '#666666', fontSize = '14px' }) => { + return ( + + {title} + {value} + + ) +} +export default FlexText diff --git a/src/views/NftBox/components/NumMain.tsx b/src/views/NftBox/components/NumMain.tsx new file mode 100644 index 0000000..d1256b6 --- /dev/null +++ b/src/views/NftBox/components/NumMain.tsx @@ -0,0 +1,56 @@ +import React from 'react' +import styled from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Text, Flex } from '@pancakeswap/uikit' + +const NumFlex = styled(Flex)` + margin-top: 20px; + width: 100%; + height: 150px; + align-items: center; + justify-content: space-between; + background: linear-gradient(269deg, #1fc8d3 0%, #1fd4b0 100%); + border-radius: 13px; +` +const ItemFlex = styled(Flex)` + align-items: center; + justify-content: center; + flex-direction: column; + width: 50%; +` +const NumText = styled(Text)` + color: #fff; + font-size: 38px; + text-align: center; +` + +interface NumberProp { + quantity?: number | string + withNumber?: number | string +} + +const NumMain: React.FC = ({ quantity, withNumber }) => { + const { t } = useTranslation() + + return ( + + +
+ {quantity} + + {t('total quantity')} + +
+
+ +
+ {withNumber} + + {t('With the number')} + +
+
+
+ ) +} +export default NumMain diff --git a/src/views/NftBox/components/ShopList.tsx b/src/views/NftBox/components/ShopList.tsx new file mode 100644 index 0000000..bf6f4c7 --- /dev/null +++ b/src/views/NftBox/components/ShopList.tsx @@ -0,0 +1,87 @@ +import React, { useState, useEffect } from 'react' +import styled, { keyframes } from 'styled-components' +import { useTranslation } from 'contexts/Localization' +import { Flex, Image, useModal } from '@pancakeswap/uikit' +import DetailModal from './DetailModal' + +const ShopItem = styled(Flex)` + /* height: 358px; */ + border-radius: 20px; + background: rgba(255, 255, 255, 0.39); + box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.15); + flex-direction: column; + position: relative; + overflow: hidden; + cursor: pointer; + + & > .ribbon { + width: 106px; + height: 108px; + overflow: hidden; + position: absolute; + top: -6px; + left: -6px; + z-index: 10; + & > .ribbon1 { + line-height: 14px; + text-align: center; + transform: rotate(-45deg); + position: relative; + padding: 8px 0; + left: -26px; + top: 24px; + width: 121px; + color: white; + box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1); + letter-spacing: 1px; + font-size: 14px; + } + & > .epic { + background: linear-gradient(-90deg, #efea48 0%, #f32121 100%); + } + & > .legend { + background: linear-gradient(-90deg, #4b84f5 0%, #bc21f3 100%); + } + & > .uncommon { + background: linear-gradient(-90deg, #3dffec 0%, #24bf52 100%); + } + & > .common { + background: linear-gradient(-90deg, #b5e9f3 0%, #1195d9 100%); + } + } +` +const ItemText = styled(Flex)` + padding: 25px 0; + justify-content: center; +` + +interface ShopListItemProps { + item?: Detail +} +interface Detail { + label?: string + type?: number | string + id?: number | string +} + +const ShopList: React.FC = ({ item }) => { + const { t } = useTranslation() + const [onDetailModal] = useModal() + + return ( + +
+ {item.type === 1 &&
{t('epic')}
} + {item.type === 2 &&
{t('legend')}
} + {item.type === 3 &&
{t('uncommon')}
} + {item.type === 4 &&
{t('common')}
} +
+ {item.type === 1 && } + {item.type === 2 && } + {item.type === 3 && } + {item.type === 4 && } + {item.label} +
+ ) +} +export default ShopList diff --git a/src/views/NftBox/index.tsx b/src/views/NftBox/index.tsx new file mode 100644 index 0000000..785bcde --- /dev/null +++ b/src/views/NftBox/index.tsx @@ -0,0 +1,26 @@ +import React, { useState, useEffect } from 'react' +import styled from 'styled-components' +import { useAccount } from 'state/userInfo/hooks' +import useRefresh from 'hooks/useRefresh' +import { UnOpenModel } from 'components/Modal' +import Box from './components/Box' + +const PageContent = styled.div` + background: rgba(255, 255, 255, 0.39); + min-height: calc(100vh - 64px); + + /* background-image: url('/images/page/nftBox.jpg'); + background-position: 50%; + background-size: 50% 90%; + background-repeat: no-repeat; */ +` + +const NftBox: React.FC = () => { + return ( + + {/* */} + + + ) +} +export default NftBox diff --git a/src/views/Referral/components/BuyNftModal.tsx b/src/views/Referral/components/BuyNftModal.tsx index 7a607e8..5b86573 100644 --- a/src/views/Referral/components/BuyNftModal.tsx +++ b/src/views/Referral/components/BuyNftModal.tsx @@ -21,6 +21,7 @@ const InfoDiv = styled.div` padding: 30px 26px; margin-left: 60px; box-shadow: 0px 1px 8px rgba(15, 161, 146, 0.28); + border-radius: 15px; ${({ theme }) => theme.mediaQueries.xs} { padding: 20px 10px; margin-left: 0; diff --git a/src/views/Referral/components/Connected.tsx b/src/views/Referral/components/Connected.tsx index 725af50..3cbd9ba 100644 --- a/src/views/Referral/components/Connected.tsx +++ b/src/views/Referral/components/Connected.tsx @@ -21,11 +21,13 @@ const ButtonDiv = styled(Button)` width: 100%; margin: 20px auto 0px auto; border-radius: 50px; - border: 1px solid ${({ theme }) => theme.colors.textDisabled}; - color: ${({ theme }) => theme.colors.textDisabled}; + font-size: 16px; + border: 1px solid #dcdcdc; + color: #dcdcdc; ` const ButtonGet = styled(Button)` width: 100%; + font-size: 16px; margin: 20px auto 0px auto; border-radius: 50px; border: 1px solid #1fc7d4; @@ -36,6 +38,8 @@ const UpBtn = styled(Button)` width: 100%; margin: 20px auto 0px auto; border-radius: 50px; + font-size: 16px; + color: #fff; background: linear-gradient(180deg, #7be0fc 0%, #ac7bf1 100%); border: none; ` @@ -46,7 +50,7 @@ const FooterBtn = styled.div` padding-bottom: 20px; ` const MainDiv = styled.div` - padding: 0 30px; + padding: 0 50px; ` const FooterDiv = styled.div` margin: 0 auto 30px auto; @@ -54,6 +58,7 @@ const FooterDiv = styled.div` const TextDiv = styled(Text)` margin-top: 10px; font-size: 14px; + color: #999999; ` const ConnectedCom: React.FC = () => { diff --git a/src/views/Referral/components/FlexCom.tsx b/src/views/Referral/components/FlexCom.tsx index 5f0e878..5a1f6df 100644 --- a/src/views/Referral/components/FlexCom.tsx +++ b/src/views/Referral/components/FlexCom.tsx @@ -9,6 +9,8 @@ interface FlexProps { leftColor?: string rightColor?: string typeLink?: string + size?: string + textColor?: string } const FlexDiv = styled(Flex)` @@ -17,7 +19,6 @@ const FlexDiv = styled(Flex)` margin-top: 20px; ` const TextLink = styled(Text)` - border-bottom: 1px solid #7a6eaa; cursor: pointer; ` @@ -28,6 +29,8 @@ const FlexCom: React.FC = ({ leftColor = 'text', rightColor = 'textSubtle', typeLink, + size = '16px', + textColor = '#1FC7D4', }) => { const openPage = () => { console.log(typeLink) @@ -36,13 +39,21 @@ const FlexCom: React.FC = ({ return ( - {name} + + {name} + {typeLink ? ( - + {value} ) : ( - {value} + + {value} + )} ) diff --git a/src/views/Referral/components/HeaderMain.tsx b/src/views/Referral/components/HeaderMain.tsx index 32276aa..2dd4be8 100644 --- a/src/views/Referral/components/HeaderMain.tsx +++ b/src/views/Referral/components/HeaderMain.tsx @@ -1,14 +1,17 @@ import React from 'react' import styled from 'styled-components' -import { Image, Heading } from '@pancakeswap/uikit' +import { Image, Text } from '@pancakeswap/uikit' interface HeaderProp { title?: string } -const HeadingDiv = styled(Heading)` - padding-top: 30px; +const HeadingDiv = styled(Text)` + padding-top: 35px; position: relative; + text-align: center; + font-size: 36px; + color: #280d5f; ` const TipDiv = styled(Image)` @@ -18,10 +21,6 @@ const TipDiv = styled(Image)` left: 0; ` const HeaderMain: React.FC = ({ title = '' }) => { - return ( - - {title} - - ) + return {title} } export default HeaderMain diff --git a/src/views/Referral/components/Regimental.tsx b/src/views/Referral/components/Regimental.tsx index 14a2ec5..18de2eb 100644 --- a/src/views/Referral/components/Regimental.tsx +++ b/src/views/Referral/components/Regimental.tsx @@ -39,7 +39,7 @@ const FooterBtn = styled.div` const ContentDiv = styled.div` width: 75%; - background: rgba(255, 255, 255, 0.39); + background: #fff; box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.16); border-radius: 40px; @@ -53,7 +53,7 @@ const ContentDiv = styled.div` } ${({ theme }) => theme.mediaQueries.lg} { - width: 50%; + width: 40%; } ` @@ -66,6 +66,7 @@ const FooterDiv = styled.div` const TextDiv = styled(Text)` margin-top: 10px; font-size: 14px; + color: #999999; ` const LogoImage = styled.div` display: flex; diff --git a/src/views/Referral/components/UnunitedCom.tsx b/src/views/Referral/components/UnunitedCom.tsx index a089c23..011b5bf 100644 --- a/src/views/Referral/components/UnunitedCom.tsx +++ b/src/views/Referral/components/UnunitedCom.tsx @@ -4,14 +4,17 @@ import { useTranslation } from 'contexts/Localization' import { Heading, Text } from '@pancakeswap/uikit' import UnlockButton from 'components/UnlockButton' -const HeadingDiv = styled(Heading)` - padding-top: 90px; +const HeadingDiv = styled(Text)` + padding-top: 81px; + font-size: 46px; + color: #1fc7d4; + text-align: center; ` const UnlockButtonDiv = styled(UnlockButton)` width: 80%; - margin: 80px auto 10px auto; - margin-left: 10%; + margin: 80px auto 10px 10%; + border-radius: 25px; ` const FooterDiv = styled.div` width: 80%; @@ -23,9 +26,7 @@ const UnunitedCom: React.FC = () => { const { t } = useTranslation() return ( <> - - {t('recommend')} - + {t('recommend')} {/* {t('each time')} diff --git a/src/views/Referral/hooks/index.ts b/src/views/Referral/hooks/index.ts index 9f99c47..4a5fc4b 100644 --- a/src/views/Referral/hooks/index.ts +++ b/src/views/Referral/hooks/index.ts @@ -34,6 +34,7 @@ export const useBuyTransaction = () => { const { to, hccPrice, otherPaymentPrice, timestamp, code, sign } = data const params = [to, hccPrice, otherPaymentPrice, timestamp, code, sign] const res = await referralContract.mint(...params) + console.log(res) return res } return transaction diff --git a/src/views/Referral/index.tsx b/src/views/Referral/index.tsx index 7ef177c..d453d27 100644 --- a/src/views/Referral/index.tsx +++ b/src/views/Referral/index.tsx @@ -19,7 +19,7 @@ const MainDiv = styled.div` ` const ContentDiv = styled.div` - width: 50%; + max-width: 600px; background: rgba(255, 255, 255, 0.39); box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.16); border-radius: 40px; @@ -61,29 +61,6 @@ const Nft: React.FC = () => { )} - {/* {referralIsCommander ? ( - <> - {account ? ( - - ) : ( - - - - )} - - ) : ( - <> - {account ? ( - - - - ) : ( - - - - )} - - )} */} ) } diff --git a/yarn.lock b/yarn.lock index 8f067d8..a7df436 100644 --- a/yarn.lock +++ b/yarn.lock @@ -288,6 +288,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" integrity sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ== +"@babel/helper-plugin-utils@^7.17.12": + version "7.17.12" + resolved "https://registry.npmmirror.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz#86c2347da5acbf5583ba0a10aed4c9bf9da9cf96" + integrity sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA== + "@babel/helper-remap-async-to-generator@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz#51439c913612958f54a987a4ffc9ee587a2045d6" @@ -632,6 +637,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" +"@babel/plugin-syntax-jsx@^7.12.13": + version "7.17.12" + resolved "https://registry.npmmirror.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.17.12.tgz#834035b45061983a491f60096f61a2e7c5674a47" + integrity sha512-spyY3E3AURfxh/RHtjx5j6hs8am5NbUBGfcZ2vB3uShSpZdQyXSf5rR5Mk76vbtlAZOelyVQ71Fg0x9SG4fsog== + dependencies: + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" @@ -1268,6 +1280,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.13.10", "@babel/runtime@^7.17.2": + version "7.18.3" + resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.18.3.tgz#c7b654b57f6f63cf7f8b418ac9ca04408c4579f4" + integrity sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.10.4", "@babel/template@^7.14.5", "@babel/template@^7.3.3": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" @@ -1501,28 +1520,112 @@ resolved "https://registry.yarnpkg.com/@csstools/normalize.css/-/normalize.css-10.1.0.tgz#f0950bba18819512d42f7197e56c518aa491cf18" integrity sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg== -"@emotion/is-prop-valid@^0.8.8": - version "0.8.8" - resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" - integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== +"@emotion/babel-plugin@^11.7.1": + version "11.9.2" + resolved "https://registry.npmmirror.com/@emotion/babel-plugin/-/babel-plugin-11.9.2.tgz#723b6d394c89fb2ef782229d92ba95a740576e95" + integrity sha512-Pr/7HGH6H6yKgnVFNEj2MVlreu3ADqftqjqwUvDy/OJzKFgxKeTQ+eeUf20FOTuHVkDON2iNa25rAXVYtWJCjw== dependencies: - "@emotion/memoize" "0.7.4" + "@babel/helper-module-imports" "^7.12.13" + "@babel/plugin-syntax-jsx" "^7.12.13" + "@babel/runtime" "^7.13.10" + "@emotion/hash" "^0.8.0" + "@emotion/memoize" "^0.7.5" + "@emotion/serialize" "^1.0.2" + babel-plugin-macros "^2.6.1" + convert-source-map "^1.5.0" + escape-string-regexp "^4.0.0" + find-root "^1.1.0" + source-map "^0.5.7" + stylis "4.0.13" -"@emotion/memoize@0.7.4": - version "0.7.4" - resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" - integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== +"@emotion/cache@^11.7.1": + version "11.7.1" + resolved "https://registry.npmmirror.com/@emotion/cache/-/cache-11.7.1.tgz#08d080e396a42e0037848214e8aa7bf879065539" + integrity sha512-r65Zy4Iljb8oyjtLeCuBH8Qjiy107dOYC6SJq7g7GV5UCQWMObY4SJDPGFjiiVpPrOJ2hmJOoBiYTC7hwx9E2A== + dependencies: + "@emotion/memoize" "^0.7.4" + "@emotion/sheet" "^1.1.0" + "@emotion/utils" "^1.0.0" + "@emotion/weak-memoize" "^0.2.5" + stylis "4.0.13" + +"@emotion/hash@^0.8.0": + version "0.8.0" + resolved "https://registry.npmmirror.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" + integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== + +"@emotion/is-prop-valid@^1.1.0", "@emotion/is-prop-valid@^1.1.2": + version "1.1.2" + resolved "https://registry.npmmirror.com/@emotion/is-prop-valid/-/is-prop-valid-1.1.2.tgz#34ad6e98e871aa6f7a20469b602911b8b11b3a95" + integrity sha512-3QnhqeL+WW88YjYbQL5gUIkthuMw7a0NGbZ7wfFVk2kg/CK5w8w5FFa0RzWjyY1+sujN0NWbtSHH6OJmWHtJpQ== + dependencies: + "@emotion/memoize" "^0.7.4" + +"@emotion/memoize@^0.7.4", "@emotion/memoize@^0.7.5": + version "0.7.5" + resolved "https://registry.npmmirror.com/@emotion/memoize/-/memoize-0.7.5.tgz#2c40f81449a4e554e9fc6396910ed4843ec2be50" + integrity sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ== + +"@emotion/react@^11.9.0": + version "11.9.0" + resolved "https://registry.npmmirror.com/@emotion/react/-/react-11.9.0.tgz#b6d42b1db3bd7511e7a7c4151dc8bc82e14593b8" + integrity sha512-lBVSF5d0ceKtfKCDQJveNAtkC7ayxpVlgOohLgXqRwqWr9bOf4TZAFFyIcNngnV6xK6X4x2ZeXq7vliHkoVkxQ== + dependencies: + "@babel/runtime" "^7.13.10" + "@emotion/babel-plugin" "^11.7.1" + "@emotion/cache" "^11.7.1" + "@emotion/serialize" "^1.0.3" + "@emotion/utils" "^1.1.0" + "@emotion/weak-memoize" "^0.2.5" + hoist-non-react-statics "^3.3.1" + +"@emotion/serialize@^1.0.2", "@emotion/serialize@^1.0.3": + version "1.0.3" + resolved "https://registry.npmmirror.com/@emotion/serialize/-/serialize-1.0.3.tgz#99e2060c26c6292469fb30db41f4690e1c8fea63" + integrity sha512-2mSSvgLfyV3q+iVh3YWgNlUc2a9ZlDU7DjuP5MjK3AXRR0dYigCrP99aeFtaB2L/hjfEZdSThn5dsZ0ufqbvsA== + dependencies: + "@emotion/hash" "^0.8.0" + "@emotion/memoize" "^0.7.4" + "@emotion/unitless" "^0.7.5" + "@emotion/utils" "^1.0.0" + csstype "^3.0.2" + +"@emotion/sheet@^1.1.0": + version "1.1.0" + resolved "https://registry.npmmirror.com/@emotion/sheet/-/sheet-1.1.0.tgz#56d99c41f0a1cda2726a05aa6a20afd4c63e58d2" + integrity sha512-u0AX4aSo25sMAygCuQTzS+HsImZFuS8llY8O7b9MDRzbJM0kVJlAz6KNDqcG7pOuQZJmj/8X/rAW+66kMnMW+g== + +"@emotion/styled@^11.8.1": + version "11.8.1" + resolved "https://registry.npmmirror.com/@emotion/styled/-/styled-11.8.1.tgz#856f6f63aceef0eb783985fa2322e2bf66d04e17" + integrity sha512-OghEVAYBZMpEquHZwuelXcRjRJQOVayvbmNR0zr174NHdmMgrNkLC6TljKC5h9lZLkN5WGrdUcrKlOJ4phhoTQ== + dependencies: + "@babel/runtime" "^7.13.10" + "@emotion/babel-plugin" "^11.7.1" + "@emotion/is-prop-valid" "^1.1.2" + "@emotion/serialize" "^1.0.2" + "@emotion/utils" "^1.1.0" "@emotion/stylis@^0.8.4": version "0.8.5" resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== -"@emotion/unitless@^0.7.4": +"@emotion/unitless@^0.7.4", "@emotion/unitless@^0.7.5": version "0.7.5" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== +"@emotion/utils@^1.0.0", "@emotion/utils@^1.1.0": + version "1.1.0" + resolved "https://registry.npmmirror.com/@emotion/utils/-/utils-1.1.0.tgz#86b0b297f3f1a0f2bdb08eeac9a2f49afd40d0cf" + integrity sha512-iRLa/Y4Rs5H/f2nimczYmS5kFJEbpiVvgN3XVfZ022IYhuNA1IRSHEizcof88LtCTXtl9S2Cxt32KgaXEu72JQ== + +"@emotion/weak-memoize@^0.2.5": + version "0.2.5" + resolved "https://registry.npmmirror.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" + integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== + "@eslint/eslintrc@^0.4.2": version "0.4.2" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.2.tgz#f63d0ef06f5c0c57d76c4ab5f63d3835c51b0179" @@ -2523,6 +2626,93 @@ resolved "https://registry.yarnpkg.com/@microsoft/fetch-event-source/-/fetch-event-source-2.0.1.tgz#9ceecc94b49fbaa15666e38ae8587f64acce007d" integrity sha512-W6CLUJ2eBMw3Rec70qrsEW0jOm/3twwJv21mrmj2yORiaVmVYGS4sSS5yUwvQc1ZlDLYGPnClVWmUUMagKNsfA== +"@mui/base@5.0.0-alpha.84": + version "5.0.0-alpha.84" + resolved "https://registry.npmmirror.com/@mui/base/-/base-5.0.0-alpha.84.tgz#83c580c9b04b4e4efe3fb39572720470b0d7cc29" + integrity sha512-uDx+wGVytS+ZHiWHyzUyijY83GSIXJpzSJ0PGc/8/s+8nBzeHvaPKrAyJz15ASLr52hYRA6PQGqn0eRAsB7syQ== + dependencies: + "@babel/runtime" "^7.17.2" + "@emotion/is-prop-valid" "^1.1.2" + "@mui/types" "^7.1.3" + "@mui/utils" "^5.8.0" + "@popperjs/core" "^2.11.5" + clsx "^1.1.1" + prop-types "^15.8.1" + react-is "^17.0.2" + +"@mui/material@^5.8.3": + version "5.8.3" + resolved "https://registry.npmmirror.com/@mui/material/-/material-5.8.3.tgz#86681d14c1a119d1d9b6b981c864736d075d095f" + integrity sha512-8UecY/W9SMtEZm5PMCUcMbujajVP6fobu0BgBPiIWwwWRblZVEzqprY6v1P2me7qCyrve4L4V/rqAKPKhVHOSg== + dependencies: + "@babel/runtime" "^7.17.2" + "@mui/base" "5.0.0-alpha.84" + "@mui/system" "^5.8.3" + "@mui/types" "^7.1.3" + "@mui/utils" "^5.8.0" + "@types/react-transition-group" "^4.4.4" + clsx "^1.1.1" + csstype "^3.1.0" + hoist-non-react-statics "^3.3.2" + prop-types "^15.8.1" + react-is "^17.0.2" + react-transition-group "^4.4.2" + +"@mui/private-theming@^5.8.0": + version "5.8.0" + resolved "https://registry.npmmirror.com/@mui/private-theming/-/private-theming-5.8.0.tgz#7d927e7e12616dc10b0dcbe665df2c00ed859796" + integrity sha512-MjRAneTmCKLR9u2S4jtjLUe6gpHxlbb4g2bqpDJ2PdwlvwsWIUzbc/gVB4dvccljXeWxr5G2M/Co2blXisvFIw== + dependencies: + "@babel/runtime" "^7.17.2" + "@mui/utils" "^5.8.0" + prop-types "^15.8.1" + +"@mui/styled-engine-sc@^5.8.0": + version "5.8.0" + resolved "https://registry.npmmirror.com/@mui/styled-engine-sc/-/styled-engine-sc-5.8.0.tgz#20bc536dce25739e38fcd2586f100e70fbf02065" + integrity sha512-46eRLWxjTF0d50Q1Q9tj96cgF41r7lesbXAy6kKocCdUfJ8rbIo36C4Ws8Pd7nfVsvaitTb7tmCbVQzDT3niJQ== + dependencies: + prop-types "^15.8.1" + +"@mui/styled-engine@^5.8.0": + version "5.8.0" + resolved "https://registry.npmmirror.com/@mui/styled-engine/-/styled-engine-5.8.0.tgz#89ed42efe7c8749e5a60af035bc5d3a6bea362bf" + integrity sha512-Q3spibB8/EgeMYHc+/o3RRTnAYkSl7ROCLhXJ830W8HZ2/iDiyYp16UcxKPurkXvLhUaILyofPVrP3Su2uKsAw== + dependencies: + "@babel/runtime" "^7.17.2" + "@emotion/cache" "^11.7.1" + prop-types "^15.8.1" + +"@mui/system@^5.8.3": + version "5.8.3" + resolved "https://registry.npmmirror.com/@mui/system/-/system-5.8.3.tgz#66db174f1b5c244eb73dbc48527509782a22ec0a" + integrity sha512-/tyGQcYqZT0nl98qV9XnGiedTO+V7VHc28k4POfhMJNedB1CRrwWRm767DeEdc5f/8CU2See3WD16ikP6pYiOA== + dependencies: + "@babel/runtime" "^7.17.2" + "@mui/private-theming" "^5.8.0" + "@mui/styled-engine" "^5.8.0" + "@mui/types" "^7.1.3" + "@mui/utils" "^5.8.0" + clsx "^1.1.1" + csstype "^3.1.0" + prop-types "^15.8.1" + +"@mui/types@^7.1.3": + version "7.1.3" + resolved "https://registry.npmmirror.com/@mui/types/-/types-7.1.3.tgz#d7636f3046110bcccc63e6acfd100e2ad9ca712a" + integrity sha512-DDF0UhMBo4Uezlk+6QxrlDbchF79XG6Zs0zIewlR4c0Dt6GKVFfUtzPtHCH1tTbcSlq/L2bGEdiaoHBJ9Y1gSA== + +"@mui/utils@^5.8.0": + version "5.8.0" + resolved "https://registry.npmmirror.com/@mui/utils/-/utils-5.8.0.tgz#4b1d19cbcf70773283375e763b7b3552b84cb58f" + integrity sha512-7LgUtCvz78676iC0wpTH7HizMdCrTphhBmRWimIMFrp5Ph6JbDFVuKS1CwYnWWxRyYKL0QzXrDL0lptAU90EXg== + dependencies: + "@babel/runtime" "^7.17.2" + "@types/prop-types" "^15.7.5" + "@types/react-is" "^16.7.1 || ^17.0.0" + prop-types "^15.8.1" + react-is "^17.0.2" + "@multiformats/base-x@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@multiformats/base-x/-/base-x-4.0.1.tgz#95ff0fa58711789d53aefb2590a8b7a4e715d121" @@ -2628,6 +2818,11 @@ schema-utils "^2.6.5" source-map "^0.7.3" +"@popperjs/core@^2.11.5": + version "2.11.5" + resolved "https://registry.npmmirror.com/@popperjs/core/-/core-2.11.5.tgz#db5a11bf66bdab39569719555b0f76e138d7bd64" + integrity sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw== + "@popperjs/core@^2.9.2": version "2.9.2" resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.9.2.tgz#adea7b6953cbb34651766b0548468e743c6a2353" @@ -3831,6 +4026,11 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.4.tgz#fcf7205c25dff795ee79af1e30da2c9790808f11" integrity sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ== +"@types/prop-types@^15.7.5": + version "15.7.5" + resolved "https://registry.npmmirror.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" + integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== + "@types/q@^1.5.1": version "1.5.5" resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.5.tgz#75a2a8e7d8ab4b230414505d92335d1dcb53a6df" @@ -3862,6 +4062,13 @@ dependencies: "@types/react" "*" +"@types/react-is@^16.7.1 || ^17.0.0": + version "17.0.3" + resolved "https://registry.npmmirror.com/@types/react-is/-/react-is-17.0.3.tgz#2d855ba575f2fc8d17ef9861f084acc4b90a137a" + integrity sha512-aBTIWg1emtu95bLTLx0cpkxwGW3ueZv71nE2YFBpL8k/z5czEW8yYpOo8Dp+UUAFAtKwNaOsh/ioSeQnWlZcfw== + dependencies: + "@types/react" "*" + "@types/react-redux@^7.1.16": version "7.1.17" resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.17.tgz#b9ccd01624c2a282b7af3762411cbf8945712438" @@ -3896,6 +4103,13 @@ dependencies: "@types/react" "*" +"@types/react-transition-group@^4.4.4": + version "4.4.4" + resolved "https://registry.npmmirror.com/@types/react-transition-group/-/react-transition-group-4.4.4.tgz#acd4cceaa2be6b757db61ed7b432e103242d163e" + integrity sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug== + dependencies: + "@types/react" "*" + "@types/react-window@^1.8.3": version "1.8.4" resolved "https://registry.yarnpkg.com/@types/react-window/-/react-window-1.8.4.tgz#7920f128b0238ea6bd529cbbc2cf1779e99b7456" @@ -5503,7 +5717,7 @@ babel-plugin-jest-hoist@^26.6.2: "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" -babel-plugin-macros@2.8.0: +babel-plugin-macros@2.8.0, babel-plugin-macros@^2.6.1: version "2.8.0" resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== @@ -6806,6 +7020,11 @@ clone@^2.0.0, clone@^2.1.1: resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= +clsx@^1.1.1: + version "1.1.1" + resolved "https://registry.npmmirror.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188" + integrity sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA== + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -7124,7 +7343,7 @@ convert-source-map@1.7.0: dependencies: safe-buffer "~5.1.1" -convert-source-map@1.X, convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@1.X, convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.8.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== @@ -7624,6 +7843,11 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.8.tgz#d2266a792729fb227cd216fb572f43728e1ad340" integrity sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw== +csstype@^3.1.0: + version "3.1.0" + resolved "https://registry.npmmirror.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2" + integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA== + cyclist@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" @@ -9097,10 +9321,9 @@ ethereum-cryptography@^0.1.3: secp256k1 "^4.0.1" setimmediate "^1.0.5" -ethereumjs-abi@0.6.8: +ethereumjs-abi@0.6.8, "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": version "0.6.8" - resolved "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" - integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0" dependencies: bn.js "^4.11.8" ethereumjs-util "^6.0.0" @@ -9796,6 +10019,11 @@ find-cache-dir@^3.3.1: make-dir "^3.0.2" pkg-dir "^4.1.0" +find-root@^1.1.0: + version "1.1.0" + resolved "https://registry.npmmirror.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" + integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== + find-up@4.1.0, find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -10739,7 +10967,7 @@ hmac-drbg@^1.0.0, hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: +hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== @@ -16717,6 +16945,15 @@ prop-types@^15.6.2, prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.8.1" +prop-types@^15.8.1: + version "15.8.1" + resolved "https://registry.npmmirror.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + property-information@^5.0.0: version "5.6.0" resolved "https://registry.yarnpkg.com/property-information/-/property-information-5.6.0.tgz#61675545fb23002f245c6540ec46077d4da3ed69" @@ -17095,7 +17332,7 @@ react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-is@^17.0.0, react-is@^17.0.1: +react-is@^17.0.0, react-is@^17.0.1, react-is@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== @@ -17244,7 +17481,7 @@ react-scripts@^4.0.1: optionalDependencies: fsevents "^2.1.3" -react-transition-group@^4.4.1: +react-transition-group@^4.4.1, react-transition-group@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.2.tgz#8b59a56f09ced7b55cbd53c36768b922890d5470" integrity sha512-/RNYfRAMlZwDSr6z4zNKV6xu53/e2BuaBbGhbyYIXTrmgu/bGHzmqOs7mJSJBHy9Ud+ApHx3QjrkKSp1pxvlFg== @@ -19134,14 +19371,14 @@ style-to-object@^0.3.0: dependencies: inline-style-parser "0.1.1" -styled-components@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.3.0.tgz#e47c3d3e9ddfff539f118a3dd0fd4f8f4fb25727" - integrity sha512-bPJKwZCHjJPf/hwTJl6TbkSZg/3evha+XPEizrZUGb535jLImwDUdjTNxXqjjaASt2M4qO4AVfoHJNe3XB/tpQ== +styled-components@^5.3.5: + version "5.3.5" + resolved "https://registry.npmmirror.com/styled-components/-/styled-components-5.3.5.tgz#a750a398d01f1ca73af16a241dec3da6deae5ec4" + integrity sha512-ndETJ9RKaaL6q41B69WudeqLzOpY1A/ET/glXkNZ2T7dPjPqpPCXXQjDFYZWwNnE5co0wX+gTCqx9mfxTmSIPg== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/traverse" "^7.4.5" - "@emotion/is-prop-valid" "^0.8.8" + "@emotion/is-prop-valid" "^1.1.0" "@emotion/stylis" "^0.8.4" "@emotion/unitless" "^0.7.4" babel-plugin-styled-components ">= 1.12.0" @@ -19178,6 +19415,11 @@ stylehacks@^4.0.0: postcss "^7.0.0" postcss-selector-parser "^3.0.0" +stylis@4.0.13: + version "4.0.13" + resolved "https://registry.npmmirror.com/stylis/-/stylis-4.0.13.tgz#f5db332e376d13cc84ecfe5dace9a2a51d954c91" + integrity sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag== + sublevel-pouchdb@7.2.2: version "7.2.2" resolved "https://registry.yarnpkg.com/sublevel-pouchdb/-/sublevel-pouchdb-7.2.2.tgz#49e46cd37883bf7ff5006d7c5b9bcc7bcc1f422f"