From ca02261265258e33f8c36c1357c56dfbb6c917d2 Mon Sep 17 00:00:00 2001 From: Sahas Date: Fri, 9 Jun 2023 16:34:55 +0530 Subject: [PATCH] feat: listing view pages --- pages/bounties/index.tsx | 6 +-- .../Listing/Tracks/AboutTrackCard.tsx | 51 ++++++++++--------- .../Listing/Tracks/DelegateModal.tsx | 4 +- src/ui-components/FilterByTags.tsx | 6 +-- src/ui-components/TopicTag.tsx | 16 +++--- styles/globals.css | 2 + tailwind.config.js | 5 ++ 7 files changed, 50 insertions(+), 40 deletions(-) diff --git a/pages/bounties/index.tsx b/pages/bounties/index.tsx index d19c89f5e6..d15147756a 100644 --- a/pages/bounties/index.tsx +++ b/pages/bounties/index.tsx @@ -68,17 +68,17 @@ const Bounties: FC = (props) => { return ( <> -

On Chain Bounties

+

On Chain Bounties

{/* Intro and Create Post Button */}
-

+

This is the place to discuss on-chain bounties. Bounty posts are automatically generated as soon as they are created on-chain. Only the proposer is able to edit them.

-
+

{ count } Bounties

diff --git a/src/components/Listing/Tracks/AboutTrackCard.tsx b/src/components/Listing/Tracks/AboutTrackCard.tsx index 5379349d64..4e4da7b5b1 100644 --- a/src/components/Listing/Tracks/AboutTrackCard.tsx +++ b/src/components/Listing/Tracks/AboutTrackCard.tsx @@ -99,14 +99,14 @@ const AboutTrackCard: FC = (props) => { }, [network, trackName]); return ( -
-
+
+
-

+

About {trackName.split(/(?=[A-Z])/).join(' ')}

-

+

#{trackMetaData.trackId}

@@ -115,20 +115,20 @@ const AboutTrackCard: FC = (props) => {

{trackMetaData?.group}

-

{trackMetaData?.description}

+

{trackMetaData?.description}

- {trackMetaData.maxDeciding && - Capacity: - {trackMetaData.maxDeciding} + {trackMetaData.maxDeciding && + MAX DECIDING + {trackMetaData.maxDeciding} } - {trackMetaData.decisionDeposit && - Decision Deposit: - + {trackMetaData.decisionDeposit && + DECISION DEPOSIT + {trackMetaData.decisionDeposit && formatUSDWithUnits(formatBnBalance(`${trackMetaData.decisionDeposit}`.startsWith('0x') ? new BN(`${trackMetaData.decisionDeposit}`.slice(2), 'hex') : trackMetaData.decisionDeposit, { numberAfterComma: 2, withThousandDelimitor: false, withUnit: true }, network), 1) @@ -139,32 +139,35 @@ const AboutTrackCard: FC = (props) => { - {trackMetaData.preparePeriod && - Prepare Period: - {blocksToRelevantTime(network, Number(trackMetaData.preparePeriod))} + {trackMetaData.confirmPeriod && + CONFIRM PERIOD + {blocksToRelevantTime(network, Number(trackMetaData.confirmPeriod))} } - {trackMetaData.confirmPeriod && - Confirm Period: - {blocksToRelevantTime(network, Number(trackMetaData.confirmPeriod))} + {trackMetaData.preparePeriod && + PREPARE PERIOD + {blocksToRelevantTime(network, Number(trackMetaData.preparePeriod))} } - {trackMetaData.minEnactmentPeriod && - Min Enactment Period: - {blocksToRelevantTime(network, Number(trackMetaData.minEnactmentPeriod))} + {trackMetaData.minEnactmentPeriod && + MIN ENACTMENT PERIOD + {blocksToRelevantTime(network, Number(trackMetaData.minEnactmentPeriod))} } - {trackMetaData.decisionPeriod && - Decision Period: - {blocksToRelevantTime(network,Number(trackMetaData.decisionPeriod))} + {trackMetaData.decisionPeriod && + DECISION PERIOD + {blocksToRelevantTime(network,Number(trackMetaData.decisionPeriod))} }
- +
{!['moonbeam', 'moonbase', 'moonriver'].includes(network) && diff --git a/src/components/Listing/Tracks/DelegateModal.tsx b/src/components/Listing/Tracks/DelegateModal.tsx index bffe6fc8bf..4c5c2dbdd0 100644 --- a/src/components/Listing/Tracks/DelegateModal.tsx +++ b/src/components/Listing/Tracks/DelegateModal.tsx @@ -299,9 +299,9 @@ const DelegateModal = ({ className, defaultTarget, open, setOpen, trackNum }: Pr return ( <> - {!open && !setOpen && } { placement="bottomRight" > -
+
Filter - {openFilter?:} +
diff --git a/src/ui-components/TopicTag.tsx b/src/ui-components/TopicTag.tsx index 62b5ecca7e..db24656ce1 100644 --- a/src/ui-components/TopicTag.tsx +++ b/src/ui-components/TopicTag.tsx @@ -33,19 +33,19 @@ export default styled(TopicTag)` } &.Democracy { - background-color: var(--blue_primary) !important; - color: white; + background-color: #EEF8FF !important; + color: #093874; } &.Council { - background-color: var(--pink_secondary) !important; - color: white; + background-color: #FFEDF2 !important; + color: #CD1F59; } &.Treasury { - background-color: var(--pink_primary) !important; - color: white; + background-color: #FFF4EB !important; + color: #AC6A30; } &.Technical, &.Tech { - background-color: var(--pink_primary) !important; - color: white; + background-color: #FEF7DD !important; + color: #75610E; } `; diff --git a/styles/globals.css b/styles/globals.css index e660267af6..56d3578cd2 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -5,6 +5,8 @@ :root { --navBlue: #90a0b7; --sidebarBlue: #334d6e; + --bodyBlue: #243a57; + --lightBlue: #485f7d; --black_primary: #2e2f30; --blue_primary: #4d9999; --blue_secondary: #ebf0f5; diff --git a/tailwind.config.js b/tailwind.config.js index 18d4161e9b..a668dc67b0 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -17,6 +17,8 @@ module.exports = { colors: { navBlue: 'var(--navBlue)', sidebarBlue: 'var(--sidebarBlue)', + bodyBlue: 'var(--bodyBlue)', + lightBlue: 'var(--lightBlue)', blue_primary: 'var(--blue_primary)', blue_secondary: 'var(--blue_secondary)', green_primary: 'var(--green_primary)', @@ -41,6 +43,9 @@ module.exports = { }, screens: { 'xs': '320px' + }, + borderRadius: { + 'xxl': '0.875rem' } } },