From c85534bb8f087695ed4c70fefe148dadf814885a Mon Sep 17 00:00:00 2001 From: myf <> Date: Fri, 6 May 2022 17:38:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86=E5=A4=9A?= =?UTF-8?q?=E5=9B=BD=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 + public/locales/zh-CN.json | 5 +- src/components/Menu/config.ts | 34 ++++++------ src/components/Menu/index.tsx | 1 - src/config/localization/languages.ts | 52 +++++++++---------- src/config/localization/translations.json | 5 +- src/utils/request.ts | 2 +- .../Announcement/components/ListItem.tsx | 23 ++++++-- src/views/Announcement/index.tsx | 2 +- .../Board/components/BoardCard/BoardCard.tsx | 2 +- .../BoardCard/CardActionsContainer.tsx | 2 +- .../components/BoardCard/StakeAction.tsx | 2 +- src/views/Board/components/DepositModal.tsx | 2 +- src/views/Home/components/FristCom.tsx | 7 +-- 14 files changed, 83 insertions(+), 58 deletions(-) diff --git a/.env.development b/.env.development index 9f188d7..203f334 100644 --- a/.env.development +++ b/.env.development @@ -20,4 +20,6 @@ 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.168.2.147:8080' # REACT_APP_REQUEST_URL = 'http://192.168.2.28:8080' +# REACT_APP_REQUEST_URL = 'http://6o7g1fv83e.51xd.pub' diff --git a/public/locales/zh-CN.json b/public/locales/zh-CN.json index 6d71ba7..99af725 100644 --- a/public/locales/zh-CN.json +++ b/public/locales/zh-CN.json @@ -1122,5 +1122,8 @@ "Insufficient Balance": "余额不足", "HCC Currency amount": "HCC币总量", "Lock up time": "锁仓时间", - "possess LP": "持有LP" + "possess LP": "持有LP", + "capital pool": "资金池", + "Unclaimed income": "待领取收益", + "pledge": "质押" } diff --git a/src/components/Menu/config.ts b/src/components/Menu/config.ts index e9ed631..bc1f065 100644 --- a/src/components/Menu/config.ts +++ b/src/components/Menu/config.ts @@ -35,28 +35,28 @@ const config: (t: ContextApi['t']) => MenuEntry[] = (t) => [ icon: 'FarmIcon', href: 'https://pancake.kiemtienonline360.com/#/pool', }, + // { + // label: t('Farms'), + // icon: 'FarmIcon', + // href: '/farms', + // }, + // { + // label: t('Pools'), + // icon: 'PoolIcon', + // href: '/pools', + // }, { - label: t('Farms'), - icon: 'FarmIcon', - href: '/farms', - }, - { - label: t('Pools'), - icon: 'PoolIcon', - href: '/pools', - }, - { - label: t('Referral'), + label: t('recommend'), icon: 'PoolIcon', href: '/referral', }, + // { + // label: 'NFT', + // icon: 'TicketIcon', + // href: '/nft', + // }, { - label: 'NFT', - icon: 'TicketIcon', - href: '/nft', - }, - { - label: t('Board'), + label: t('capital pool'), icon: 'TicketIcon', href: '/board', }, diff --git a/src/components/Menu/index.tsx b/src/components/Menu/index.tsx index 3cc7886..91091e0 100644 --- a/src/components/Menu/index.tsx +++ b/src/components/Menu/index.tsx @@ -66,7 +66,6 @@ const Menu = (props) => { useEffect(() => { getDetails() }, []) - return ( { diff --git a/src/views/Announcement/components/ListItem.tsx b/src/views/Announcement/components/ListItem.tsx index 9f9f1df..9e9e455 100644 --- a/src/views/Announcement/components/ListItem.tsx +++ b/src/views/Announcement/components/ListItem.tsx @@ -6,6 +6,7 @@ interface InfoProps { title?: string content?: string publishTime?: number + top?: boolean } const FlexTable = styled(Flex)` @@ -18,9 +19,10 @@ const FlexTable = styled(Flex)` const TableInfo = styled.div` width: 70%; ` -const TextTitle = styled(Text)` +const FlexTitle = styled(Flex)` font-size: 18px; color: #333333; + align-items: center; ` const TextInfo = styled(Text)` overflow: hidden; @@ -36,13 +38,28 @@ const TextTime = styled(Text)` font-size: 18px; color: #999999; ` +const TextTop = styled(Flex)` + margin-left: 10px; + width: 50px; + height: 25px; + align-items: center; + justify-content: center; + background: #eff4f5; + opacity: 0.75; + border-radius: 15px; + font-size: 12px; + color: #1fc7d4; +` -const ListItem: React.FC = ({ title, content, publishTime }) => { +const ListItem: React.FC = ({ title, content, publishTime, top = false }) => { return ( <> - {title} + + {title} + {top ? 置顶 : ''} + {content} {publishTime} diff --git a/src/views/Announcement/index.tsx b/src/views/Announcement/index.tsx index 6cfe72f..3d6dace 100644 --- a/src/views/Announcement/index.tsx +++ b/src/views/Announcement/index.tsx @@ -186,7 +186,7 @@ const Announcement: React.FC = () => {
{list.map((item) => ( lookDetail(item.id)}> - + ))}
diff --git a/src/views/Board/components/BoardCard/BoardCard.tsx b/src/views/Board/components/BoardCard/BoardCard.tsx index b9e5dc9..4dc8657 100644 --- a/src/views/Board/components/BoardCard/BoardCard.tsx +++ b/src/views/Board/components/BoardCard/BoardCard.tsx @@ -62,7 +62,7 @@ const FCard = styled.div` padding: 24px; position: relative; text-align: center; - min-height: 310px; + min-height: 410px; ` const Divider = styled.div` diff --git a/src/views/Board/components/BoardCard/CardActionsContainer.tsx b/src/views/Board/components/BoardCard/CardActionsContainer.tsx index cf28182..b853961 100644 --- a/src/views/Board/components/BoardCard/CardActionsContainer.tsx +++ b/src/views/Board/components/BoardCard/CardActionsContainer.tsx @@ -59,7 +59,7 @@ const CardActions: React.FC = ({ board, account }) => { - {t('TotalProfit')} + {t('Unclaimed income')} diff --git a/src/views/Board/components/BoardCard/StakeAction.tsx b/src/views/Board/components/BoardCard/StakeAction.tsx index ecd15a5..cf704b4 100644 --- a/src/views/Board/components/BoardCard/StakeAction.tsx +++ b/src/views/Board/components/BoardCard/StakeAction.tsx @@ -59,7 +59,7 @@ const StakeAction: React.FC = ({ stakedBalance, tokenBalan } const renderStakingButtons = () => { return rawStakedBalance === 0 ? ( - + ) : ( {userData.stakedBalance > 0 ? ( diff --git a/src/views/Board/components/DepositModal.tsx b/src/views/Board/components/DepositModal.tsx index 60c47b1..cb9c22b 100644 --- a/src/views/Board/components/DepositModal.tsx +++ b/src/views/Board/components/DepositModal.tsx @@ -45,7 +45,7 @@ const DepositModal: React.FC = ({ }, [fullBalance, setVal]) return ( - + { Object.keys(item.linkMap).forEach((key) => { links.push({ name: key, link: item.linkMap[key], icon: item.iconResource.url }) }) - list.push({ icon: item.iconResource.url, list: links }) + list.push({ icon: item.iconResource.url, name: item.name, list: links }) }) setLinkList(list) setDetail(data) @@ -158,8 +158,8 @@ const FristCom: React.FC = () => { }, []) const openLink = (link) => { console.log('link:', link) - // window.open(link) - window.location.href = link + window.open(link) + // window.location.href = link } return ( <> @@ -185,6 +185,7 @@ const FristCom: React.FC = () => {