Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/app/(Website)/WorldMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ const WorldMap = () => {
<div className="m-auto w-full md:w-2/5 max-w-xl px-4">
{/* Text section */}
<div className="flex flex-col space-y-4">
<h6 className="uppercase text-sm sm:text-md text-pink-4 font-bold font-inter">Join us</h6>
<h6 className="uppercase text-sm sm:text-md text-pink-300 font-bold font-inter">
Join us
</h6>
<h1 className="text-3xl sm:text-4xl md:text-5xl font-bold leading-tight font-syne">
Join traders and builders around the world
</h1>
Expand Down
2 changes: 1 addition & 1 deletion src/app/[network]/(App)/bulkcore1/CoreUtilisation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const CoreUtilisation: React.FC = () => {
<button
key={key}
onClick={() => toggleActiveDataSet(key as DataSetKey)}
className={`py-2 px-4 text-left hover:font-semibold border-b border-gray-18 ${activeDataSet === key ? 'text-pink-5 dark:text-pink-400 font-semibold' : 'text-gray-16'}`}
className={`py-2 px-4 text-left hover:font-semibold border-b border-gray-18 ${activeDataSet === key ? 'text-pink-500 dark:text-pink-400 font-semibold' : 'text-gray-16'}`}
>
{dataConfigs[key as DataSetKey].label}
</button>
Expand Down
8 changes: 6 additions & 2 deletions src/app/[network]/(App)/bulkcore1/TimeSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import WalletStatus from '@/components/walletStatus/WalletStatus'
import { network_list } from '@/config/network'
import { useCurrentBlockNumber, useSubstrateQuery } from '@/hooks/useSubstrateQuery'
import { saleStatus } from '@/utils/broker'
import { StatusCode } from '@/utils/broker/saleStatus'
import { getChainFromPath } from '@/utils/common/chainPath'
import {
ConfigurationType,
Expand Down Expand Up @@ -59,10 +60,11 @@ export default function BrokerSaleInfo() {
// Update saleStage every second based on the currentBlockNumber
const [saleStage, setSaleStage] = useState('')
const [saleTitle, setSaleTitle] = useState('')
const [statusCode, setStatusCode] = useState<StatusCode | null>(null)
const [timeRemaining, setTimeRemaining] = useState('')
useEffect(() => {
if (saleInfo && configuration && brokerConstants) {
const { statusMessage, timeRemaining, statusTitle } = saleStatus(
const { statusMessage, timeRemaining, statusTitle, statusCode } = saleStatus(
currentBlockNumber,
saleInfo,
configuration,
Expand All @@ -71,6 +73,7 @@ export default function BrokerSaleInfo() {
setTimeRemaining(timeRemaining)
setSaleTitle(statusTitle)
setSaleStage(statusMessage)
setStatusCode(statusCode)
}
}, [currentBlockNumber, saleInfo, configuration, brokerConstants])

Expand Down Expand Up @@ -148,7 +151,7 @@ export default function BrokerSaleInfo() {
<Border>
<div className=" p-10">
<div>
<div className="flex justify-between rounded-full mx-10 bg-pink-4 dark:bg-pink-400 dark:bg-opacity-95 px-16 py-10 bg-opacity-30 items-center my-6">
<div className="flex justify-between rounded-full mx-10 bg-pink-300 dark:bg-pink-400 dark:bg-opacity-95 px-16 py-10 bg-opacity-30 items-center my-6">
<div className="text-xl xl:text-2xl font-bold font-unbounded uppercase text-gray-21 dark:text-white ">
{saleTitle}
</div>
Expand Down Expand Up @@ -181,6 +184,7 @@ export default function BrokerSaleInfo() {
saleInfo={saleInfo}
formatPrice={`${(currentPrice / 10 ** 12).toFixed(8)} ${tokenSymbol}`}
currentPrice={currentPrice}
statusCode={statusCode}
/>
</Border>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,11 @@ const BrokerRegionData: FC<BrokerRegionDataProps> = ({ coreNb, regionId, mask })
<div>
<div className="">
<CoreItemExtensive
timeBought="Jan 2024"
timeBought="- 2024"
owner={region.owner.owner}
amITheOwner={region.owner.owner === activeAccount.address}
paid={region.owner.paid}
coreNumber={region.detail[0].core}
size="1"
phase="- Period"
cost={parseNativeTokenToHuman({ paid: region.owner.paid, decimals: tokenDecimals })}
currencyCost={tokenSymbol}
Expand All @@ -172,7 +171,7 @@ const BrokerRegionData: FC<BrokerRegionDataProps> = ({ coreNb, regionId, mask })
<Border>
<div className="p-10">
<div>
<div className="flex justify-between rounded-full mx-10 bg-pink-4 dark:bg-pink-400 px-16 py-10 bg-opacity-30 dark:bg-opacity-80 items-center my-6">
<div className="flex justify-between rounded-full mx-10 bg-pink-300 dark:bg-pink-400 px-16 py-10 bg-opacity-30 dark:bg-opacity-80 items-center my-6">
<div className="text-xl font-bold font-unbounded uppercase text-gray-21">
{saleTitle}
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/components/activityBoxes/BoxesContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,21 @@ const SquareBoxesContainer: React.FC<SquareBoxesContainerProps> = ({
<div className="flex flex-wrap justify-center items-center gap-4">{squareBoxes} </div>
<div className="flex justify-around mt-8">
<button
className="rounded-ful font-black rounded-2xl bg-pink-2 hover:bg-pink-4 border border-gray-8 text-xs inline-flex items-center justify-center p-2 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-2 focus:ring-primary-3"
className="rounded-ful font-black rounded-2xl bg-pink-2 hover:bg-pink-300 border border-gray-8 text-xs inline-flex items-center justify-center p-2 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-2 focus:ring-primary-3"
onClick={handleSetHalfToTrue}
>
50/50
</button>

<button
className="rounded-ful font-black rounded-2xl bg-pink-2 hover:bg-pink-4 border border-gray-8 text-xs inline-flex items-center justify-center p-2 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-2 focus:ring-primary-3"
className="rounded-ful font-black rounded-2xl bg-pink-2 hover:bg-pink-300 border border-gray-8 text-xs inline-flex items-center justify-center p-2 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-2 focus:ring-primary-3"
onClick={handleSetAlternateToTrue}
>
Alternating
</button>

<button
className="rounded-ful font-black rounded-2xl bg-pink-2 hover:bg-pink-4 border border-gray-8 text-xs inline-flex items-center justify-center p-2 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-2 focus:ring-primary-3"
className="rounded-ful font-black rounded-2xl bg-pink-2 hover:bg-pink-300 border border-gray-8 text-xs inline-flex items-center justify-center p-2 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-2 focus:ring-primary-3"
onClick={handleReset}
>
Reset
Expand Down
4 changes: 2 additions & 2 deletions src/components/broker/extrinsics/PartitionCoreModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ const PartitionCoreModal: FC<PartitionCoreModalProps> = ({ isOpen, onClose, regi
<div className="flex flex-col p-4 ">
<div className="pb-8">
<div className="mx-10 mt-4 mb-24 relative">
<div className="w-full bg-pink-4 bg-opacity-20 h-3 rounded-full overflow-hidden">
<div className="w-full bg-pink-300 bg-opacity-20 h-3 rounded-full overflow-hidden">
<div
className="bg-pink-4 bg-opacity-50 h-full"
className="bg-pink-300 bg-opacity-50 h-full"
style={{ width: `${pivotPercentage}%` }}
></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/button/PrimaryButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const PrimaryButton: FC<PrimaryButtonProps> = ({
<button
onClick={onClick}
disabled={disabled}
className={`${disabled ? 'bg-gray-2 dark:bg-gray-20 dark:text-gray-14 text-gray-14 cursor-not-allowed' : 'bg-pink-4 dark:bg-pink-400 hover:bg-pink-5 dark:hover:bg-pink-500 text-black dark:text-gray-1 cursor-pointer'} rounded-ful font-unbounded uppercase font-black rounded-2xl border border-gray-8 dark:border-gray-18 text-xs inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-4 focus:ring-primary-3`}
className={`${disabled ? 'bg-gray-2 dark:bg-gray-20 dark:text-gray-14 text-gray-14 cursor-not-allowed' : 'bg-pink-300 dark:bg-pink-400 hover:bg-pink-5 dark:hover:bg-pink-500 text-black dark:text-gray-1 cursor-pointer'} rounded-ful font-unbounded uppercase font-black rounded-2xl border border-gray-8 dark:border-gray-18 text-xs inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-4 focus:ring-primary-3`}
>
{title}
</button>
Expand All @@ -29,7 +29,7 @@ const PrimaryButton: FC<PrimaryButtonProps> = ({
return (
<Link
href={location}
className="rounded-ful font-unbounded uppercase font-black rounded-2xl bg-pink-4 dark:bg-pink-400 hover:bg-pink-5 dark:hover:bg-pink-500 border border-gray-8 dark:border-gray-18 text-xs inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-4 focus:ring-primary-3"
className="rounded-ful font-unbounded uppercase font-black rounded-2xl bg-pink-300 dark:bg-pink-400 hover:bg-pink-5 dark:hover:bg-pink-500 border border-gray-8 dark:border-gray-18 text-xs inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-4 focus:ring-primary-3"
>
{title}
</Link>
Expand Down
4 changes: 2 additions & 2 deletions src/components/button/PrimaryButtonWeb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const PrimaryButtonWeb: FC<PrimaryButtonProps> = ({
<button
onClick={onClick}
disabled={disabled}
className={`${disabled ? 'bg-gray-2 text-gray-14 cursor-not-allowed' : ' bg-gradient-to-r from-purple-4 to-primary-5 hover:bg-pink-4 text-white cursor-pointer'} rounded-ful font-syne font-black rounded-2xl border border-gray-8 text-md inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-black hover:bg-primary-800 focus:ring-4 focus:ring-primary-3`}
className={`${disabled ? 'bg-gray-2 text-gray-14 cursor-not-allowed' : ' bg-gradient-to-r from-purple-4 to-primary-5 hover:bg-pink-300 text-white cursor-pointer'} rounded-ful font-syne font-black rounded-2xl border border-gray-8 text-md inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-black hover:bg-primary-800 focus:ring-4 focus:ring-primary-3`}
>
{title}
</button>
Expand All @@ -29,7 +29,7 @@ const PrimaryButtonWeb: FC<PrimaryButtonProps> = ({
return (
<Link
href={location}
className="rounded-ful font-syne font-black rounded-2xl bg-gradient-to-r from-pink-4 to-purple-5 hover:from-pink-5 hover:to-purple-6 border border-gray-16 text-md inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-white hover:bg-primary-800 focus:ring-4 focus:ring-primary-3"
className="rounded-ful font-syne font-black rounded-2xl bg-gradient-to-r from-pink-300 to-purple-5 hover:from-pink-5 hover:to-purple-6 border border-gray-16 text-md inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-white hover:bg-primary-800 focus:ring-4 focus:ring-primary-3"
>
{title}
</Link>
Expand Down
30 changes: 2 additions & 28 deletions src/components/button/PrimaryButtonWithAutoTeleport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import PrimaryButton, { PrimaryButtonProps } from '@/components/button/PrimaryBu
import ModalNotification from '@/components/modal/ModalNotification'
import ModalTranasaction from '@/components/modal/ModalTransaction'
import { useTeleport } from '@/hooks/useTeleport'
import { FormControlLabel, Switch } from '@mui/material'
import { BN } from '@polkadot/util'
import { FC, useState } from 'react'
import { FC } from 'react'

export interface PrimaryButtonWithAutoTeleportProps extends PrimaryButtonProps {
/** Amount needed for the action. Determines if teleport will happen or not. */
Expand All @@ -21,7 +20,7 @@ const PrimaryButtonWithAutoTeleport: FC<PrimaryButtonWithAutoTeleportProps> = ({
amountNeeded,
teleportTo,
}) => {
const [autoTeleportEnabled, setAutoTeleportEnabled] = useState(true)
const autoTeleportEnabled = true
const { autoTeleport, notification, setNotification, isTeleporting, teleportMessage } =
useTeleport(onClick)

Expand All @@ -35,19 +34,6 @@ const PrimaryButtonWithAutoTeleport: FC<PrimaryButtonWithAutoTeleportProps> = ({

return (
<div className="flex flex-col items-center gap-3">
<FormControlLabel
disabled={disabled}
control={
<Switch
checked={autoTeleportEnabled}
onChange={(e) => setAutoTeleportEnabled(e.target.checked)}
size="small"
sx={switchStyle}
/>
}
label="Auto Teleport"
/>

<PrimaryButton title={title} location={location} onClick={handleClick} disabled={disabled} />

<ModalNotification
Expand All @@ -62,16 +48,4 @@ const PrimaryButtonWithAutoTeleport: FC<PrimaryButtonWithAutoTeleportProps> = ({
)
}

const switchStyle = {
'& .MuiSwitch-switchBase.Mui-checked': {
color: '#FF6370',
},
'& .MuiSwitch-switchBase + .MuiSwitch-track': {
backgroundColor: '#E6B3CA',
},
'& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': {
backgroundColor: '#E6B3CA',
},
}

export default PrimaryButtonWithAutoTeleport
2 changes: 1 addition & 1 deletion src/components/button/SecondaryButtonWeb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const SecondaryButtonWeb: FC<PrimaryButtonProps> = ({
<button
onClick={onClick}
disabled={disabled}
className={`${disabled ? 'bg-gray-2 text-gray-14 cursor-not-allowed' : ' bg-gradient-to-r from-purple-4 to-primary-5 hover:bg-pink-4 text-white cursor-pointer'} rounded-ful font-syne font-black rounded-2xl text-md inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-white hover:bg-primary-800 focus:ring-4 focus:ring-primary-3`}
className={`${disabled ? 'bg-gray-2 text-gray-14 cursor-not-allowed' : ' bg-gradient-to-r from-purple-4 to-primary-5 hover:bg-pink-300 text-white cursor-pointer'} rounded-ful font-syne font-black rounded-2xl text-md inline-flex items-center justify-center px-12 py-3 mr-3 text-center text-white hover:bg-primary-800 focus:ring-4 focus:ring-primary-3`}
>
{title}
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/button/SideButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const SideButton: FC<SideButtonProps> = ({
return (
<Link
href={location}
className="rounded-ful font-unbounded uppercase font-black rounded-2xl bg-pink-3 hover:bg-pink-4 border border-gray-8 text-xs inline-flex items-center justify-center px-12 py-3 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-4 focus:ring-primary-3"
className="rounded-ful font-unbounded uppercase font-black rounded-2xl bg-pink-3 hover:bg-pink-300 border border-gray-8 text-xs inline-flex items-center justify-center px-12 py-3 text-center text-black dark:text-gray-1 hover:bg-primary-800 focus:ring-4 focus:ring-primary-3"
>
{title}
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/components/card/AboutCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const AboutCard: React.FC<FeatureCardProps> = ({ title, description }) => {
<BorderBlack>
<div className="px-8 py-12">
<h4 className="font-semibold font-syne text-2xl">{title}</h4>
<div className="w-10 h-1 my-3 rounded-full bg-pink-300"></div>
<div className="w-10 h-1 my-3 rounded-full bg-pink-300 "></div>
<p className="text-sm">{description}</p>
<div className="py-2"></div>
</div>
Expand Down
23 changes: 7 additions & 16 deletions src/components/cores/CoreItemExtensive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ interface CardProps {
amITheOwner: boolean
paid: string
coreNumber: string
size: string
phase: string
cost: string
currencyCost: string
Expand All @@ -24,7 +23,6 @@ const CoreItemExtensive: React.FC<CardProps> = ({
amITheOwner,
paid,
coreNumber,
size,
phase,
cost,
currencyCost,
Expand All @@ -41,7 +39,7 @@ const CoreItemExtensive: React.FC<CardProps> = ({
<div className="px-10">
<Image src="/assets/Images/core2.png" alt="Lastic Logo" width={400} height={400} />
</div>
<div className="flex w-full flex-col px-5 items-start justify-start space-y-3">
<div className="flex w-full flex-col pl-10 items-start justify-start space-y-3">
<div>
<div className="block mt-1 text-md leading-tight font-medium text-black dark:text-gray-1">
Owner: {toShortAddress(owner)} {amITheOwner ? '(You)' : '(Not you)'}
Expand All @@ -59,21 +57,14 @@ const CoreItemExtensive: React.FC<CardProps> = ({
</div>
</div>
<div className="flex w-full flex-col px-5 items-start justify-start space-y-3">
<div>
<p className="text-gray-12">Size: {size} core</p>
<p className="text-gray-12">Phase: {phase}</p>
<div className="text-md text-black dark:text-gray-1 ">
<p>Mask: {mask}</p>
</div>
<div>
<p className="text-gray-12">
Cost: {cost} {currencyCost}
</p>
<div className="text-md text-black dark:text-gray-1 ">
<p>Begin: {begin}</p>
</div>
<div className="">
<div className="text-sm text-gray-10">
<p>Mask: {mask}</p>
<p>Begin: {begin}</p>
<p>End: {end}</p>
</div>
<div className="text-md text-black dark:text-gray-1 ">
<p>End: {end}</p>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/timelineComp/TimelineComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const Slider: FC<SliderPropeTypes> = ({ currentBlockNumber, saleInfo, config, co

return (
<div className="mx-10 my-16 relative">
<div className="w-full bg-pink-4 dark:bg-pink-400 dark:bg-opacity-20 bg-opacity-20 h-3 rounded-full overflow-hidden">
<div className="w-full bg-pink-300 dark:bg-pink-400 dark:bg-opacity-20 bg-opacity-20 h-3 rounded-full overflow-hidden">
<div
className="bg-pink-4 dark:bg-pink-400 dark:bg-opacity-40 bg-opacity-50 h-full"
className="bg-pink-300 dark:bg-pink-400 dark:bg-opacity-40 bg-opacity-50 h-full"
style={{ width: `${safePurchasePercentage}%` }}
></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/timelineComp/TimelineUtilize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ const Slider: FC<SliderPropeTypes> = ({ currentRelayBlock, saleInfo, config, con
{regionBeginTimestamp !== null ? regionBeginTimestamp : 'Loading...'}
Region End Timestamp: {regionEndTimestamp !== null ? regionEndTimestamp : 'Loading...'} */}
</div>
<div className="w-full bg-pink-4 bg-opacity-20 h-3 rounded-full overflow-hidden">
<div className="w-full bg-pink-300 bg-opacity-20 h-3 rounded-full overflow-hidden">
<div
className="bg-pink-4 bg-opacity-50 h-full"
className="bg-pink-300 bg-opacity-50 h-full"
style={{ width: `${safeutilizationPercentage}%` }}
></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/timelineComp/TimelineUtilizeCore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ const Slider: FC<SliderPropeTypes> = ({ currentRelayBlock, beginRegion, config,
{regionBeginTimestamp !== null ? regionBeginTimestamp : 'Loading...'}
Region End Timestamp: {regionEndTimestamp !== null ? regionEndTimestamp : 'Loading...'} */}
</div>
<div className="w-full bg-pink-4 dark:bg-pink-400 bg-opacity-20 dark:bg-opacity-20 h-3 rounded-full overflow-hidden">
<div className="w-full bg-pink-300 dark:bg-pink-400 bg-opacity-20 dark:bg-opacity-20 h-3 rounded-full overflow-hidden">
<div
className="bg-pink-4 dark:bg-pink-400 bg-opacity-50 dark:bg-opacity-50 h-full"
className="bg-pink-300 dark:bg-pink-400 bg-opacity-50 dark:bg-opacity-50 h-full"
style={{ width: `${safeutilizationPercentage}%` }}
></div>
</div>
Expand Down
Loading