diff --git a/frontend/.gitignore b/frontend/.gitignore index d9f04174..328714f1 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -41,3 +41,4 @@ package-lock.json # vercel .vercel +.todo diff --git a/frontend/pages/subscriptions.js b/frontend/pages/subscriptions.js index d37eb688..ecfb469a 100644 --- a/frontend/pages/subscriptions.js +++ b/frontend/pages/subscriptions.js @@ -63,7 +63,8 @@ const Subscriptions = () => { { }; }; +const bwVariant = () => { + return { + field: { + border: "1px solid white", + borderRadius: "7px", + color: "white", + backgroundColor: "#1A1D22", + errorBorderColor: "#EE8686", + _hover: { + backgroundColor: "#1A1D22", + }, + _focus: { + backgroundColor: "#1A1D22", + }, + _placeholder: { color: "#CDCDCD" }, + _autofill: { + backgroundColor: "#1A1D22", + textFillColor: "white", + boxShadow: "0 0 0px 1000px #1A1D22 inset", + transition: "background-color 5000s ease-in-out 0s", + }, + }, + }; +}; + const outlineVariant = (props) => { const { colorScheme: c, theme } = props; const bgColor = transparentize(`${c}.50`, 0.8)(theme); @@ -79,6 +104,7 @@ const Input = { flushed: flushedVariant, newTag: newTagVariant, filled: filledVariant, + bw: bwVariant, }, defaultProps: { diff --git a/frontend/src/components/AccountIconButton.js b/frontend/src/components/AccountIconButton.js index 85033857..af0577cc 100644 --- a/frontend/src/components/AccountIconButton.js +++ b/frontend/src/components/AccountIconButton.js @@ -6,7 +6,6 @@ import { MenuList, MenuItem, MenuGroup, - MenuDivider, IconButton, chakra, Portal, @@ -33,20 +32,24 @@ const AccountIconButton = (props) => { /> - Security +
Security
- API tokens +
+ API tokens +
- {ui.isMobileView && SITEMAP.map((item, idx) => { if (item.type !== PAGETYPE.FOOTER_CATEGORY && item.children) { @@ -54,7 +57,22 @@ const AccountIconButton = (props) => { {item.children.map((child, idx) => { return ( - + {child.title} @@ -65,14 +83,14 @@ const AccountIconButton = (props) => { ); } })} - - { logout(); }} > Logout - +
diff --git a/frontend/src/components/AppNavbar.js b/frontend/src/components/AppNavbar.js index 14f4ccba..44a68bea 100644 --- a/frontend/src/components/AppNavbar.js +++ b/frontend/src/components/AppNavbar.js @@ -107,9 +107,20 @@ const AppNavbar = () => { <> {!ui.isMobileView && ( <> - + + + Moonstream To + - + {SITEMAP.map((item, idx) => { if ( @@ -133,11 +144,21 @@ const AppNavbar = () => { key={`menu-button-${idx}`} as={Button} rightIcon={} + color="white" + _expanded={{ color: "white" }} > {item.title} - + {item.children.map((child, idx) => ( { href={child.path} passHref > - - {child.title} + + {child.title} ))} @@ -164,7 +200,7 @@ const AppNavbar = () => { href={item.path} isActive={!!(router.nextRouter.pathname === item.path)} > - {item.title} + {item.title} ); })} diff --git a/frontend/src/components/EntriesNavigation.js b/frontend/src/components/EntriesNavigation.js index 250739df..a1a22847 100644 --- a/frontend/src/components/EntriesNavigation.js +++ b/frontend/src/components/EntriesNavigation.js @@ -222,6 +222,9 @@ const EntriesNavigation = () => { overflow="hidden" direction="column" flexGrow={1} + mt="10px" + mr="5px" + ml="5px" > {streamCache && !eventsIsLoading ? ( <> @@ -433,7 +436,7 @@ const EntriesNavigation = () => { w="100%" //onScroll={(e) => handleScroll(e)} > - + {!loadNewerEventsIsFetching && !nextEventIsFetching ? ( )} - - {streamCache - .slice( - cursor, - streamCache.length <= cursor + PAGE_SIZE - ? streamCache.length - : cursor + PAGE_SIZE - ) - .map((entry, idx) => ( - - ))} - {previousEvent && - !loadOlderEventsIsFetching && - !previousEventIsFetching ? ( -
- -
- ) : ( -
- {!previousEventIsFetching && !loadOlderEventsIsFetching ? ( - "Тransactions not found. You can subscribe to more addresses in Subscriptions menu." - ) : ( + {streamCache + .slice( + cursor, + streamCache.length <= cursor + PAGE_SIZE + ? streamCache.length + : cursor + PAGE_SIZE + ) + .map((entry, idx) => ( + + ))} + {previousEvent && + !loadOlderEventsIsFetching && + !previousEventIsFetching ? ( +
- )} -
- )} + > + Load older events + +
+ ) : ( +
+ {!previousEventIsFetching && !loadOlderEventsIsFetching ? ( + "Тransactions not found. You can subscribe to more addresses in Subscriptions menu." + ) : ( + + )} +
+ )} +
diff --git a/frontend/src/components/ForgotPassword.js b/frontend/src/components/ForgotPassword.js index c4db683e..87bd7863 100644 --- a/frontend/src/components/ForgotPassword.js +++ b/frontend/src/components/ForgotPassword.js @@ -1,15 +1,7 @@ import React, { useEffect } from "react"; import { useForm } from "react-hook-form"; import { useToast, useForgotPassword } from "../core/hooks"; -import { - FormControl, - InputGroup, - FormErrorMessage, - Button, - Input, - InputRightElement, -} from "@chakra-ui/react"; -import CustomIcon from "./CustomIcon"; +import { FormControl, InputGroup, Button, Input } from "@chakra-ui/react"; import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants"; const ForgotPassword = ({ toggleModal }) => { @@ -19,35 +11,71 @@ const ForgotPassword = ({ toggleModal }) => { useEffect(() => { if (!data) return; - toggleModal({ type: MODAL_TYPES.OFF }); }, [data, toggleModal, toast]); return (
+
+ {errors.email ? errors.email.message : "Email"} +
- - - - - {errors.email && errors.email.message} - diff --git a/frontend/src/components/LandingBarMobile.js b/frontend/src/components/LandingBarMobile.js new file mode 100644 index 00000000..17948e8f --- /dev/null +++ b/frontend/src/components/LandingBarMobile.js @@ -0,0 +1,77 @@ +import React, { useContext } from "react"; +import RouterLink from "next/link"; +import { Image, Link, Flex, Spacer, Text, Box } from "@chakra-ui/react"; +import { PRIMARY_MOON_LOGO_URL } from "../core/constants"; +import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants"; +import useModals from "../core/hooks/useModals"; +import UIContext from "../core/providers/UIProvider/context"; +import PlainButton from "./atoms/PlainButton"; + +const LandingBarMobile = () => { + const ui = useContext(UIContext); + const { toggleModal } = useModals(); + return ( + + + + + + + {!ui.isLoggedIn && ( + toggleModal({ type: MODAL_TYPES.SIGNUP })} + > + Sign up + + )} + {!ui.isLoggedIn && ( + toggleModal({ type: MODAL_TYPES.LOGIN })} + fontWeight="400" + p="0px" + m="0px" + _focus={{ backgroundColor: "transparent" }} + _hover={{ backgroundColor: "transparent" }} + > + Log in + + )} + {ui.isLoggedIn && ( + + + App + + + )} + + + ); +}; + +export default LandingBarMobile; diff --git a/frontend/src/components/LandingNavbar.js b/frontend/src/components/LandingNavbar.js index eae12942..d76ab26b 100644 --- a/frontend/src/components/LandingNavbar.js +++ b/frontend/src/components/LandingNavbar.js @@ -6,68 +6,53 @@ import { ButtonGroup, Spacer, Link, - IconButton, Flex, Menu, MenuButton, MenuList, MenuItem, Portal, + Box, + Text, } from "@chakra-ui/react"; -import { ChevronDownIcon, HamburgerIcon } from "@chakra-ui/icons"; +import { ChevronDownIcon } from "@chakra-ui/icons"; import useModals from "../core/hooks/useModals"; import UIContext from "../core/providers/UIProvider/context"; import ChakraAccountIconButton from "./AccountIconButton"; import RouteButton from "./RouteButton"; -import { - PAGETYPE, - SITEMAP, - PRIMARY_MOON_LOGO_URL, - BACKGROUND_COLOR, -} from "../core/constants"; +import { PAGETYPE, SITEMAP, PRIMARY_MOON_LOGO_URL } from "../core/constants"; import router from "next/router"; import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants"; +import LandingBarMobile from "./LandingBarMobile"; const LandingNavbar = () => { const ui = useContext(UIContext); const { toggleModal } = useModals(); return ( <> - {ui.isMobileView && ( - <> - ui.setSidebarToggled(!ui.sidebarToggled)} - icon={} - /> - - )} - - + {ui.isMobileView && } {!ui.isMobileView && ( <> + {SITEMAP.map((item, idx) => { return ( @@ -78,18 +63,33 @@ const LandingNavbar = () => { variant="link" href={item.path} color="black" + fontSize="16px" isActive={!!(router.pathname === item.path)} > {item.title} )} {item.type !== PAGETYPE.FOOTER_CATEGORY && item.children && ( - - }> + + } + color="white" + fontSize="16px" + _expanded={{ color: "white" }} + > {item.title} - + {item.children.map((child, idx) => ( { href={child.path} passHref > - + {child.title} @@ -113,17 +129,24 @@ const LandingNavbar = () => { {ui.isLoggedIn && ( - + + App + + )} {!ui.isLoggedIn && ( @@ -132,9 +155,12 @@ const LandingNavbar = () => { variant="solid" onClick={() => toggleModal({ type: MODAL_TYPES.SIGNUP })} size="sm" - fontWeight="bold" + fontWeight="700" borderRadius="2xl" textColor="white" + _hover={{ + backgroundColor: "#F4532F", + }} > Sign up diff --git a/frontend/src/components/Navbar.js b/frontend/src/components/Navbar.js index cde2d082..c4c451f3 100644 --- a/frontend/src/components/Navbar.js +++ b/frontend/src/components/Navbar.js @@ -7,7 +7,7 @@ import LandingNavbar from "./LandingNavbar"; const AppNavbar = React.lazy(() => import("./AppNavbar")); const Navbar = () => { - const { isAppView, isLoggedIn } = useContext(UIContext); + const { isAppView, isLoggedIn, isMobileView } = useContext(UIContext); return ( { zIndex={1} alignItems="center" id="Navbar" - minH="3rem" - maxH="3rem" + minH={isMobileView ? "48px" : "72px"} + maxH={isMobileView ? "48px" : "72px"} bgColor={BACKGROUND_COLOR} borderBottom="1px solid white" direction="row" diff --git a/frontend/src/components/NewDashboardName.js b/frontend/src/components/NewDashboardName.js index 431f93cd..8985a7f9 100644 --- a/frontend/src/components/NewDashboardName.js +++ b/frontend/src/components/NewDashboardName.js @@ -57,9 +57,13 @@ const NewDashboardName = (props) => { return ( <> - - Name: + + Name: setName(e.target.value)} placeholder={placeholder} diff --git a/frontend/src/components/NewSubscription.js b/frontend/src/components/NewSubscription.js index af01d4d6..6b1c646a 100644 --- a/frontend/src/components/NewSubscription.js +++ b/frontend/src/components/NewSubscription.js @@ -158,12 +158,15 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => { // style={comboboxStyles} {...getRootProps({}, { suppressRefError: true })} > - + @@ -172,15 +175,30 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => { placeholder="What do you want to subscribe to" isTruncated fontSize="sm" + bg="#1A1D22" + _hover={{ + backgroundColor: "#1A1D22", + }} + _focus={{ + backgroundColor: "#1A1D22", + }} {...getInputProps()} > - - {" "} - toggleModal({ type: MODAL_TYPES.FORGOT })} - > - Forgot your password? - - - - + + Don`t have an account?{" "} toggleModal({ type: MODAL_TYPES.SIGNUP })} > diff --git a/frontend/src/components/SignUp.js b/frontend/src/components/SignUp.js index d82dfafa..9aeb5560 100644 --- a/frontend/src/components/SignUp.js +++ b/frontend/src/components/SignUp.js @@ -1,11 +1,10 @@ -import React, { useEffect } from "react"; +import React, { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; import { Text, Stack, Box, FormControl, - FormErrorMessage, InputGroup, Button, Input, @@ -13,12 +12,12 @@ import { } from "@chakra-ui/react"; import CustomIcon from "./CustomIcon"; import { useSignUp } from "../core/hooks"; -import PasswordInput from "./PasswordInput"; import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants"; const SignUp = ({ toggleModal }) => { const { handleSubmit, errors, register } = useForm(); const { signUp, isLoading, isSuccess } = useSignUp(); + const [showPassword, togglePassword] = useState(false); useEffect(() => { if (isSuccess) { @@ -28,76 +27,156 @@ const SignUp = ({ toggleModal }) => { return ( <> - - Sign up for free -
- + +
+ {errors.username ? errors.username.message : "Username"} +
- - - - - {errors.username && errors.username.message} - +
+ {errors.email ? errors.email.message : "Email"} +
- - + + +
+ {errors.password ? errors.password.message : "Password"} +
+ + + + togglePassword(!showPassword)}> + - - {errors.email && errors.email.message} - - - - - - {errors.password && errors.password.message} -
- - + Already have an account?{" "} toggleModal({ type: MODAL_TYPES.LOGIN })} > diff --git a/frontend/src/components/SubscriptionCard.js b/frontend/src/components/SubscriptionCard.js index b8070a28..6e7e1b82 100644 --- a/frontend/src/components/SubscriptionCard.js +++ b/frontend/src/components/SubscriptionCard.js @@ -61,7 +61,6 @@ const SubscriptionCard = ({ subscription, isDesktopView, iconLink }) => { <> {!isDesktopView && ( @@ -108,7 +107,7 @@ const SubscriptionCard = ({ subscription, isDesktopView, iconLink }) => { - + Address: diff --git a/frontend/src/components/UpdateSubscriptionLabelInput.js b/frontend/src/components/UpdateSubscriptionLabelInput.js index 109aa17d..44e97d85 100644 --- a/frontend/src/components/UpdateSubscriptionLabelInput.js +++ b/frontend/src/components/UpdateSubscriptionLabelInput.js @@ -55,6 +55,7 @@ const MobileFiledInput = ({ return ( <> { + return ( +
+ {props.children} +
+ ); +}; +export default PlainButton; diff --git a/frontend/src/core/constants.js b/frontend/src/core/constants.js index fec35565..d1c48ca6 100644 --- a/frontend/src/core/constants.js +++ b/frontend/src/core/constants.js @@ -77,7 +77,7 @@ export const SITEMAP = [ children: [ { title: "Docs", - path: "/docs", + path: "https://docs.moonstream.to/", type: PAGETYPE.CONTENT, }, { diff --git a/frontend/src/core/providers/OverlayProvider/index.js b/frontend/src/core/providers/OverlayProvider/index.js index 40c0b514..4b65db3f 100644 --- a/frontend/src/core/providers/OverlayProvider/index.js +++ b/frontend/src/core/providers/OverlayProvider/index.js @@ -30,7 +30,6 @@ import { AlertDialogOverlay, Button, Spinner, - Divider, } from "@chakra-ui/react"; import UIContext from "../UIProvider/context"; import useDashboard from "../../hooks/useDashboard"; @@ -264,14 +263,26 @@ const OverlayProvider = ({ children }) => { toggleModal({ type: MODAL_TYPES.OFF })} - size="2xl" + size={modal.type === MODAL_TYPES.LOGIN ? "lg" : "2xl"} scrollBehavior="outside" trapFocus={false} > - + - - + + {modal.type === MODAL_TYPES.NEW_SUBSCRIPTON && "Subscribe to a new address"} {modal.type === MODAL_TYPES.FORGOT && "Forgot Password"} @@ -283,9 +294,9 @@ const OverlayProvider = ({ children }) => { "Would you like to give it a name?"} {modal.type === MODAL_TYPES.MOBILE_INPUT_FIELD && modal.props.title} - - + { {...modal.props} /> )} - {modal.type === MODAL_TYPES.FORGOT && } + {modal.type === MODAL_TYPES.FORGOT && ( + + )} {modal.type === MODAL_TYPES.HUBSPOT && ( { const ui = useContext(UIContext); @@ -25,6 +26,7 @@ const AppLayout = ({ children }) => { w="100%" overflow="hidden" direction="column" + pb="85px" > {(!ui.isAppReady || !ui.isLoggedIn) && ( { >
- {ui.isAppReady && ui.isLoggedIn && children} + + + + + {ui.isAppReady && ui.isLoggedIn && children} + ); }; diff --git a/frontend/src/layouts/RootLayout.js b/frontend/src/layouts/RootLayout.js index 3be94f4d..49260fe1 100644 --- a/frontend/src/layouts/RootLayout.js +++ b/frontend/src/layouts/RootLayout.js @@ -1,6 +1,6 @@ import { CloseIcon } from "@chakra-ui/icons"; import { Flex, Center, Text, Link, IconButton } from "@chakra-ui/react"; -import React, { Suspense, useContext, useState } from "react"; +import React, { useContext, useState } from "react"; import UIContext from "../core/providers/UIProvider/context"; const Sidebar = React.lazy(() => import("../components/Sidebar")); @@ -17,9 +17,6 @@ const RootLayout = (props) => { h="100%" maxH="100%" > - - -