From 3776a90ba1f1a83d237c9be4b7e38c7831823130 Mon Sep 17 00:00:00 2001 From: Kellan Wampler Date: Tue, 1 Nov 2022 11:04:24 -0400 Subject: [PATCH 1/2] Fixing layout colors when logged in. --- frontend/pages/welcome.js | 2 +- frontend/src/components/AccountIconButton.js | 1 + frontend/src/components/AddNewIconButton.js | 5 +++-- frontend/src/components/AppNavbar.js | 10 ++++------ frontend/src/components/LandingNavbar.js | 2 +- frontend/src/layouts/AppLayout.js | 9 ++++++++- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/frontend/pages/welcome.js b/frontend/pages/welcome.js index 165f87ba..9e3470e8 100644 --- a/frontend/pages/welcome.js +++ b/frontend/pages/welcome.js @@ -27,7 +27,7 @@ const Welcome = () => { return ( - + {/* { zIndex="dropdown" width={["100vw", "100vw", "18rem", "20rem", "22rem", "24rem"]} borderRadius={0} + color="black" > diff --git a/frontend/src/components/AddNewIconButton.js b/frontend/src/components/AddNewIconButton.js index b803cdf0..8c1ba2cf 100644 --- a/frontend/src/components/AddNewIconButton.js +++ b/frontend/src/components/AddNewIconButton.js @@ -7,6 +7,7 @@ import { MenuGroup, MenuDivider, IconButton, + Text, chakra, } from "@chakra-ui/react"; import { PlusSquareIcon } from "@chakra-ui/icons"; @@ -44,7 +45,7 @@ const AddNewIconButton = (props) => { }) } > - New Dashboard... + New Dashboard... @@ -54,7 +55,7 @@ const AddNewIconButton = (props) => { }) } > - New Subscription... + New Subscription... {ui.isInDashboard && New report...} diff --git a/frontend/src/components/AppNavbar.js b/frontend/src/components/AppNavbar.js index dab09f47..14f4ccba 100644 --- a/frontend/src/components/AppNavbar.js +++ b/frontend/src/components/AppNavbar.js @@ -76,7 +76,7 @@ const AppNavbar = () => { icon={} /> - + Support @@ -110,7 +110,7 @@ const AppNavbar = () => { - + {SITEMAP.map((item, idx) => { if ( !item.children && @@ -121,10 +121,9 @@ const AppNavbar = () => { key={`${idx}-${item.title}-landing-all-links`} variant="link" href={item.path} - color="white" isActive={!!(router.pathname === item.path)} > - {item.title} + {item.title} ); } else if (!item.footerOnly) { @@ -147,7 +146,7 @@ const AppNavbar = () => { passHref > - {child.title} + {child.title} ))} @@ -163,7 +162,6 @@ const AppNavbar = () => { key={`${idx}-${item.title}-navlink`} variant="link" href={item.path} - color="white" isActive={!!(router.nextRouter.pathname === item.path)} > {item.title} diff --git a/frontend/src/components/LandingNavbar.js b/frontend/src/components/LandingNavbar.js index c1282547..eae12942 100644 --- a/frontend/src/components/LandingNavbar.js +++ b/frontend/src/components/LandingNavbar.js @@ -77,7 +77,7 @@ const LandingNavbar = () => { key={`${idx}-${item.title}-landing-all-links`} variant="link" href={item.path} - color="white" + color="black" isActive={!!(router.pathname === item.path)} > {item.title} diff --git a/frontend/src/layouts/AppLayout.js b/frontend/src/layouts/AppLayout.js index d449dafa..566b65c2 100644 --- a/frontend/src/layouts/AppLayout.js +++ b/frontend/src/layouts/AppLayout.js @@ -3,6 +3,7 @@ import { getLayout as getSiteLayout } from "./RootLayout"; import React, { useContext, useEffect } from "react"; import UIContext from "../core/providers/UIProvider/context"; import AppNavbar from "../components/AppNavbar"; +import { BACKGROUND_COLOR } from "../core/constants"; const AppLayout = ({ children }) => { const ui = useContext(UIContext); @@ -18,6 +19,7 @@ const AppLayout = ({ children }) => { return ( { zIndex={1010} /> )} - + {ui.isAppReady && ui.isLoggedIn && children} From 4928e59fee969faae7575cda26f2510c85e47542 Mon Sep 17 00:00:00 2001 From: Kellan Wampler Date: Wed, 2 Nov 2022 10:18:50 -0400 Subject: [PATCH 2/2] Fixing text colors on subscriptions, dashboards, and modals. --- frontend/pages/dashboard/[dashboardId].js | 2 ++ frontend/src/components/Report.js | 3 +++ frontend/src/components/SubscriptionReport.js | 8 ++++++-- frontend/src/core/providers/OverlayProvider/index.js | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/frontend/pages/dashboard/[dashboardId].js b/frontend/pages/dashboard/[dashboardId].js index 629f2d1a..80f2b610 100644 --- a/frontend/pages/dashboard/[dashboardId].js +++ b/frontend/pages/dashboard/[dashboardId].js @@ -112,6 +112,7 @@ const Analytics = () => { direction="column" alignItems="center" minH="100vh" + color="black" > { diff --git a/frontend/src/components/Report.js b/frontend/src/components/Report.js index 2111e888..d2074150 100644 --- a/frontend/src/components/Report.js +++ b/frontend/src/components/Report.js @@ -100,6 +100,9 @@ const Report = ({ data, timeRange }) => { enableSlices={false} enableGridX={true} enableGridY={true} + theme={{ + textColor: "white", + }} /> ); }; diff --git a/frontend/src/components/SubscriptionReport.js b/frontend/src/components/SubscriptionReport.js index 2bfd0f1a..42ed2e15 100644 --- a/frontend/src/components/SubscriptionReport.js +++ b/frontend/src/components/SubscriptionReport.js @@ -105,7 +105,11 @@ const SubscriptionReport = ({ flexBasis={plotMinW} direction="column" > - {`Latest block number: ${ + {`Latest block number: ${ data?.blocks_state?.latest_labelled_block ?? "Not available" }`} - + Events {eventKeys.map((key) => { diff --git a/frontend/src/core/providers/OverlayProvider/index.js b/frontend/src/core/providers/OverlayProvider/index.js index bd2583ad..40c0b514 100644 --- a/frontend/src/core/providers/OverlayProvider/index.js +++ b/frontend/src/core/providers/OverlayProvider/index.js @@ -270,7 +270,7 @@ const OverlayProvider = ({ children }) => { > - + {modal.type === MODAL_TYPES.NEW_SUBSCRIPTON && "Subscribe to a new address"} @@ -345,7 +345,7 @@ const OverlayProvider = ({ children }) => { }} > - + {drawer.type === DRAWER_TYPES.NEW_DASHBOARD && "New dashboard"}