kopia lustrzana https://github.com/bugout-dev/moonstream
commit
db06fef9c3
|
@ -41,3 +41,4 @@ package-lock.json
|
||||||
# vercel
|
# vercel
|
||||||
.vercel
|
.vercel
|
||||||
|
|
||||||
|
.todo
|
||||||
|
|
|
@ -63,7 +63,8 @@ const Subscriptions = () => {
|
||||||
<Flex
|
<Flex
|
||||||
h="3rem"
|
h="3rem"
|
||||||
w="100%"
|
w="100%"
|
||||||
bgColor="blue.50"
|
bgColor="#1A1D22"
|
||||||
|
borderColor="white"
|
||||||
borderTopRadius="xl"
|
borderTopRadius="xl"
|
||||||
justifyContent="flex-end"
|
justifyContent="flex-end"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
|
|
|
@ -21,6 +21,31 @@ const flushedVariant = (props) => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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 outlineVariant = (props) => {
|
||||||
const { colorScheme: c, theme } = props;
|
const { colorScheme: c, theme } = props;
|
||||||
const bgColor = transparentize(`${c}.50`, 0.8)(theme);
|
const bgColor = transparentize(`${c}.50`, 0.8)(theme);
|
||||||
|
@ -79,6 +104,7 @@ const Input = {
|
||||||
flushed: flushedVariant,
|
flushed: flushedVariant,
|
||||||
newTag: newTagVariant,
|
newTag: newTagVariant,
|
||||||
filled: filledVariant,
|
filled: filledVariant,
|
||||||
|
bw: bwVariant,
|
||||||
},
|
},
|
||||||
|
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
|
|
|
@ -6,7 +6,6 @@ import {
|
||||||
MenuList,
|
MenuList,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
MenuGroup,
|
MenuGroup,
|
||||||
MenuDivider,
|
|
||||||
IconButton,
|
IconButton,
|
||||||
chakra,
|
chakra,
|
||||||
Portal,
|
Portal,
|
||||||
|
@ -33,20 +32,24 @@ const AccountIconButton = (props) => {
|
||||||
/>
|
/>
|
||||||
<Portal>
|
<Portal>
|
||||||
<MenuList
|
<MenuList
|
||||||
zIndex="dropdown"
|
zIndex={100}
|
||||||
width={["100vw", "100vw", "18rem", "20rem", "22rem", "24rem"]}
|
bg="#1A1D22"
|
||||||
borderRadius={0}
|
w="auto"
|
||||||
color="black"
|
minW="auto"
|
||||||
|
borderRadius="10px"
|
||||||
|
p="20px 20px 10px 20px"
|
||||||
|
border="1px solid white"
|
||||||
>
|
>
|
||||||
<MenuGroup>
|
<MenuGroup>
|
||||||
<RouterLink href="/account/security" passHref>
|
<RouterLink href="/account/security" passHref>
|
||||||
<MenuItem>Security</MenuItem>
|
<div className="desktop-menu-item">Security</div>
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
<RouterLink href="/account/tokens" passHref>
|
<RouterLink href="/account/tokens" passHref>
|
||||||
<MenuItem>API tokens</MenuItem>
|
<div className="desktop-menu-item" title="API tokens">
|
||||||
|
API tokens
|
||||||
|
</div>
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
</MenuGroup>
|
</MenuGroup>
|
||||||
<MenuDivider />
|
|
||||||
{ui.isMobileView &&
|
{ui.isMobileView &&
|
||||||
SITEMAP.map((item, idx) => {
|
SITEMAP.map((item, idx) => {
|
||||||
if (item.type !== PAGETYPE.FOOTER_CATEGORY && item.children) {
|
if (item.type !== PAGETYPE.FOOTER_CATEGORY && item.children) {
|
||||||
|
@ -54,7 +57,22 @@ const AccountIconButton = (props) => {
|
||||||
<MenuGroup key={`AccountIconButton-MenuGroup-${idx}`}>
|
<MenuGroup key={`AccountIconButton-MenuGroup-${idx}`}>
|
||||||
{item.children.map((child, idx) => {
|
{item.children.map((child, idx) => {
|
||||||
return (
|
return (
|
||||||
<MenuItem key={`AccountIconButton-SITEMAP-${idx}`}>
|
<MenuItem
|
||||||
|
key={`AccountIconButton-SITEMAP-${idx}`}
|
||||||
|
m={0}
|
||||||
|
color="white"
|
||||||
|
fontWeight="400"
|
||||||
|
fontSize="16px"
|
||||||
|
px="0px"
|
||||||
|
mb="10px"
|
||||||
|
h="22px"
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
color: "#F56646",
|
||||||
|
fontWeight: "700",
|
||||||
|
}}
|
||||||
|
_focus={{ backgroundColor: "#1A1D22" }}
|
||||||
|
>
|
||||||
<RouterLink href={child.path}>
|
<RouterLink href={child.path}>
|
||||||
{child.title}
|
{child.title}
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
|
@ -65,14 +83,14 @@ const AccountIconButton = (props) => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
<MenuDivider />
|
<div
|
||||||
<MenuItem
|
className="desktop-menu-item"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
logout();
|
logout();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Logout
|
Logout
|
||||||
</MenuItem>
|
</div>
|
||||||
</MenuList>
|
</MenuList>
|
||||||
</Portal>
|
</Portal>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
|
@ -107,9 +107,20 @@ const AppNavbar = () => {
|
||||||
<>
|
<>
|
||||||
{!ui.isMobileView && (
|
{!ui.isMobileView && (
|
||||||
<>
|
<>
|
||||||
<Flex px={2}>
|
<Flex px={2} minH="72px" maxH="72px" alignItems="center">
|
||||||
|
<RouterLink href="/" passHref>
|
||||||
|
<Image
|
||||||
|
w="160px"
|
||||||
|
py="0.75rem"
|
||||||
|
pl={1}
|
||||||
|
ml="15px"
|
||||||
|
src={PRIMARY_MOON_LOGO_URL}
|
||||||
|
alt="Moonstream To"
|
||||||
|
cursor="pointer"
|
||||||
|
/>
|
||||||
|
</RouterLink>
|
||||||
<Spacer />
|
<Spacer />
|
||||||
<Flex placeSelf="flex-end">
|
<Flex h="100%" alignItems="center">
|
||||||
<ButtonGroup variant="link" spacing={4}>
|
<ButtonGroup variant="link" spacing={4}>
|
||||||
{SITEMAP.map((item, idx) => {
|
{SITEMAP.map((item, idx) => {
|
||||||
if (
|
if (
|
||||||
|
@ -133,11 +144,21 @@ const AppNavbar = () => {
|
||||||
key={`menu-button-${idx}`}
|
key={`menu-button-${idx}`}
|
||||||
as={Button}
|
as={Button}
|
||||||
rightIcon={<ChevronDownIcon />}
|
rightIcon={<ChevronDownIcon />}
|
||||||
|
color="white"
|
||||||
|
_expanded={{ color: "white" }}
|
||||||
>
|
>
|
||||||
{item.title}
|
{item.title}
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
<Portal>
|
<Portal>
|
||||||
<MenuList zIndex={100}>
|
<MenuList
|
||||||
|
zIndex={100}
|
||||||
|
bg="#1A1D22"
|
||||||
|
w="auto"
|
||||||
|
minW="auto"
|
||||||
|
borderRadius="10px"
|
||||||
|
p="20px 20px 10px 20px"
|
||||||
|
border="1px solid white"
|
||||||
|
>
|
||||||
{item.children.map((child, idx) => (
|
{item.children.map((child, idx) => (
|
||||||
<RouterLink
|
<RouterLink
|
||||||
shallow={true}
|
shallow={true}
|
||||||
|
@ -145,8 +166,23 @@ const AppNavbar = () => {
|
||||||
href={child.path}
|
href={child.path}
|
||||||
passHref
|
passHref
|
||||||
>
|
>
|
||||||
<MenuItem key={`menu-${idx}`} as={"a"} m={0}>
|
<MenuItem
|
||||||
<Text color="black">{child.title}</Text>
|
key={`menu-${idx}`}
|
||||||
|
as={"a"}
|
||||||
|
m={0}
|
||||||
|
color="white"
|
||||||
|
fontWeight="400"
|
||||||
|
px="0px"
|
||||||
|
mb="10px"
|
||||||
|
h="22px"
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
color: "#F56646",
|
||||||
|
fontWeight: "700",
|
||||||
|
}}
|
||||||
|
_focus={{ backgroundColor: "#1A1D22" }}
|
||||||
|
>
|
||||||
|
{child.title}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
))}
|
))}
|
||||||
|
@ -164,7 +200,7 @@ const AppNavbar = () => {
|
||||||
href={item.path}
|
href={item.path}
|
||||||
isActive={!!(router.nextRouter.pathname === item.path)}
|
isActive={!!(router.nextRouter.pathname === item.path)}
|
||||||
>
|
>
|
||||||
{item.title}
|
<Text color="white">{item.title}</Text>
|
||||||
</RouteButton>
|
</RouteButton>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -222,6 +222,9 @@ const EntriesNavigation = () => {
|
||||||
overflow="hidden"
|
overflow="hidden"
|
||||||
direction="column"
|
direction="column"
|
||||||
flexGrow={1}
|
flexGrow={1}
|
||||||
|
mt="10px"
|
||||||
|
mr="5px"
|
||||||
|
ml="5px"
|
||||||
>
|
>
|
||||||
{streamCache && !eventsIsLoading ? (
|
{streamCache && !eventsIsLoading ? (
|
||||||
<>
|
<>
|
||||||
|
@ -433,7 +436,7 @@ const EntriesNavigation = () => {
|
||||||
w="100%"
|
w="100%"
|
||||||
//onScroll={(e) => handleScroll(e)}
|
//onScroll={(e) => handleScroll(e)}
|
||||||
>
|
>
|
||||||
<Stack direction="row" justifyContent="space-between">
|
<Stack mt="5px" direction="row" justifyContent="space-around">
|
||||||
{!loadNewerEventsIsFetching && !nextEventIsFetching ? (
|
{!loadNewerEventsIsFetching && !nextEventIsFetching ? (
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
@ -452,53 +455,53 @@ const EntriesNavigation = () => {
|
||||||
colorScheme="green"
|
colorScheme="green"
|
||||||
></Button>
|
></Button>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
{streamCache
|
||||||
{streamCache
|
.slice(
|
||||||
.slice(
|
cursor,
|
||||||
cursor,
|
streamCache.length <= cursor + PAGE_SIZE
|
||||||
streamCache.length <= cursor + PAGE_SIZE
|
? streamCache.length
|
||||||
? streamCache.length
|
: cursor + PAGE_SIZE
|
||||||
: cursor + PAGE_SIZE
|
)
|
||||||
)
|
.map((entry, idx) => (
|
||||||
.map((entry, idx) => (
|
<StreamEntry
|
||||||
<StreamEntry
|
showOnboardingTooltips={false}
|
||||||
showOnboardingTooltips={false}
|
key={`entry-list-${idx}`}
|
||||||
key={`entry-list-${idx}`}
|
entry={entry}
|
||||||
entry={entry}
|
disableDelete={!canDelete}
|
||||||
disableDelete={!canDelete}
|
disableCopy={!canCreate}
|
||||||
disableCopy={!canCreate}
|
filterCallback={handleFilterStateCallback}
|
||||||
filterCallback={handleFilterStateCallback}
|
filterConstants={{ DIRECTIONS, CONDITION, FILTER_TYPES }}
|
||||||
filterConstants={{ DIRECTIONS, CONDITION, FILTER_TYPES }}
|
/>
|
||||||
/>
|
))}
|
||||||
))}
|
{previousEvent &&
|
||||||
{previousEvent &&
|
!loadOlderEventsIsFetching &&
|
||||||
!loadOlderEventsIsFetching &&
|
!previousEventIsFetching ? (
|
||||||
!previousEventIsFetching ? (
|
<Center>
|
||||||
<Center>
|
|
||||||
<Button
|
|
||||||
onClick={() => {
|
|
||||||
loadPreviousEventHandler();
|
|
||||||
}}
|
|
||||||
variant="outline"
|
|
||||||
colorScheme="green"
|
|
||||||
>
|
|
||||||
Load older events
|
|
||||||
</Button>
|
|
||||||
</Center>
|
|
||||||
) : (
|
|
||||||
<Center>
|
|
||||||
{!previousEventIsFetching && !loadOlderEventsIsFetching ? (
|
|
||||||
"Тransactions not found. You can subscribe to more addresses in Subscriptions menu."
|
|
||||||
) : (
|
|
||||||
<Button
|
<Button
|
||||||
isLoading
|
onClick={() => {
|
||||||
loadingText="Loading"
|
loadPreviousEventHandler();
|
||||||
|
}}
|
||||||
variant="outline"
|
variant="outline"
|
||||||
colorScheme="green"
|
colorScheme="green"
|
||||||
></Button>
|
>
|
||||||
)}
|
Load older events
|
||||||
</Center>
|
</Button>
|
||||||
)}
|
</Center>
|
||||||
|
) : (
|
||||||
|
<Center>
|
||||||
|
{!previousEventIsFetching && !loadOlderEventsIsFetching ? (
|
||||||
|
"Тransactions not found. You can subscribe to more addresses in Subscriptions menu."
|
||||||
|
) : (
|
||||||
|
<Button
|
||||||
|
isLoading
|
||||||
|
loadingText="Loading"
|
||||||
|
variant="outline"
|
||||||
|
colorScheme="green"
|
||||||
|
></Button>
|
||||||
|
)}
|
||||||
|
</Center>
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { useToast, useForgotPassword } from "../core/hooks";
|
import { useToast, useForgotPassword } from "../core/hooks";
|
||||||
import {
|
import { FormControl, InputGroup, Button, Input } from "@chakra-ui/react";
|
||||||
FormControl,
|
|
||||||
InputGroup,
|
|
||||||
FormErrorMessage,
|
|
||||||
Button,
|
|
||||||
Input,
|
|
||||||
InputRightElement,
|
|
||||||
} from "@chakra-ui/react";
|
|
||||||
import CustomIcon from "./CustomIcon";
|
|
||||||
import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants";
|
import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants";
|
||||||
|
|
||||||
const ForgotPassword = ({ toggleModal }) => {
|
const ForgotPassword = ({ toggleModal }) => {
|
||||||
|
@ -19,35 +11,71 @@ const ForgotPassword = ({ toggleModal }) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
|
|
||||||
toggleModal({ type: MODAL_TYPES.OFF });
|
toggleModal({ type: MODAL_TYPES.OFF });
|
||||||
}, [data, toggleModal, toast]);
|
}, [data, toggleModal, toast]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form onSubmit={handleSubmit(forgotPassword)}>
|
<form onSubmit={handleSubmit(forgotPassword)}>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
fontSize: "18px",
|
||||||
|
fontWeight: 400,
|
||||||
|
color: errors.username ? "#EE8686" : "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{errors.email ? errors.email.message : "Email"}
|
||||||
|
</div>
|
||||||
<FormControl isInvalid={errors.email} my={4}>
|
<FormControl isInvalid={errors.email} my={4}>
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
<Input
|
<Input
|
||||||
colorScheme="blue"
|
borderColor="white"
|
||||||
variant="filled"
|
bg="#1A1D22"
|
||||||
placeholder="Your email here"
|
color="white"
|
||||||
|
_placeholder={{ textColor: "#CDCDCD" }}
|
||||||
|
variant="outline"
|
||||||
|
errorBorderColor="#EE8686"
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_autofill={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
textFillColor: "white",
|
||||||
|
boxShadow: "0 0 0px 1000px #1A1D22 inset",
|
||||||
|
transition: "background-color 5000s ease-in-out 0s",
|
||||||
|
}}
|
||||||
|
placeholder="Enter your email"
|
||||||
name="email"
|
name="email"
|
||||||
ref={register({ required: "Email is required!" })}
|
autoComplete="email"
|
||||||
|
ref={register({ required: "Email is required" })}
|
||||||
/>
|
/>
|
||||||
<InputRightElement>
|
|
||||||
<CustomIcon icon="name" />
|
|
||||||
</InputRightElement>
|
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
<FormErrorMessage color="red.400" pl="1">
|
|
||||||
{errors.email && errors.email.message}
|
|
||||||
</FormErrorMessage>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<Button
|
<Button
|
||||||
|
mt="30px"
|
||||||
|
mb="10px"
|
||||||
|
bg="#F56646"
|
||||||
|
fontWeight="700"
|
||||||
|
borderRadius="30px"
|
||||||
|
padding="10px 30px"
|
||||||
|
fontSize="20px"
|
||||||
|
height="46px"
|
||||||
|
color="#ffffff"
|
||||||
type="submit"
|
type="submit"
|
||||||
variant="solid"
|
|
||||||
colorScheme="blue"
|
|
||||||
width="100%"
|
width="100%"
|
||||||
|
variant="solid"
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#F4532F",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#F4532F",
|
||||||
|
}}
|
||||||
|
_active={{
|
||||||
|
backgroundColor: "#F4532F",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Send
|
Send
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -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 (
|
||||||
|
<Flex direction="column" width={"100%"}>
|
||||||
|
<Flex width={"100%"} alignItems="center" flex="flex: 0 0 100%" px="27px">
|
||||||
|
<RouterLink href="/" passHref>
|
||||||
|
<Link
|
||||||
|
as={Image}
|
||||||
|
w={"160px"}
|
||||||
|
h={"23px"}
|
||||||
|
justifyContent="left"
|
||||||
|
src={PRIMARY_MOON_LOGO_URL}
|
||||||
|
alt="Moonstream logo"
|
||||||
|
/>
|
||||||
|
</RouterLink>
|
||||||
|
<Spacer />
|
||||||
|
{!ui.isLoggedIn && (
|
||||||
|
<PlainButton
|
||||||
|
style={{
|
||||||
|
marginRight: "12px",
|
||||||
|
fontSize: "14px",
|
||||||
|
}}
|
||||||
|
onClick={() => toggleModal({ type: MODAL_TYPES.SIGNUP })}
|
||||||
|
>
|
||||||
|
Sign up
|
||||||
|
</PlainButton>
|
||||||
|
)}
|
||||||
|
{!ui.isLoggedIn && (
|
||||||
|
<Text
|
||||||
|
color="white"
|
||||||
|
bg="transparent"
|
||||||
|
onClick={() => toggleModal({ type: MODAL_TYPES.LOGIN })}
|
||||||
|
fontWeight="400"
|
||||||
|
p="0px"
|
||||||
|
m="0px"
|
||||||
|
_focus={{ backgroundColor: "transparent" }}
|
||||||
|
_hover={{ backgroundColor: "transparent" }}
|
||||||
|
>
|
||||||
|
Log in
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
{ui.isLoggedIn && (
|
||||||
|
<RouterLink href="/welcome" passHref>
|
||||||
|
<Box
|
||||||
|
bg="#F56646"
|
||||||
|
alignSelf={"center"}
|
||||||
|
as={Link}
|
||||||
|
color="white"
|
||||||
|
size="sm"
|
||||||
|
fontWeight="700"
|
||||||
|
borderRadius="15px"
|
||||||
|
w="47px"
|
||||||
|
h="25px"
|
||||||
|
textAlign="center"
|
||||||
|
fontSize="14px"
|
||||||
|
// pb="5px"
|
||||||
|
>
|
||||||
|
<Text lineHeight="25px">App</Text>
|
||||||
|
</Box>
|
||||||
|
</RouterLink>
|
||||||
|
)}
|
||||||
|
</Flex>
|
||||||
|
</Flex>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default LandingBarMobile;
|
|
@ -6,68 +6,53 @@ import {
|
||||||
ButtonGroup,
|
ButtonGroup,
|
||||||
Spacer,
|
Spacer,
|
||||||
Link,
|
Link,
|
||||||
IconButton,
|
|
||||||
Flex,
|
Flex,
|
||||||
Menu,
|
Menu,
|
||||||
MenuButton,
|
MenuButton,
|
||||||
MenuList,
|
MenuList,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
Portal,
|
Portal,
|
||||||
|
Box,
|
||||||
|
Text,
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import { ChevronDownIcon, HamburgerIcon } from "@chakra-ui/icons";
|
import { ChevronDownIcon } from "@chakra-ui/icons";
|
||||||
import useModals from "../core/hooks/useModals";
|
import useModals from "../core/hooks/useModals";
|
||||||
import UIContext from "../core/providers/UIProvider/context";
|
import UIContext from "../core/providers/UIProvider/context";
|
||||||
import ChakraAccountIconButton from "./AccountIconButton";
|
import ChakraAccountIconButton from "./AccountIconButton";
|
||||||
import RouteButton from "./RouteButton";
|
import RouteButton from "./RouteButton";
|
||||||
import {
|
import { PAGETYPE, SITEMAP, PRIMARY_MOON_LOGO_URL } from "../core/constants";
|
||||||
PAGETYPE,
|
|
||||||
SITEMAP,
|
|
||||||
PRIMARY_MOON_LOGO_URL,
|
|
||||||
BACKGROUND_COLOR,
|
|
||||||
} from "../core/constants";
|
|
||||||
import router from "next/router";
|
import router from "next/router";
|
||||||
import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants";
|
import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants";
|
||||||
|
import LandingBarMobile from "./LandingBarMobile";
|
||||||
|
|
||||||
const LandingNavbar = () => {
|
const LandingNavbar = () => {
|
||||||
const ui = useContext(UIContext);
|
const ui = useContext(UIContext);
|
||||||
const { toggleModal } = useModals();
|
const { toggleModal } = useModals();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{ui.isMobileView && (
|
{ui.isMobileView && <LandingBarMobile />}
|
||||||
<>
|
|
||||||
<IconButton
|
|
||||||
alignSelf="flex-start"
|
|
||||||
colorScheme="blackAlpha"
|
|
||||||
bgColor={BACKGROUND_COLOR}
|
|
||||||
variant="solid"
|
|
||||||
onClick={() => ui.setSidebarToggled(!ui.sidebarToggled)}
|
|
||||||
icon={<HamburgerIcon />}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<Flex
|
|
||||||
pl={ui.isMobileView ? 2 : "60px"}
|
|
||||||
justifySelf="flex-start"
|
|
||||||
h="48px"
|
|
||||||
py={1}
|
|
||||||
flexBasis="200px"
|
|
||||||
flexGrow={0.6}
|
|
||||||
id="Logo Container"
|
|
||||||
alignItems="center"
|
|
||||||
>
|
|
||||||
<RouterLink href="/" passHref>
|
|
||||||
<Link
|
|
||||||
as={Image}
|
|
||||||
w={"160px"}
|
|
||||||
justifyContent="left"
|
|
||||||
src={PRIMARY_MOON_LOGO_URL}
|
|
||||||
alt="Moonstream logo"
|
|
||||||
/>
|
|
||||||
</RouterLink>
|
|
||||||
</Flex>
|
|
||||||
|
|
||||||
{!ui.isMobileView && (
|
{!ui.isMobileView && (
|
||||||
<>
|
<>
|
||||||
|
<Flex
|
||||||
|
pl={ui.isMobileView ? 2 : "60px"}
|
||||||
|
justifySelf="flex-start"
|
||||||
|
h="48px"
|
||||||
|
py={1}
|
||||||
|
flexBasis="200px"
|
||||||
|
flexGrow={0.6}
|
||||||
|
id="Logo Container"
|
||||||
|
alignItems="center"
|
||||||
|
>
|
||||||
|
<RouterLink href="/" passHref>
|
||||||
|
<Link
|
||||||
|
as={Image}
|
||||||
|
w={"160px"}
|
||||||
|
justifyContent="left"
|
||||||
|
src={PRIMARY_MOON_LOGO_URL}
|
||||||
|
alt="Moonstream logo"
|
||||||
|
/>
|
||||||
|
</RouterLink>
|
||||||
|
</Flex>
|
||||||
<ButtonGroup variant="link" spacing={4} pr={16} flexGrow={0.5}>
|
<ButtonGroup variant="link" spacing={4} pr={16} flexGrow={0.5}>
|
||||||
{SITEMAP.map((item, idx) => {
|
{SITEMAP.map((item, idx) => {
|
||||||
return (
|
return (
|
||||||
|
@ -78,18 +63,33 @@ const LandingNavbar = () => {
|
||||||
variant="link"
|
variant="link"
|
||||||
href={item.path}
|
href={item.path}
|
||||||
color="black"
|
color="black"
|
||||||
|
fontSize="16px"
|
||||||
isActive={!!(router.pathname === item.path)}
|
isActive={!!(router.pathname === item.path)}
|
||||||
>
|
>
|
||||||
{item.title}
|
{item.title}
|
||||||
</RouteButton>
|
</RouteButton>
|
||||||
)}
|
)}
|
||||||
{item.type !== PAGETYPE.FOOTER_CATEGORY && item.children && (
|
{item.type !== PAGETYPE.FOOTER_CATEGORY && item.children && (
|
||||||
<Menu colorScheme="blackAlpha">
|
<Menu autoSelect="false">
|
||||||
<MenuButton as={Button} rightIcon={<ChevronDownIcon />}>
|
<MenuButton
|
||||||
|
as={Button}
|
||||||
|
rightIcon={<ChevronDownIcon />}
|
||||||
|
color="white"
|
||||||
|
fontSize="16px"
|
||||||
|
_expanded={{ color: "white" }}
|
||||||
|
>
|
||||||
{item.title}
|
{item.title}
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
<Portal>
|
<Portal>
|
||||||
<MenuList zIndex={100}>
|
<MenuList
|
||||||
|
zIndex={100}
|
||||||
|
bg="#1A1D22"
|
||||||
|
w="auto"
|
||||||
|
minW="auto"
|
||||||
|
borderRadius="10px"
|
||||||
|
p="20px 20px 10px 20px"
|
||||||
|
border="1px solid white"
|
||||||
|
>
|
||||||
{item.children.map((child, idx) => (
|
{item.children.map((child, idx) => (
|
||||||
<RouterLink
|
<RouterLink
|
||||||
shallow={true}
|
shallow={true}
|
||||||
|
@ -97,7 +97,23 @@ const LandingNavbar = () => {
|
||||||
href={child.path}
|
href={child.path}
|
||||||
passHref
|
passHref
|
||||||
>
|
>
|
||||||
<MenuItem key={`menu-${idx}`} as={"a"} m={0}>
|
<MenuItem
|
||||||
|
key={`menu-${idx}`}
|
||||||
|
as={"a"}
|
||||||
|
m={0}
|
||||||
|
color="white"
|
||||||
|
fontWeight="400"
|
||||||
|
fontSize="16px"
|
||||||
|
px="0px"
|
||||||
|
mb="10px"
|
||||||
|
h="22px"
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
color: "#F56646",
|
||||||
|
fontWeight: "700",
|
||||||
|
}}
|
||||||
|
_focus={{ backgroundColor: "#1A1D22" }}
|
||||||
|
>
|
||||||
{child.title}
|
{child.title}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
|
@ -113,17 +129,24 @@ const LandingNavbar = () => {
|
||||||
<ButtonGroup variant="link" spacing={4} pr={16}>
|
<ButtonGroup variant="link" spacing={4} pr={16}>
|
||||||
{ui.isLoggedIn && (
|
{ui.isLoggedIn && (
|
||||||
<RouterLink href="/welcome" passHref>
|
<RouterLink href="/welcome" passHref>
|
||||||
<Button
|
<Box
|
||||||
|
bg="#F56646"
|
||||||
alignSelf={"center"}
|
alignSelf={"center"}
|
||||||
as={Link}
|
fontWeight="700"
|
||||||
colorScheme="orange"
|
borderRadius="15px"
|
||||||
variant="outline"
|
w="51px"
|
||||||
size="sm"
|
h="32px"
|
||||||
fontWeight="400"
|
textAlign="center"
|
||||||
borderRadius="2xl"
|
px="10px"
|
||||||
|
cursor="pointer"
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#F4532F",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
App
|
<Text fontSize="16px" lineHeight="32px">
|
||||||
</Button>
|
App
|
||||||
|
</Text>
|
||||||
|
</Box>
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
)}
|
)}
|
||||||
{!ui.isLoggedIn && (
|
{!ui.isLoggedIn && (
|
||||||
|
@ -132,9 +155,12 @@ const LandingNavbar = () => {
|
||||||
variant="solid"
|
variant="solid"
|
||||||
onClick={() => toggleModal({ type: MODAL_TYPES.SIGNUP })}
|
onClick={() => toggleModal({ type: MODAL_TYPES.SIGNUP })}
|
||||||
size="sm"
|
size="sm"
|
||||||
fontWeight="bold"
|
fontWeight="700"
|
||||||
borderRadius="2xl"
|
borderRadius="2xl"
|
||||||
textColor="white"
|
textColor="white"
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#F4532F",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Sign up
|
Sign up
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -7,7 +7,7 @@ import LandingNavbar from "./LandingNavbar";
|
||||||
const AppNavbar = React.lazy(() => import("./AppNavbar"));
|
const AppNavbar = React.lazy(() => import("./AppNavbar"));
|
||||||
|
|
||||||
const Navbar = () => {
|
const Navbar = () => {
|
||||||
const { isAppView, isLoggedIn } = useContext(UIContext);
|
const { isAppView, isLoggedIn, isMobileView } = useContext(UIContext);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
|
@ -15,8 +15,8 @@ const Navbar = () => {
|
||||||
zIndex={1}
|
zIndex={1}
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
id="Navbar"
|
id="Navbar"
|
||||||
minH="3rem"
|
minH={isMobileView ? "48px" : "72px"}
|
||||||
maxH="3rem"
|
maxH={isMobileView ? "48px" : "72px"}
|
||||||
bgColor={BACKGROUND_COLOR}
|
bgColor={BACKGROUND_COLOR}
|
||||||
borderBottom="1px solid white"
|
borderBottom="1px solid white"
|
||||||
direction="row"
|
direction="row"
|
||||||
|
|
|
@ -57,9 +57,13 @@ const NewDashboardName = (props) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack direction={["column", "row", null]}>
|
<Stack direction={["column", "row", null]}>
|
||||||
<InputGroup>
|
<InputGroup border="1px solid white" borderRadius="7px">
|
||||||
<InputLeftAddon>Name:</InputLeftAddon>
|
<InputLeftAddon bg="#1A1D22">Name:</InputLeftAddon>
|
||||||
<Input
|
<Input
|
||||||
|
borderStyle="none none none"
|
||||||
|
borderLeft="1px solid white"
|
||||||
|
variant="bw"
|
||||||
|
// borderStyle="none"
|
||||||
value={name}
|
value={name}
|
||||||
onChange={(e) => setName(e.target.value)}
|
onChange={(e) => setName(e.target.value)}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
|
|
|
@ -158,12 +158,15 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
// style={comboboxStyles}
|
// style={comboboxStyles}
|
||||||
{...getRootProps({}, { suppressRefError: true })}
|
{...getRootProps({}, { suppressRefError: true })}
|
||||||
>
|
>
|
||||||
<InputGroup>
|
<InputGroup
|
||||||
|
border="1px solid white"
|
||||||
|
borderRadius="7px"
|
||||||
|
>
|
||||||
<InputLeftAddon
|
<InputLeftAddon
|
||||||
isTruncated
|
isTruncated
|
||||||
maxW="60px"
|
maxW="60px"
|
||||||
fontSize="sm"
|
fontSize="sm"
|
||||||
bgColor={"gray.100"}
|
bgColor="#1A1D22"
|
||||||
>
|
>
|
||||||
<Image h="24px" src={selectedItem?.icon_url} />
|
<Image h="24px" src={selectedItem?.icon_url} />
|
||||||
</InputLeftAddon>
|
</InputLeftAddon>
|
||||||
|
@ -172,15 +175,30 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
placeholder="What do you want to subscribe to"
|
placeholder="What do you want to subscribe to"
|
||||||
isTruncated
|
isTruncated
|
||||||
fontSize="sm"
|
fontSize="sm"
|
||||||
|
bg="#1A1D22"
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
{...getInputProps()}
|
{...getInputProps()}
|
||||||
></Input>
|
></Input>
|
||||||
<InputRightAddon p={0}>
|
<InputRightAddon p={0}>
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
// variant="none"
|
||||||
|
borderStyle="none"
|
||||||
|
borderColor="black"
|
||||||
w="100%"
|
w="100%"
|
||||||
m={0}
|
m={0}
|
||||||
p={0}
|
p={0}
|
||||||
colorScheme="gray"
|
bg="#1A1D22"
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
{...getToggleButtonProps({})}
|
{...getToggleButtonProps({})}
|
||||||
aria-label={"toggle menu"}
|
aria-label={"toggle menu"}
|
||||||
>
|
>
|
||||||
|
@ -194,7 +212,7 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
direction="column"
|
direction="column"
|
||||||
className="menuListTim"
|
className="menuListTim"
|
||||||
{...getMenuProps()}
|
{...getMenuProps()}
|
||||||
bgColor="gray.300"
|
bgColor="#1A1D22"
|
||||||
borderRadius="md"
|
borderRadius="md"
|
||||||
boxShadow="lg"
|
boxShadow="lg"
|
||||||
pos="absolute"
|
pos="absolute"
|
||||||
|
@ -213,6 +231,7 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
px={4}
|
px={4}
|
||||||
py={1}
|
py={1}
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
|
cursor="pointer"
|
||||||
key={item.value}
|
key={item.value}
|
||||||
{...getItemProps({
|
{...getItemProps({
|
||||||
key: item.value,
|
key: item.value,
|
||||||
|
@ -221,14 +240,9 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
})}
|
})}
|
||||||
direction="row"
|
direction="row"
|
||||||
w="100%"
|
w="100%"
|
||||||
bgColor={
|
|
||||||
index === highlightedIndex
|
|
||||||
? "orange.900"
|
|
||||||
: "inherit"
|
|
||||||
}
|
|
||||||
color={
|
color={
|
||||||
index === highlightedIndex
|
index === highlightedIndex
|
||||||
? "gray.100"
|
? "#F56646"
|
||||||
: "inherit"
|
: "inherit"
|
||||||
}
|
}
|
||||||
justifyContent="space-between"
|
justifyContent="space-between"
|
||||||
|
@ -237,6 +251,11 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
h="24px"
|
h="24px"
|
||||||
src={item.icon_url}
|
src={item.icon_url}
|
||||||
alignSelf="flex-start"
|
alignSelf="flex-start"
|
||||||
|
ml={
|
||||||
|
index === highlightedIndex
|
||||||
|
? "3px"
|
||||||
|
: "inherit"
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<chakra.span
|
<chakra.span
|
||||||
whiteSpace="nowrap"
|
whiteSpace="nowrap"
|
||||||
|
@ -272,8 +291,13 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
<VStack w="100%" spacing={0}>
|
<VStack w="100%" spacing={0}>
|
||||||
<Flex w="100%">
|
<Flex w="100%">
|
||||||
<FormControl isInvalid={errors?.address}>
|
<FormControl isInvalid={errors?.address}>
|
||||||
<InputGroup my={2} fontSize="xs">
|
<InputGroup
|
||||||
<InputLeftAddon>
|
my={2}
|
||||||
|
fontSize="xs"
|
||||||
|
border="1px solid white"
|
||||||
|
borderRadius="7px"
|
||||||
|
>
|
||||||
|
<InputLeftAddon bg="#1A1D22">
|
||||||
<FormLabel
|
<FormLabel
|
||||||
fontWeight="600"
|
fontWeight="600"
|
||||||
// alignSelf="flex-start"
|
// alignSelf="flex-start"
|
||||||
|
@ -283,8 +307,15 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
</InputLeftAddon>
|
</InputLeftAddon>
|
||||||
<Input
|
<Input
|
||||||
|
bg="#1A1D22"
|
||||||
type="text"
|
type="text"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
placeholder="Address to subscribe to"
|
placeholder="Address to subscribe to"
|
||||||
name="address"
|
name="address"
|
||||||
value={address}
|
value={address}
|
||||||
|
@ -292,7 +323,7 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
ref={register({ required: "address is required!" })}
|
ref={register({ required: "address is required!" })}
|
||||||
></Input>
|
></Input>
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
<FormErrorMessage color="red.400" pl="1">
|
<FormErrorMessage color="#EE8686" pl="1">
|
||||||
{errors?.address && errors?.address.message}
|
{errors?.address && errors?.address.message}
|
||||||
</FormErrorMessage>
|
</FormErrorMessage>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
@ -306,8 +337,13 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
<VStack w="100%" spacing={0}>
|
<VStack w="100%" spacing={0}>
|
||||||
<Flex w="100%">
|
<Flex w="100%">
|
||||||
<FormControl isInvalid={errors?.label}>
|
<FormControl isInvalid={errors?.label}>
|
||||||
<InputGroup my={2} fontSize="xs">
|
<InputGroup
|
||||||
<InputLeftAddon>
|
my={2}
|
||||||
|
fontSize="xs"
|
||||||
|
border="1px solid white"
|
||||||
|
borderRadius="7px"
|
||||||
|
>
|
||||||
|
<InputLeftAddon bgColor="#1A1D22">
|
||||||
<FormLabel
|
<FormLabel
|
||||||
fontWeight="600"
|
fontWeight="600"
|
||||||
// alignSelf="flex-start"
|
// alignSelf="flex-start"
|
||||||
|
@ -319,6 +355,13 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
<Input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
|
bg="#1A1D22"
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
placeholder="Name your label"
|
placeholder="Name your label"
|
||||||
name="label"
|
name="label"
|
||||||
value={label}
|
value={label}
|
||||||
|
@ -326,7 +369,7 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
ref={register({ required: "label is required!" })}
|
ref={register({ required: "label is required!" })}
|
||||||
></Input>
|
></Input>
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
<FormErrorMessage color="red.400" pl="1">
|
<FormErrorMessage color="#EE8686" pl="1">
|
||||||
{errors?.label && errors?.label.message}
|
{errors?.label && errors?.label.message}
|
||||||
</FormErrorMessage>
|
</FormErrorMessage>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
@ -336,7 +379,7 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{type && (
|
{type && (
|
||||||
<FormControl isInvalid={errors?.color}>
|
<FormControl isInvalid={errors?.color} bg="#1A1D22">
|
||||||
{!isModal ? (
|
{!isModal ? (
|
||||||
<Flex
|
<Flex
|
||||||
direction="row"
|
direction="row"
|
||||||
|
@ -364,6 +407,14 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
icon={<BiRefresh />}
|
icon={<BiRefresh />}
|
||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
|
variant="outline"
|
||||||
|
backgroundColor="#1A1D22"
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
type="input"
|
type="input"
|
||||||
placeholder="color"
|
placeholder="color"
|
||||||
name="color"
|
name="color"
|
||||||
|
@ -401,6 +452,14 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
type="input"
|
type="input"
|
||||||
placeholder="color"
|
placeholder="color"
|
||||||
name="color"
|
name="color"
|
||||||
|
variant="outline"
|
||||||
|
backgroundColor="#1A1D22"
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
ref={register({ required: "color is required!" })}
|
ref={register({ required: "color is required!" })}
|
||||||
value={color}
|
value={color}
|
||||||
onChange={() => null}
|
onChange={() => null}
|
||||||
|
@ -408,7 +467,21 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => {
|
||||||
></Input>
|
></Input>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<GithubPicker onChangeComplete={handleChangeColorComplete} />
|
<GithubPicker
|
||||||
|
styles={{
|
||||||
|
default: {
|
||||||
|
card: {
|
||||||
|
background: "#1A1D22",
|
||||||
|
border: "1px solid white",
|
||||||
|
},
|
||||||
|
triangle: {
|
||||||
|
borderBottomColor: "white",
|
||||||
|
// border: "1px solid white",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
onChangeComplete={handleChangeColorComplete}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<FormErrorMessage color="red.400" pl="1">
|
<FormErrorMessage color="red.400" pl="1">
|
||||||
|
|
|
@ -2,35 +2,17 @@ import {
|
||||||
ProSidebar,
|
ProSidebar,
|
||||||
Menu,
|
Menu,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
SidebarHeader,
|
|
||||||
SidebarFooter,
|
SidebarFooter,
|
||||||
SidebarContent,
|
SidebarContent,
|
||||||
} from "react-pro-sidebar";
|
} from "react-pro-sidebar";
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
import RouterLink from "next/link";
|
import RouterLink from "next/link";
|
||||||
import {
|
import { Divider, Text, Button } from "@chakra-ui/react";
|
||||||
Flex,
|
|
||||||
Image,
|
|
||||||
IconButton,
|
|
||||||
Divider,
|
|
||||||
Text,
|
|
||||||
Button,
|
|
||||||
} from "@chakra-ui/react";
|
|
||||||
import UIContext from "../core/providers/UIProvider/context";
|
import UIContext from "../core/providers/UIProvider/context";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {
|
import { LockIcon } from "@chakra-ui/icons";
|
||||||
HamburgerIcon,
|
|
||||||
ArrowLeftIcon,
|
|
||||||
ArrowRightIcon,
|
|
||||||
LockIcon,
|
|
||||||
} from "@chakra-ui/icons";
|
|
||||||
import { MdSettings, MdDashboard, MdTimeline } from "react-icons/md";
|
import { MdSettings, MdDashboard, MdTimeline } from "react-icons/md";
|
||||||
import {
|
import { SITEMAP, PAGETYPE, BACKGROUND_COLOR } from "../core/constants";
|
||||||
PRIMARY_MOON_LOGO_URL,
|
|
||||||
SITEMAP,
|
|
||||||
PAGETYPE,
|
|
||||||
BACKGROUND_COLOR,
|
|
||||||
} from "../core/constants";
|
|
||||||
import useDashboard from "../core/hooks/useDashboard";
|
import useDashboard from "../core/hooks/useDashboard";
|
||||||
import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants";
|
import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants";
|
||||||
import OverlayContext from "../core/providers/OverlayProvider/context";
|
import OverlayContext from "../core/providers/OverlayProvider/context";
|
||||||
|
@ -48,42 +30,8 @@ const Sidebar = () => {
|
||||||
onToggle={ui.setSidebarToggled}
|
onToggle={ui.setSidebarToggled}
|
||||||
collapsed={ui.sidebarCollapsed}
|
collapsed={ui.sidebarCollapsed}
|
||||||
hidden={!ui.sidebarVisible}
|
hidden={!ui.sidebarVisible}
|
||||||
|
className={ui.isMobileView ? "t40" : "t0"}
|
||||||
>
|
>
|
||||||
<SidebarHeader>
|
|
||||||
<Flex>
|
|
||||||
<IconButton
|
|
||||||
ml={4}
|
|
||||||
justifySelf="flex-start"
|
|
||||||
colorScheme="blackAlpha"
|
|
||||||
bgColor={BACKGROUND_COLOR}
|
|
||||||
aria-label="App navigation"
|
|
||||||
icon={
|
|
||||||
ui.isMobileView ? (
|
|
||||||
<HamburgerIcon />
|
|
||||||
) : ui.sidebarCollapsed ? (
|
|
||||||
<ArrowRightIcon />
|
|
||||||
) : (
|
|
||||||
<ArrowLeftIcon />
|
|
||||||
)
|
|
||||||
}
|
|
||||||
onClick={() => {
|
|
||||||
ui.isMobileView
|
|
||||||
? ui.setSidebarToggled(!ui.sidebarToggled)
|
|
||||||
: ui.setSidebarCollapsed(!ui.sidebarCollapsed);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<RouterLink href="/" passHref>
|
|
||||||
<Image
|
|
||||||
w="160px"
|
|
||||||
py="0.75rem"
|
|
||||||
pl={1}
|
|
||||||
src={PRIMARY_MOON_LOGO_URL}
|
|
||||||
alt="Moonstream To"
|
|
||||||
cursor="pointer"
|
|
||||||
/>
|
|
||||||
</RouterLink>
|
|
||||||
</Flex>
|
|
||||||
</SidebarHeader>
|
|
||||||
<SidebarContent>
|
<SidebarContent>
|
||||||
<Divider borderColor={BACKGROUND_COLOR} />
|
<Divider borderColor={BACKGROUND_COLOR} />
|
||||||
<Menu iconShape="square">
|
<Menu iconShape="square">
|
||||||
|
|
|
@ -1,24 +1,23 @@
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import {
|
import {
|
||||||
Text,
|
Text,
|
||||||
Stack,
|
Stack,
|
||||||
Box,
|
Box,
|
||||||
FormControl,
|
FormControl,
|
||||||
FormErrorMessage,
|
|
||||||
InputGroup,
|
InputGroup,
|
||||||
Button,
|
|
||||||
Input,
|
Input,
|
||||||
InputRightElement,
|
InputRightElement,
|
||||||
|
Button,
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import CustomIcon from "./CustomIcon";
|
import CustomIcon from "./CustomIcon";
|
||||||
import { useLogin } from "../core/hooks";
|
import { useLogin } from "../core/hooks";
|
||||||
import PasswordInput from "./PasswordInput";
|
|
||||||
import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants";
|
import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants";
|
||||||
|
|
||||||
const SignIn = ({ toggleModal }) => {
|
const SignIn = ({ toggleModal }) => {
|
||||||
const { handleSubmit, errors, register } = useForm();
|
const { handleSubmit, errors, register } = useForm();
|
||||||
const { login, isLoading, data } = useLogin();
|
const { login, isLoading, data } = useLogin();
|
||||||
|
const [showPassword, togglePassword] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
@ -30,70 +29,132 @@ const SignIn = ({ toggleModal }) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Text color="gray.1200" fontSize="md">
|
|
||||||
To your Moonstream account
|
|
||||||
</Text>
|
|
||||||
<form onSubmit={handleSubmit(login)}>
|
<form onSubmit={handleSubmit(login)}>
|
||||||
<Stack width="100%" pt={4} spacing={3}>
|
<Stack width="100%" spacing={3}>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
fontSize: "18px",
|
||||||
|
fontWeight: 400,
|
||||||
|
color: errors.username ? "#EE8686" : "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{errors.username ? errors.username.message : "Username"}
|
||||||
|
</div>
|
||||||
<FormControl isInvalid={errors.username}>
|
<FormControl isInvalid={errors.username}>
|
||||||
<InputGroup>
|
<InputGroup bg="black">
|
||||||
<Input
|
<Input
|
||||||
_placeholder={{ textColor: "gray.1200" }}
|
borderColor="white"
|
||||||
|
bg="#1A1D22"
|
||||||
|
color="white"
|
||||||
|
_placeholder={{ textColor: "#CDCDCD" }}
|
||||||
autoComplete="username"
|
autoComplete="username"
|
||||||
variant="filled"
|
variant="outline"
|
||||||
colorScheme="blue"
|
placeholder="Enter your username or email"
|
||||||
placeholder="Your Moonstream username"
|
errorBorderColor="#EE8686"
|
||||||
name="username"
|
name="username"
|
||||||
{...register("username", { required: true })}
|
{...register("username", { required: true })}
|
||||||
ref={register({ required: "Username is required!" })}
|
ref={register({ required: "Username is required" })}
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_autofill={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
textFillColor: "white",
|
||||||
|
boxShadow: "0 0 0px 1000px #1A1D22 inset",
|
||||||
|
transition: "background-color 5000s ease-in-out 0s",
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<InputRightElement>
|
</InputGroup>
|
||||||
<CustomIcon icon="name" />
|
</FormControl>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
fontSize: "18px",
|
||||||
|
color: errors.password ? "#EE8686" : "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{errors.password ? errors.password.message : "Password"}
|
||||||
|
</div>
|
||||||
|
<FormControl isInvalid={errors.password}>
|
||||||
|
<InputGroup bg="black">
|
||||||
|
<Input
|
||||||
|
borderColor="white"
|
||||||
|
bg="#1A1D22"
|
||||||
|
color="white"
|
||||||
|
_placeholder={{ textColor: "#CDCDCD" }}
|
||||||
|
autoComplete="current-password"
|
||||||
|
variant="outline"
|
||||||
|
placeholder="Enter your password"
|
||||||
|
errorBorderColor="#EE8686"
|
||||||
|
name="password"
|
||||||
|
type={showPassword ? "text" : "password"}
|
||||||
|
ref={register({ required: "Password is required" })}
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_autofill={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
textFillColor: "white",
|
||||||
|
boxShadow: "0 0 0px 1000px #1A1D22 inset",
|
||||||
|
transition: "background-color 5000s ease-in-out 0s",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<InputRightElement onClick={() => togglePassword(!showPassword)}>
|
||||||
|
<CustomIcon icon="password" />
|
||||||
</InputRightElement>
|
</InputRightElement>
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
<FormErrorMessage color="red.400" pl="1">
|
|
||||||
{errors.username && errors.username.message}
|
|
||||||
</FormErrorMessage>
|
|
||||||
</FormControl>
|
|
||||||
<FormControl isInvalid={errors.password}>
|
|
||||||
<PasswordInput
|
|
||||||
placeholder="Your Moonstream password"
|
|
||||||
name="password"
|
|
||||||
ref={register({ required: "Password is required!" })}
|
|
||||||
/>
|
|
||||||
<FormErrorMessage color="red.400" pl="1">
|
|
||||||
{errors.password && errors.password.message}
|
|
||||||
</FormErrorMessage>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
<Text textAlign="start" fontSize="18px">
|
||||||
|
{" "}
|
||||||
|
<Box
|
||||||
|
cursor="pointer"
|
||||||
|
color="#EE8686"
|
||||||
|
as="span"
|
||||||
|
onClick={() => toggleModal({ type: MODAL_TYPES.FORGOT })}
|
||||||
|
>
|
||||||
|
Forgot your password?
|
||||||
|
</Box>
|
||||||
|
</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
my={8}
|
mt="30px"
|
||||||
|
mb="10px"
|
||||||
|
bg="#F56646"
|
||||||
|
fontWeight="700"
|
||||||
|
borderRadius="30px"
|
||||||
|
padding="10px 30px"
|
||||||
|
fontSize="20px"
|
||||||
|
height="46px"
|
||||||
|
color="#ffffff"
|
||||||
type="submit"
|
type="submit"
|
||||||
width="100%"
|
width="100%"
|
||||||
variant="solid"
|
variant="solid"
|
||||||
colorScheme="blue"
|
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#F4532F",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#F4532F",
|
||||||
|
}}
|
||||||
|
_active={{
|
||||||
|
backgroundColor: "#F4532F",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Login
|
Login
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
<Text textAlign="center" fontSize="md" color="gray.1200">
|
|
||||||
{" "}
|
<Text textAlign="center" fontSize="md" color="white">
|
||||||
<Box
|
|
||||||
cursor="pointer"
|
|
||||||
color="blue.800"
|
|
||||||
as="span"
|
|
||||||
onClick={() => toggleModal({ type: MODAL_TYPES.FORGOT })}
|
|
||||||
>
|
|
||||||
Forgot your password?
|
|
||||||
</Box>
|
|
||||||
<Box height="1px" width="100%" background="#eaebf8" mb="1.875rem" />
|
|
||||||
</Text>
|
|
||||||
<Text textAlign="center" fontSize="md" color="gray.1200">
|
|
||||||
Don`t have an account?{" "}
|
Don`t have an account?{" "}
|
||||||
<Box
|
<Box
|
||||||
cursor="pointer"
|
cursor="pointer"
|
||||||
color="blue.800"
|
color="#EE8686"
|
||||||
as="span"
|
as="span"
|
||||||
onClick={() => toggleModal({ type: MODAL_TYPES.SIGNUP })}
|
onClick={() => toggleModal({ type: MODAL_TYPES.SIGNUP })}
|
||||||
>
|
>
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import {
|
import {
|
||||||
Text,
|
Text,
|
||||||
Stack,
|
Stack,
|
||||||
Box,
|
Box,
|
||||||
FormControl,
|
FormControl,
|
||||||
FormErrorMessage,
|
|
||||||
InputGroup,
|
InputGroup,
|
||||||
Button,
|
Button,
|
||||||
Input,
|
Input,
|
||||||
|
@ -13,12 +12,12 @@ import {
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import CustomIcon from "./CustomIcon";
|
import CustomIcon from "./CustomIcon";
|
||||||
import { useSignUp } from "../core/hooks";
|
import { useSignUp } from "../core/hooks";
|
||||||
import PasswordInput from "./PasswordInput";
|
|
||||||
import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants";
|
import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants";
|
||||||
|
|
||||||
const SignUp = ({ toggleModal }) => {
|
const SignUp = ({ toggleModal }) => {
|
||||||
const { handleSubmit, errors, register } = useForm();
|
const { handleSubmit, errors, register } = useForm();
|
||||||
const { signUp, isLoading, isSuccess } = useSignUp();
|
const { signUp, isLoading, isSuccess } = useSignUp();
|
||||||
|
const [showPassword, togglePassword] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isSuccess) {
|
if (isSuccess) {
|
||||||
|
@ -28,76 +27,156 @@ const SignUp = ({ toggleModal }) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Text color="gray.1200" fontSize="md">
|
|
||||||
Sign up for free
|
|
||||||
</Text>
|
|
||||||
<form onSubmit={handleSubmit(signUp)}>
|
<form onSubmit={handleSubmit(signUp)}>
|
||||||
<Stack width="100%" pt={4} spacing={3}>
|
<Stack width="100%" spacing={3}>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
fontSize: "18px",
|
||||||
|
fontWeight: 400,
|
||||||
|
color: errors.username ? "#EE8686" : "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{errors.username ? errors.username.message : "Username"}
|
||||||
|
</div>
|
||||||
<FormControl isInvalid={errors.username}>
|
<FormControl isInvalid={errors.username}>
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
<Input
|
<Input
|
||||||
variant="filled"
|
borderColor="white"
|
||||||
colorScheme="blue"
|
bg="#1A1D22"
|
||||||
placeholder="Your username here"
|
color="white"
|
||||||
name="username"
|
_placeholder={{ textColor: "#CDCDCD" }}
|
||||||
autoComplete="username"
|
autoComplete="username"
|
||||||
ref={register({ required: "Username is required!" })}
|
variant="outline"
|
||||||
|
placeholder="Enter your username or email"
|
||||||
|
errorBorderColor="#EE8686"
|
||||||
|
name="username"
|
||||||
|
{...register("username", { required: true })}
|
||||||
|
ref={register({ required: "Username is required" })}
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_autofill={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
textFillColor: "white",
|
||||||
|
boxShadow: "0 0 0px 1000px #1A1D22 inset",
|
||||||
|
transition: "background-color 5000s ease-in-out 0s",
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<InputRightElement>
|
|
||||||
<CustomIcon icon="name" />
|
|
||||||
</InputRightElement>
|
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
<FormErrorMessage color="red.400" pl="1">
|
|
||||||
{errors.username && errors.username.message}
|
|
||||||
</FormErrorMessage>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
fontSize: "18px",
|
||||||
|
fontWeight: 400,
|
||||||
|
color: errors.username ? "#EE8686" : "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{errors.email ? errors.email.message : "Email"}
|
||||||
|
</div>
|
||||||
<FormControl isInvalid={errors.email}>
|
<FormControl isInvalid={errors.email}>
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
<Input
|
<Input
|
||||||
variant="filled"
|
borderColor="white"
|
||||||
colorScheme="blue"
|
bg="#1A1D22"
|
||||||
placeholder="Your email here"
|
color="white"
|
||||||
|
_placeholder={{ textColor: "#CDCDCD" }}
|
||||||
|
variant="outline"
|
||||||
|
errorBorderColor="#EE8686"
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_autofill={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
textFillColor: "white",
|
||||||
|
boxShadow: "0 0 0px 1000px #1A1D22 inset",
|
||||||
|
transition: "background-color 5000s ease-in-out 0s",
|
||||||
|
}}
|
||||||
|
placeholder="Enter your email"
|
||||||
name="email"
|
name="email"
|
||||||
autoComplete="email"
|
autoComplete="email"
|
||||||
ref={register({ required: "Email is required!" })}
|
ref={register({ required: "Email is required" })}
|
||||||
/>
|
/>
|
||||||
<InputRightElement>
|
</InputGroup>
|
||||||
<CustomIcon icon="name" />
|
</FormControl>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
fontSize: "18px",
|
||||||
|
color: errors.password ? "#EE8686" : "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{errors.password ? errors.password.message : "Password"}
|
||||||
|
</div>
|
||||||
|
<FormControl isInvalid={errors.password}>
|
||||||
|
<InputGroup bg="black">
|
||||||
|
<Input
|
||||||
|
borderColor="white"
|
||||||
|
bg="#1A1D22"
|
||||||
|
color="white"
|
||||||
|
_placeholder={{ textColor: "#CDCDCD" }}
|
||||||
|
autoComplete="current-password"
|
||||||
|
variant="outline"
|
||||||
|
placeholder="Enter your password"
|
||||||
|
errorBorderColor="#EE8686"
|
||||||
|
name="password"
|
||||||
|
type={showPassword ? "text" : "password"}
|
||||||
|
ref={register({ required: "Password is required" })}
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
}}
|
||||||
|
_autofill={{
|
||||||
|
backgroundColor: "#1A1D22",
|
||||||
|
textFillColor: "white",
|
||||||
|
boxShadow: "0 0 0px 1000px #1A1D22 inset",
|
||||||
|
transition: "background-color 5000s ease-in-out 0s",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<InputRightElement onClick={() => togglePassword(!showPassword)}>
|
||||||
|
<CustomIcon icon="password" />
|
||||||
</InputRightElement>
|
</InputRightElement>
|
||||||
</InputGroup>
|
</InputGroup>
|
||||||
<FormErrorMessage color="red.400" pl="1">
|
|
||||||
{errors.email && errors.email.message}
|
|
||||||
</FormErrorMessage>
|
|
||||||
</FormControl>
|
|
||||||
<FormControl isInvalid={errors.password}>
|
|
||||||
<PasswordInput
|
|
||||||
placeholder="Add password"
|
|
||||||
name="password"
|
|
||||||
autoComplete="new-password"
|
|
||||||
ref={register({ required: "Password is required!" })}
|
|
||||||
/>
|
|
||||||
<FormErrorMessage color="red.400" pl="1">
|
|
||||||
{errors.password && errors.password.message}
|
|
||||||
</FormErrorMessage>
|
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Button
|
<Button
|
||||||
my={8}
|
mt="30px"
|
||||||
variant="solid"
|
mb="10px"
|
||||||
colorScheme="blue"
|
bg="#F56646"
|
||||||
width="100%"
|
fontWeight="700"
|
||||||
|
borderRadius="30px"
|
||||||
|
padding="10px 30px"
|
||||||
|
fontSize="20px"
|
||||||
|
height="46px"
|
||||||
|
color="#ffffff"
|
||||||
type="submit"
|
type="submit"
|
||||||
|
width="100%"
|
||||||
|
variant="solid"
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
|
_hover={{
|
||||||
|
backgroundColor: "#F4532F",
|
||||||
|
}}
|
||||||
|
_focus={{
|
||||||
|
backgroundColor: "#F4532F",
|
||||||
|
}}
|
||||||
|
_active={{
|
||||||
|
backgroundColor: "#F4532F",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Register
|
Register
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
<Box height="1px" width="100%" background="#eaebf8" mb="1.875rem" />
|
<Text textAlign="center" fontSize="md" color="white">
|
||||||
<Text textAlign="center" fontSize="md" color="gray.1200" pb={8}>
|
|
||||||
Already have an account?{" "}
|
Already have an account?{" "}
|
||||||
<Box
|
<Box
|
||||||
cursor="pointer"
|
cursor="pointer"
|
||||||
color="blue.400"
|
color="#EE8686"
|
||||||
as="span"
|
as="span"
|
||||||
onClick={() => toggleModal({ type: MODAL_TYPES.LOGIN })}
|
onClick={() => toggleModal({ type: MODAL_TYPES.LOGIN })}
|
||||||
>
|
>
|
||||||
|
|
|
@ -61,7 +61,6 @@ const SubscriptionCard = ({ subscription, isDesktopView, iconLink }) => {
|
||||||
<>
|
<>
|
||||||
{!isDesktopView && (
|
{!isDesktopView && (
|
||||||
<AccordionItem
|
<AccordionItem
|
||||||
bgColor="blue.50"
|
|
||||||
borderBottomColor="blue.500"
|
borderBottomColor="blue.500"
|
||||||
key={`token-row-${subscription.id}`}
|
key={`token-row-${subscription.id}`}
|
||||||
>
|
>
|
||||||
|
@ -108,7 +107,7 @@ const SubscriptionCard = ({ subscription, isDesktopView, iconLink }) => {
|
||||||
<AccordionIcon />
|
<AccordionIcon />
|
||||||
</AccordionButton>
|
</AccordionButton>
|
||||||
</h2>
|
</h2>
|
||||||
<AccordionPanel pb={4} bgColor="blue.100" boxShadow="md">
|
<AccordionPanel pb={4} boxShadow="md">
|
||||||
<Stack>
|
<Stack>
|
||||||
<Stack fontSize="sm" h="min-content" pr={0}>
|
<Stack fontSize="sm" h="min-content" pr={0}>
|
||||||
<Text placeSelf="flex-start">Address:</Text>
|
<Text placeSelf="flex-start">Address:</Text>
|
||||||
|
|
|
@ -55,6 +55,7 @@ const MobileFiledInput = ({
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Input
|
<Input
|
||||||
|
variant="bw"
|
||||||
ref={inputRef}
|
ref={inputRef}
|
||||||
type="text"
|
type="text"
|
||||||
value={value}
|
value={value}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
.button {
|
||||||
|
background-color: #F56646;
|
||||||
|
font-weight: 700;
|
||||||
|
border-radius: 15px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 5px 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 16px;
|
||||||
|
justify-content: center;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button:hover {
|
||||||
|
background-color: #F4532F;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
/* eslint-disable react/react-in-jsx-scope */
|
||||||
|
import styles from "./PlainButton.module.css";
|
||||||
|
|
||||||
|
const PlainButton = (props) => {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
onClick={props.onClick}
|
||||||
|
className={styles.button}
|
||||||
|
style={props.style}
|
||||||
|
type={props.type}
|
||||||
|
>
|
||||||
|
{props.children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export default PlainButton;
|
|
@ -77,7 +77,7 @@ export const SITEMAP = [
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: "Docs",
|
title: "Docs",
|
||||||
path: "/docs",
|
path: "https://docs.moonstream.to/",
|
||||||
type: PAGETYPE.CONTENT,
|
type: PAGETYPE.CONTENT,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,6 @@ import {
|
||||||
AlertDialogOverlay,
|
AlertDialogOverlay,
|
||||||
Button,
|
Button,
|
||||||
Spinner,
|
Spinner,
|
||||||
Divider,
|
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import UIContext from "../UIProvider/context";
|
import UIContext from "../UIProvider/context";
|
||||||
import useDashboard from "../../hooks/useDashboard";
|
import useDashboard from "../../hooks/useDashboard";
|
||||||
|
@ -264,14 +263,26 @@ const OverlayProvider = ({ children }) => {
|
||||||
<Modal
|
<Modal
|
||||||
isOpen={modalDisclosure.isOpen}
|
isOpen={modalDisclosure.isOpen}
|
||||||
onClose={() => toggleModal({ type: MODAL_TYPES.OFF })}
|
onClose={() => toggleModal({ type: MODAL_TYPES.OFF })}
|
||||||
size="2xl"
|
size={modal.type === MODAL_TYPES.LOGIN ? "lg" : "2xl"}
|
||||||
scrollBehavior="outside"
|
scrollBehavior="outside"
|
||||||
trapFocus={false}
|
trapFocus={false}
|
||||||
>
|
>
|
||||||
<ModalOverlay />
|
<ModalOverlay backdropFilter="auto" backdropBrightness="60%" />
|
||||||
|
|
||||||
<ModalContent textColor="black">
|
<ModalContent
|
||||||
<ModalHeader bgColor="white.200" py={2} fontSize="lg">
|
bg="#1A1D22"
|
||||||
|
borderRadius="15px"
|
||||||
|
border="1px white solid"
|
||||||
|
p="30px"
|
||||||
|
textColor="white"
|
||||||
|
>
|
||||||
|
<ModalHeader
|
||||||
|
p="0px"
|
||||||
|
fontSize="24px"
|
||||||
|
lineHeight="24px"
|
||||||
|
fontWeight="700"
|
||||||
|
mb="30px"
|
||||||
|
>
|
||||||
{modal.type === MODAL_TYPES.NEW_SUBSCRIPTON &&
|
{modal.type === MODAL_TYPES.NEW_SUBSCRIPTON &&
|
||||||
"Subscribe to a new address"}
|
"Subscribe to a new address"}
|
||||||
{modal.type === MODAL_TYPES.FORGOT && "Forgot Password"}
|
{modal.type === MODAL_TYPES.FORGOT && "Forgot Password"}
|
||||||
|
@ -283,9 +294,9 @@ const OverlayProvider = ({ children }) => {
|
||||||
"Would you like to give it a name?"}
|
"Would you like to give it a name?"}
|
||||||
{modal.type === MODAL_TYPES.MOBILE_INPUT_FIELD && modal.props.title}
|
{modal.type === MODAL_TYPES.MOBILE_INPUT_FIELD && modal.props.title}
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<Divider />
|
<ModalCloseButton color="white" top="25px" right="25px" />
|
||||||
<ModalCloseButton />
|
|
||||||
<ModalBody
|
<ModalBody
|
||||||
|
p="0px"
|
||||||
zIndex={100002}
|
zIndex={100002}
|
||||||
bgColor={
|
bgColor={
|
||||||
modal.type === MODAL_TYPES.UPLOAD_ABI ? "white.200" : undefined
|
modal.type === MODAL_TYPES.UPLOAD_ABI ? "white.200" : undefined
|
||||||
|
@ -299,7 +310,9 @@ const OverlayProvider = ({ children }) => {
|
||||||
{...modal.props}
|
{...modal.props}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{modal.type === MODAL_TYPES.FORGOT && <ForgotPassword />}
|
{modal.type === MODAL_TYPES.FORGOT && (
|
||||||
|
<ForgotPassword toggleModal={toggleModal} />
|
||||||
|
)}
|
||||||
{modal.type === MODAL_TYPES.HUBSPOT && (
|
{modal.type === MODAL_TYPES.HUBSPOT && (
|
||||||
<HubspotForm
|
<HubspotForm
|
||||||
toggleModal={toggleModal}
|
toggleModal={toggleModal}
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { Flex, Spinner, Box } from "@chakra-ui/react";
|
import { Flex, Spinner, Box } from "@chakra-ui/react";
|
||||||
import { getLayout as getSiteLayout } from "./RootLayout";
|
import { getLayout as getSiteLayout } from "./RootLayout";
|
||||||
import React, { useContext, useEffect } from "react";
|
import React, { Suspense, useContext, useEffect } from "react";
|
||||||
import UIContext from "../core/providers/UIProvider/context";
|
import UIContext from "../core/providers/UIProvider/context";
|
||||||
import AppNavbar from "../components/AppNavbar";
|
import AppNavbar from "../components/AppNavbar";
|
||||||
import { BACKGROUND_COLOR } from "../core/constants";
|
import { BACKGROUND_COLOR } from "../core/constants";
|
||||||
|
import Sidebar from "../components/Sidebar";
|
||||||
|
|
||||||
const AppLayout = ({ children }) => {
|
const AppLayout = ({ children }) => {
|
||||||
const ui = useContext(UIContext);
|
const ui = useContext(UIContext);
|
||||||
|
@ -25,6 +26,7 @@ const AppLayout = ({ children }) => {
|
||||||
w="100%"
|
w="100%"
|
||||||
overflow="hidden"
|
overflow="hidden"
|
||||||
direction="column"
|
direction="column"
|
||||||
|
pb="85px"
|
||||||
>
|
>
|
||||||
{(!ui.isAppReady || !ui.isLoggedIn) && (
|
{(!ui.isAppReady || !ui.isLoggedIn) && (
|
||||||
<Spinner
|
<Spinner
|
||||||
|
@ -55,7 +57,19 @@ const AppLayout = ({ children }) => {
|
||||||
>
|
>
|
||||||
<AppNavbar />
|
<AppNavbar />
|
||||||
</Flex>
|
</Flex>
|
||||||
{ui.isAppReady && ui.isLoggedIn && children}
|
<Flex
|
||||||
|
direction="row"
|
||||||
|
// id="Bugout"
|
||||||
|
className="Main"
|
||||||
|
w="100%"
|
||||||
|
h="100%"
|
||||||
|
maxH="100%"
|
||||||
|
>
|
||||||
|
<Suspense fallback="">
|
||||||
|
<Sidebar />
|
||||||
|
</Suspense>
|
||||||
|
{ui.isAppReady && ui.isLoggedIn && children}
|
||||||
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { CloseIcon } from "@chakra-ui/icons";
|
import { CloseIcon } from "@chakra-ui/icons";
|
||||||
import { Flex, Center, Text, Link, IconButton } from "@chakra-ui/react";
|
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";
|
import UIContext from "../core/providers/UIProvider/context";
|
||||||
const Sidebar = React.lazy(() => import("../components/Sidebar"));
|
const Sidebar = React.lazy(() => import("../components/Sidebar"));
|
||||||
|
|
||||||
|
@ -17,9 +17,6 @@ const RootLayout = (props) => {
|
||||||
h="100%"
|
h="100%"
|
||||||
maxH="100%"
|
maxH="100%"
|
||||||
>
|
>
|
||||||
<Suspense fallback="">
|
|
||||||
<Sidebar />
|
|
||||||
</Suspense>
|
|
||||||
<Flex
|
<Flex
|
||||||
direction="column"
|
direction="column"
|
||||||
flexGrow={1}
|
flexGrow={1}
|
||||||
|
|
|
@ -29,6 +29,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.t40 {
|
||||||
|
top: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t0 {
|
||||||
|
top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.pro-sidebar {
|
.pro-sidebar {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 270px;
|
width: 270px;
|
||||||
|
|
|
@ -267,3 +267,32 @@ code {
|
||||||
linear-gradient(to right, transparent 6px, white 6px),
|
linear-gradient(to right, transparent 6px, white 6px),
|
||||||
linear-gradient(to bottom, #444 1px, transparent 1px);
|
linear-gradient(to bottom, #444 1px, transparent 1px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.desktop-menu-item {
|
||||||
|
color: white;
|
||||||
|
font-weight: 400;
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 0px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
height: 22px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.desktop-menu-item:hover {
|
||||||
|
color: #F56646;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* to dont change div size when bolding text.
|
||||||
|
Need 'title' attr in the longest item's tag*/
|
||||||
|
.desktop-menu-item::after {
|
||||||
|
display: block;
|
||||||
|
content: attr(title);
|
||||||
|
font-weight: 700;
|
||||||
|
height: 1px;
|
||||||
|
color: transparent;
|
||||||
|
overflow: hidden;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue