diff --git a/src/popup.ts b/src/popup.ts index b722c0d..41eadd8 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -9,7 +9,7 @@ interface PopupOptions { // Ensures retina subpixel rounding // does not leave slightly blurry underlap const defaultWidth = 442; -const defaultHeight = 635; +const defaultHeight = 532; const defaultTitle = 'Continue with Data Vault'; // https://developer.mozilla.org/en-US/docs/Web/API/Window/open diff --git a/src/react/components/checklist/index.tsx b/src/react/components/checklist/index.tsx index da56b52..da6ba23 100644 --- a/src/react/components/checklist/index.tsx +++ b/src/react/components/checklist/index.tsx @@ -22,15 +22,15 @@ const CheckList: React.FC = ({ items }) => ( return ( - + {text} diff --git a/src/react/components/checkmark.tsx b/src/react/components/checkmark.tsx new file mode 100644 index 0000000..6be6c51 --- /dev/null +++ b/src/react/components/checkmark.tsx @@ -0,0 +1,8 @@ +import React from 'react'; + +export const CheckmarkIcon = ({ size = 72 }: { size?: number }) => ( + + + + +); diff --git a/src/react/components/link.tsx b/src/react/components/link.tsx index bc9c025..e7698c2 100644 --- a/src/react/components/link.tsx +++ b/src/react/components/link.tsx @@ -6,12 +6,10 @@ interface LinkProps extends BoxProps { _hover?: BoxProps; } -const Link: React.FC = ({ _hover = {}, children, ...rest }) => ( +export const Link: React.FC = ({ _hover = {}, children, ...rest }) => ( - + {children} ); - -export { Link }; diff --git a/src/react/components/modal/index.tsx b/src/react/components/modal/index.tsx index b55d78d..c4f7aa3 100644 --- a/src/react/components/modal/index.tsx +++ b/src/react/components/modal/index.tsx @@ -1,6 +1,5 @@ import React from 'react'; import { Modal as BlockstackModal, ThemeProvider, theme, CSSReset, Flex, Box, Text } from '@blockstack/ui'; -import CloseIcon from 'mdi-react/CloseIcon'; import ChevronLeftIcon from 'mdi-react/ChevronLeftIcon'; import { useHover } from 'use-events'; import { Logo } from '../logo'; @@ -11,6 +10,17 @@ import { ContinueWithDataVault } from '../screens/sign-in'; import { useConnect } from '../../hooks/useConnect'; import { States } from '../connect/context'; +const CloseIcon = ({ size = 16 }) => ( + + + +); + interface HeaderTitleProps { title: string; hideIcon?: boolean; @@ -19,7 +29,7 @@ interface HeaderTitleProps { const HeaderTitle: React.FC = ({ hideIcon = false, title }) => ( {hideIcon ? null : } - + {title} @@ -32,13 +42,13 @@ interface ModalHeader { hideIcon?: boolean; } -const ModalHeaderIconButton = (props: any) => { +const ModalHeaderIconButton = ({ size, ...props }: any) => { const [hover, bind] = useHover(); const Icon = props.icon; return ( - - + + ); }; @@ -48,7 +58,7 @@ const ModalHeader = ({ title, back, hideIcon, close, ...rest }: ModalHeader) => return ( borderBottomColor="inherit" {...rest} > - {back ? doChangeScreen(back)} icon={ChevronLeftIcon} /> : null} + {back ? doChangeScreen(back)} icon={ChevronLeftIcon} size={20} /> : null} - {close ? : null} + {close ? : null} ); }; diff --git a/src/react/components/screen/screen-body.tsx b/src/react/components/screen/screen-body.tsx index 182bc1e..53a088d 100644 --- a/src/react/components/screen/screen-body.tsx +++ b/src/react/components/screen/screen-body.tsx @@ -1,23 +1,21 @@ import React from 'react'; -import { Stack, BoxProps } from '@blockstack/ui'; +import { Flex, FlexProps } from '@blockstack/ui'; import { Title, Body, Pretitle } from '../typography'; -export interface ScreenBodyProps extends BoxProps { +export interface ScreenBodyProps extends FlexProps { title?: string; pretitle?: string | React.ElementType; body?: (string | JSX.Element)[]; fullWidth?: boolean; } -export const ScreenBody = ({ title, body, pretitle, fullWidth, ...rest }: ScreenBodyProps) => ( - - {pretitle && {pretitle}} - {title && {title}} - {body && ( - - {body && body.length ? body.map((text, key) => {text}) : body} - - )} - -); +export const ScreenBody = ({ title, body, pretitle, fullWidth, ...rest }: ScreenBodyProps) => { + return ( + + {pretitle && {pretitle}} + {title && {title}} + {body && body.length ? body.map((text, key) => {text}) : body} + + ); +}; diff --git a/src/react/components/screen/screen-header.tsx b/src/react/components/screen/screen-header.tsx index 0161be1..cfb6b86 100644 --- a/src/react/components/screen/screen-header.tsx +++ b/src/react/components/screen/screen-header.tsx @@ -13,7 +13,7 @@ interface HeaderTitleProps { const HeaderTitle: React.FC = ({ hideLogo, title }) => ( {hideLogo ? null : } - + {title} @@ -50,7 +50,7 @@ export const ScreenHeader = ({ return ( = ({ - isInline, - spacing = 4, - align, - justify, - shouldWrapChildren, - noMinHeight, - isLoading, - children, - ...rest -}) => ( +export const Screen: React.FC = ({ noMinHeight, isLoading, children, ...rest }) => ( <> - {children} - + ); diff --git a/src/react/components/screens/finished.tsx b/src/react/components/screens/finished.tsx index b9cfaaf..9580ff0 100644 --- a/src/react/components/screens/finished.tsx +++ b/src/react/components/screens/finished.tsx @@ -1,24 +1,19 @@ import React from 'react'; import { Box, BoxProps, Button } from '@blockstack/ui'; -import { AppIcon } from '../app-icon'; - import { useConnect } from '../../hooks/useConnect'; -import { Logo } from '../logo'; import { useAppDetails } from '../../hooks/useAppDetails'; import { Screen, ScreenBody, ScreenActions } from '../screen'; +import { CheckmarkIcon } from '../checkmark'; interface AppElementProps extends BoxProps { name: string; icon: string; } -const AppElement = ({ name, icon, ...rest }: AppElementProps) => ( +const FinishedIcon = ({ ...rest }: AppElementProps) => ( - - - - + ); @@ -28,13 +23,18 @@ export const Finished = () => { return ( - + + Everything you do in {name} will be private, secure, and only accessible with your Secret Key. + , + ]} /> - diff --git a/src/react/components/screens/how-it-works.tsx b/src/react/components/screens/how-it-works.tsx index 651887c..31dd344 100644 --- a/src/react/components/screens/how-it-works.tsx +++ b/src/react/components/screens/how-it-works.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Box, Text, Stack, Button } from '@blockstack/ui'; +import { Box, Text, Button } from '@blockstack/ui'; import { useAppDetails } from '../../hooks/useAppDetails'; import { BlockchainIcon, AppsIcon, EncryptionIcon } from '../vector'; @@ -7,10 +7,7 @@ import { useConnect } from '../../hooks/useConnect'; import { Screen, ScreenBody, ScreenActions } from '../screen/index'; -const howDataVaultWorks = (appName: string) => [ - { - body: `Usually, apps store your data on their servers for their own use. Data Vault isolates your encrypted data from use by others so that apps like ${appName} (and even Data Vault) can’t use it.`, - }, +const howDataVaultWorks = [ { icon: , title: 'Encryption', @@ -39,23 +36,32 @@ export const HowItWorks: React.FC = () => { ( - - - {Icon && ( + body={[ + + Usually, apps store your data on their servers for their own use. Data Vault isolates your encrypted data + from use by others so that apps like {name} (and even Data Vault) can’t use it. + , + + {howDataVaultWorks.map(({ title, body, icon }, key) => ( + - {Icon && Icon} + {icon} - )} - {title && {title}} - {body} - - - ))} + + {title} + + + {body} + + + ))} + , + ]} /> - + { doStartAuth(); // eslint-disable-next-line @typescript-eslint/no-floating-promises @@ -95,6 +100,7 @@ export const Intro = () => { Sign in to Data Vault { doGoToHowItWorksScreen(); }} diff --git a/src/react/components/screens/sign-in.tsx b/src/react/components/screens/sign-in.tsx index e469bd0..7f1232a 100644 --- a/src/react/components/screens/sign-in.tsx +++ b/src/react/components/screens/sign-in.tsx @@ -19,6 +19,7 @@ const ContinueWithDataVault: React.FC = props => { py={3} borderRadius="6px" boxShadow="mid" + height={14} transition="250ms all" cursor={hovered ? 'pointer' : 'unset'} bg={hovered ? 'rgba(0,0,0,0.02)' : 'white'} @@ -31,7 +32,7 @@ const ContinueWithDataVault: React.FC = props => { {...props} > - Continue with Data Vault + Continue with Data Vault ); }; diff --git a/src/react/components/typography/index.tsx b/src/react/components/typography/index.tsx index 4c7878f..b35cce0 100644 --- a/src/react/components/typography/index.tsx +++ b/src/react/components/typography/index.tsx @@ -6,7 +6,7 @@ const Title: React.FC = props => (