Skip to content

Commit

Permalink
Merge pull request #119 from TrustlessComputer/feat/whitelist_munual
Browse files Browse the repository at this point in the history
update css
  • Loading branch information
0xmegalodon authored Jan 29, 2024
2 parents fb00954 + e3e56ac commit 8be68ed
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 86 deletions.
2 changes: 2 additions & 0 deletions src/interfaces/leader-board-point.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface ILeaderBoardPoint {
gas_point: number;
content_point: number;
boost: string;
view_boost: string;
num_view: string;
num_retweet: string;
num_like: string;
Expand All @@ -36,6 +37,7 @@ export interface ILeaderBoardPoint {
levelRender?:number
lastRender?:boolean
bvm_balance: string;
bvm_balance_not_boost: string;
eth_balance: string;
btc_balance: string;
usdt_value?:string;
Expand Down
115 changes: 46 additions & 69 deletions src/modules/PublicSale/BuyForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,20 +149,31 @@ const PrivateSaleForm = ({ vcInfo }: { vcInfo?: VCInfo }) => {
)}`
: '-'}
</Text>
<Text color={"rgba(255, 255, 255, 0.7)"} fontSize={"12px"} fontWeight={"500"}>
{token
? `(${formatCurrency(
userContributeInfo?.bvm_balance_not_boost,
MIN_DECIMAL,
MAX_DECIMAL,
'BTC',
false,
)} BVM)`
: '-'}
</Text>
</Flex>
<Flex
gap={1}
w={'fit-content'}
p={'3px 8px'}
// p={'3px 8px'}
alignItems={'center'}
bg={
'linear-gradient(90deg, rgba(0, 245, 160, 0.15) 0%, rgba(0, 217, 245, 0.15) 100%)'
}
// bg={
// 'linear-gradient(90deg, rgba(0, 245, 160, 0.15) 0%, rgba(0, 217, 245, 0.15) 100%)'
// }
>
<Text fontSize={'10px'} fontWeight={'400'} mt="2.5px" color={'#FFFFFF'}>
YOU GET
<Text fontSize={'12px'} fontWeight={'500'} color={'#FFFFFF'}>
GET
</Text>
<Text fontSize={'12px'} fontWeight={'600'} className={s.youGet}>
<Text fontSize={'12px'} fontWeight={'500'} className={s.youGet}>
{token
? formatCurrency(
userContributeInfo?.bvm_balance,
Expand All @@ -172,78 +183,44 @@ const PrivateSaleForm = ({ vcInfo }: { vcInfo?: VCInfo }) => {
: '-'}{' '}
BVM
</Text>
<Text fontSize={'12px'} fontWeight={'500'} color={'#FFFFFFF'}>
(
{token
? formatCurrency(
userContributeInfo?.bvm_percent,
<Flex
gap={1}
alignItems={'center'}
bg={"linear-gradient(90deg, rgba(0, 245, 160, 0.15) 0%, rgba(0, 217, 245, 0.15) 100%)"}
borderRadius={"100px"}
p={"2px 6px"}
>
<svg width="9" height="12" viewBox="0 0 9 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.66601 5.18883H5.39329L6.12056 0.825195L0.666016 7.37065H3.93874L3.21147 11.7343L8.66601 5.18883Z" fill="url(#paint0_linear_30246_12163)"/>
<defs>
<linearGradient id="paint0_linear_30246_12163" x1="0.666016" y1="6.27974" x2="8.66601" y2="6.27974" gradientUnits="userSpaceOnUse">
<stop stop-color="#00F5A0"/>
<stop offset="1" stop-color="#00D9F5"/>
</linearGradient>
</defs>
</svg>
<Text
fontSize={'12px'}
fontWeight={'500'}
className={s.boost}
>
{token
? `${formatCurrency(
userContributeInfo?.view_boost,
MIN_DECIMAL,
MIN_DECIMAL,
'BTC',
true,
)
: '-'}
%)
</Text>
)}%`
: '-'}
</Text>
</Flex>
</Flex>
</Flex>
}
title={
<Flex justifyContent={'space-between'}>
<Text>Your contribution</Text>
<Flex gap={1} alignItems={'center'}>
<svg
width="17"
height="17"
viewBox="0 0 17 17"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clip-path="url(#clip0_29914_7369)">
<path
d="M13.6676 7.32502H9.304L10.2737 1.50684L3.00098 10.2341H7.36461L6.39491 16.0523L13.6676 7.32502Z"
fill="url(#paint0_linear_29914_7369)"
/>
</g>
<defs>
<linearGradient
id="paint0_linear_29914_7369"
x1="3.00098"
y1="8.77956"
x2="13.6676"
y2="8.77956"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="white" />
<stop offset="1" stop-color="#35CCA6" />
</linearGradient>
<clipPath id="clip0_29914_7369">
<rect
width="16"
height="16"
fill="white"
transform="translate(0.333984 0.780273)"
/>
</clipPath>
</defs>
</svg>
<Text
fontSize={'14px'}
fontWeight={'500'}
color={'rgba(255, 255, 255, 0.7)'}
className={s.boost}
>
{token
? `${formatCurrency(
userContributeInfo?.boost,
MIN_DECIMAL,
MIN_DECIMAL,
'BTC',
true,
)}%`
: '-'}
</Text>
</Flex>
</Flex>
}
/>
Expand Down
17 changes: 9 additions & 8 deletions src/modules/PublicSale/BuyForm/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,20 @@
}

.boost {
background: -webkit-linear-gradient(90deg, #ffffff 0%, #35cca6 100%);
background: -moz-linear-gradient(90deg, #ffffff 0%, #35cca6 100%);
background: linear-gradient(90deg, #ffffff 0%, #35cca6 100%);
background: -webkit-linear-gradient(90deg, #00F5A0 0%, #00D9F5 100%);
background: -moz-linear-gradient(90deg, #00F5A0 0%, #00D9F5 100%);
background: linear-gradient(90deg, #00F5A0 0%, #00D9F5 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

.youGet {
background: -webkit-linear-gradient(90deg, #00f5a0 0%, #00d9f5 100%);
background: -moz-linear-gradient(90deg, #00f5a0 0%, #00d9f5 100%);
background: linear-gradient(90deg, #00f5a0 0%, #00d9f5 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
//background: -webkit-linear-gradient(90deg, #00f5a0 0%, #00d9f5 100%);
//background: -moz-linear-gradient(90deg, #00f5a0 0%, #00d9f5 100%);
//background: linear-gradient(90deg, #00f5a0 0%, #00d9f5 100%);
//-webkit-background-clip: text;
//-webkit-text-fill-color: transparent;
color: #FA4E0E;
}

.price {
Expand Down
14 changes: 10 additions & 4 deletions src/modules/PublicSale/components/contributorInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ import { formatCurrency } from '@/utils/format';
import { MAX_DECIMAL, MIN_DECIMAL } from '@/constants/constants';

const ContributorInfo = ({data}: {data?: ILeaderBoardPoint}) => {
console.log('data', data);
return (
<Flex direction={'column'} w={'284px'} gap={3} className={s.container}>
<HorizontalItem className={s.rowData} label={'USER'} value={data?.twitter_name} />
<HorizontalItem className={s.rowData} label={'RANK'} value={formatCurrency(data?.ranking, 0, 0, 'BTC', true)} />
<HorizontalItem className={s.rowData} label={'CONTRIBUTION'} value={`$${formatCurrency(data?.usdt_value, MIN_DECIMAL, MIN_DECIMAL, 'BTC', true)}`} />
<HorizontalItem className={s.rowData} label={'ALLOCATION'} value={<Text color={'#FF5312'}>{formatCurrency(data?.bvm_balance, MIN_DECIMAL, MAX_DECIMAL)} BVM</Text>} />
<HorizontalItem className={s.rowData} label={'BOOST'} value={
{/*<HorizontalItem className={s.rowData} label={'CONTRIBUTION'} value={`$${formatCurrency(data?.usdt_value, MIN_DECIMAL, MIN_DECIMAL, 'BTC', true)}`} />*/}
<HorizontalItem className={s.rowData} label={'ALLOCATION'} value={
<Flex gap={1}>
<Text color={'#FF5312'}>{formatCurrency(data?.bvm_balance, MIN_DECIMAL, MAX_DECIMAL)} BVM</Text>
<Text color={'#000000'}>({formatCurrency(data?.bvm_percent, MIN_DECIMAL, MIN_DECIMAL)}%)</Text>
</Flex>
} />
{/*<HorizontalItem className={s.rowData} label={'BOOST'} value={
<Flex gap={1} alignItems={'center'}>
<svg width='14' height='20' viewBox='0 0 14 20' fill='none'
xmlns='http://www.w3.org/2000/svg'>
Expand All @@ -30,7 +36,7 @@ const ContributorInfo = ({data}: {data?: ILeaderBoardPoint}) => {
</svg>
<Text fontSize={'16px'} fontWeight={'500'} className={s.boost}>{`${formatCurrency(data?.boost, MIN_DECIMAL, MIN_DECIMAL, 'BTC', true)}%`}</Text>
</Flex>
} />
} />*/}
</Flex>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}

&:last-child {
font-size: 16px;
font-size: 14px;
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/modules/PublicSale/leaderBoard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,21 +348,21 @@ const LeaderBoard = (props: IProps) => {
flexDirection="row"
gap="4px"
alignItems="center"
className={clsx(s.tagBoost, (Number(data?.boost) || 0) <= 10 ? s.boostNormal : '')}
className={clsx(s.tagBoost, (Number(data?.view_boost) || 0) <= 10 ? s.boostNormal : '')}
>
<SvgInset svgUrl={`${CDN_URL_ICONS}/${
valueToImage?.[data?.boost] || 'flash_normal.svg'
valueToImage?.[data?.view_boost] || 'flash_normal.svg'
}`}
/>
<Text
className={cs(
s.title,
s.multiplier,
s[valueToClassName[`${data?.boost}`]],
s[valueToClassName[`${data?.view_boost}`]],
data.need_active && s.isActiveRow,
)}
>
{data?.boost || 0}%
{data?.view_boost || 0}%
</Text>
</Flex>
</Flex>
Expand Down

0 comments on commit 8be68ed

Please sign in to comment.