Skip to content

Commit

Permalink
feat: Fix formatting, some logic updates for signing JWT
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrydallison committed Oct 16, 2024
1 parent 01e8677 commit 8875070
Show file tree
Hide file tree
Showing 63 changed files with 222 additions and 218 deletions.
10 changes: 5 additions & 5 deletions src/Components/DataCard/DataCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const DataContent = styled.div`
margin: 10px;
border-radius: 5px;
@media ${breakpoints.down('md')} {
font-size: 1.2rem;
font-size: 0.75rem;
}
`;
const Sprite = styled(BaseSprite)`
Expand All @@ -27,7 +27,7 @@ const TitleRow = styled.div<{ titleMargin?: string; titleSize?: string }>`
margin: ${({ titleMargin }) => (titleMargin ? titleMargin : '0 0 30px 0')};
`;
const Title = styled.div<{ titleSize?: string }>`
font-size: ${({ titleSize }) => (titleSize ? titleSize : '1.4rem')};
font-size: ${({ titleSize }) => (titleSize ? titleSize : '0.875rem')};
`;
const DataContainer = styled.div`
display: flex;
Expand All @@ -38,7 +38,7 @@ const DataItem = styled.div`
margin-bottom: 10px;
&:first-of-type {
font-weight: ${({ theme }) => theme.FONT_WEIGHT_NORMAL};
font-size: 1.8rem;
font-size: 1.125rem;
}
&:last-of-type {
margin-bottom: 0;
Expand Down Expand Up @@ -79,10 +79,10 @@ export const DataCard = ({
<DataCardContainer className={className} width={width}>
<DataContent>
<TitleRow titleMargin={titleMargin}>
{icon && <Sprite icon={icon} size="1.8rem" color={iconColor} />}
{icon && <Sprite icon={icon} size="1.125rem" color={iconColor} />}
<Title titleSize={titleSize}>{title}</Title>
{handleClose && (
<CloseIcon icon="CLOSE" onClick={handleClose} size="1.4rem" color="ICON_WHITE" />
<CloseIcon icon="CLOSE" onClick={handleClose} size="0.875rem" color="ICON_WHITE" />
)}
{popup && BuildPopupNote(popup)}
</TitleRow>
Expand Down
10 changes: 5 additions & 5 deletions src/Components/DatePicker/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const DatepickContainer = styled.div`
justify-content: space-between;
/* Unfortunatly, need to finetune datepicker due to rem sizing */
.react-datepicker {
font-size: 1.5rem;
font-size: 0.938;
.react-datepicker__header {
background: ${({ theme }) => theme.BACKGROUND_THEME};
}
Expand All @@ -39,15 +39,15 @@ const DatepickContainer = styled.div`
}
.react-datepicker__day,
.react-datepicker__day-name {
width: 2.7rem;
line-height: 2.7rem;
width: 1.688rem;
line-height: 1.688rem;
color: ${({ theme }) => theme.FONT_PRIMARY};
}
.react-datepicker__day-name {
color: ${({ theme }) => theme.FONT_PRIMARY};
}
.react-datepicker__current-month {
font-size: 1.4rem;
font-size: 0.875rem;
color: ${({ theme }) => theme.FONT_PRIMARY};
}
.react-datepicker__day--selected {
Expand All @@ -59,7 +59,7 @@ const DatepickContainer = styled.div`
}
`;
const StyledLabel = styled.label`
font-size: 1.5rem;
font-size: 0.938rem;
font-weight: ${({ theme }) => theme.FONT_WEIGHT_NORMAL};
color: ${({ theme }) => theme.FONT_PRIMARY};
margin-right: 8px;
Expand Down
4 changes: 2 additions & 2 deletions src/Components/DropdownBtn/DropdownBtn.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Container = styled.div`

const ButtonGroup = styled.div`
position: relative;
padding-right: 1.6rem;
padding-right: 1rem;
`;

const Button = styled(OgButton)`
Expand Down Expand Up @@ -109,7 +109,7 @@ const DropdownBtn = ({ className, color, initial, onClick, options, type }) => {
{initial}
</Button>
<SelectArrow $color={$color} onClick={toggleDropdown} type={type}>
<Sprite icon="CARET" size="0.9rem" color={theme[`BUTTON_${$color}_FONT`]} />
<Sprite icon="CARET" size="0.563rem" color={theme[`BUTTON_${$color}_FONT`]} />
</SelectArrow>
</ButtonGroup>
<DropdownList show={showDropdown}>
Expand Down
11 changes: 6 additions & 5 deletions src/Components/FileFinder/FileFinder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ const ItemWrapper = styled.div<{ theme: string }>`
display: inline-block;
}
.rstm-toggle-icon-symbol {
width: 2rem;
height: 2rem;
width: 1.25rem;
height: 1.25rem;
text-align: center;
line-height: 2rem;
line-height: 1.25rem;
}
.rstm-tree-item-group {
Expand All @@ -60,7 +60,7 @@ const ItemWrapper = styled.div<{ theme: string }>`
}
.rstm-tree-item {
padding: 0.75rem 1rem;
padding: 0.469rem 0.625rem;
cursor: pointer;
color: ${({ theme }) => theme.FONT_PRIMARY};
background: none;
Expand All @@ -80,7 +80,7 @@ const ItemWrapper = styled.div<{ theme: string }>`
}
.rstm-search {
padding: 1rem 1.5rem;
padding: 0.625rem 0.938rem;
border: none;
width: 100%;
}
Expand Down Expand Up @@ -173,6 +173,7 @@ export const FileFinder = ({
</TreeMenu>
{info && (
<Sticky>
{/* @ts-ignore */}
<Content>{info}</Content>
</Sticky>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Filters/Components/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const Input = styled.input`
border: 1px solid ${({ theme }) => theme.INPUT_BORDER_LIGHT};
border-radius: 4px;
color: ${({ theme }) => theme.INPUT_FONT_LIGHT};
font-size: 1.4rem;
line-height: 2.2rem;
font-size: 0.875rem;
line-height: 1.375rem;
background-color: ${({ theme }) => theme.INPUT_BG_LIGHT};
&:focus {
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Filters/Filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const FilterItem = styled.div`
}
`;
const FilterTitle = styled.div`
font-size: 1.2rem;
font-size: 0.75rem;
font-weight: ${({ theme }) => theme.FONT_WEIGHT_NORMAL};
color: ${({ theme }) => theme.FONT_TITLE_INFO};
margin-bottom: 4px;
Expand Down
8 changes: 4 additions & 4 deletions src/Components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,31 +90,31 @@ export const Footer = () => {
rel="noreferrer"
title="Visit Provenance Blockchain"
>
<Sprite icon="PROVENANCE" size="1.8rem" color="WHITE" />
<Sprite icon="PROVENANCE" size="1.125rem" color="WHITE" />
</SocialLink>
<SocialLink
href={SOCIAL_GITHUB_URL}
target="_blank"
rel="noreferrer"
title="Provenance Blockchain Explorer GitHub"
>
<Sprite icon="GITHUB" size="1.8rem" color="WHITE" />
<Sprite icon="GITHUB" size="1.125rem" color="WHITE" />
</SocialLink>
{/* <SocialLink
href={SOCIAL_SLACK_URL}
target="_blank"
rel="noreferrer"
title="Join Provenance.io on Slack"
>
<Sprite icon="SLACK" size="1.8rem" color="WHITE" />
<Sprite icon="SLACK" size="1.125rem" color="WHITE" />
</SocialLink> */}
<SocialLink
href={SOCIAL_DISCORD_URL}
target="_blank"
rel="noreferrer"
title="Provenance Blockchain Explorer Discord"
>
<Sprite icon="DISCORD" size="2.2rem" color="WHITE" />
<Sprite icon="DISCORD" size="1.375rem" color="WHITE" />
</SocialLink>
<FooterVersion>v{version ? version : '?.?.?'}</FooterVersion>
</FooterSocial>
Expand Down
10 changes: 5 additions & 5 deletions src/Components/Forms/Components/FileUploadComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FieldInputProps } from 'formik';
import styled from 'styled-components';
import Sprite from '../../../Components/Sprite';
import { useCallback, useState } from 'react';
import Sprite from '../../../Components/Sprite';
import { bytesToFileSize } from '../../../utils';
import Loading from '../../../Components/Loading';

Expand All @@ -13,8 +13,8 @@ const Container = styled.div<{ dragActive: boolean }>`
`${dragActive ? '2px solid' : '1px dashed'} ${theme.INPUT_BORDER_LIGHT}`};
border-radius: 4px;
color: ${({ theme }) => theme.INPUT_FONT_LIGHT};
font-size: 1.2rem;
line-height: 2.2rem;
font-size: 0.75rem;
line-height: 1.375rem;
background-color: ${({ theme }) => theme.INPUT_BG_LIGHT};
height: 100px;
&:focus {
Expand Down Expand Up @@ -169,7 +169,7 @@ const FileUploadComponent = ({
<FileUpload>
<Input type="file" {...field} {...props} onChange={upload} />
<SpriteHolder>
<Sprite icon="UPGRADE" size="3rem" />
<Sprite icon="UPGRADE" size="1.875rem" />
</SpriteHolder>
Upload .wasm file
</FileUpload>
Expand All @@ -179,7 +179,7 @@ const FileUploadComponent = ({
<div>File: {fileName}</div>
<div>Size: {fileSize}</div>
</FileData>
<Sprite icon="TRASH" size="5rem" onClick={handleFileDelete} />
<Sprite icon="TRASH" size="3.125rem" onClick={handleFileDelete} />
</Uploaded>
) : (
<LoadingContainer />
Expand Down
12 changes: 6 additions & 6 deletions src/Components/Forms/Components/FormBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const Field = styled(BaseField)<{ $issub: boolean; height?: string; $noShadow?:
border: 1px solid ${({ theme }) => theme.INPUT_BORDER_LIGHT};
border-radius: 4px;
color: ${({ theme }) => theme.INPUT_FONT_LIGHT};
font-size: ${({ $issub }) => ($issub ? '1.2rem' : '1.4rem')};
line-height: 2.2rem;
font-size: ${({ $issub }) => ($issub ? '0.75rem' : '0.875rem')};
line-height: 1.375rem;
background-color: ${({ theme }) => theme.INPUT_BG_LIGHT};
height: ${({ height }) => height && height};
Expand All @@ -47,8 +47,8 @@ const TextArea = styled.textarea<{ $issub: boolean }>`
border: 1px solid ${({ theme }) => theme.INPUT_BORDER_LIGHT};
border-radius: 4px;
color: ${({ theme }) => theme.INPUT_FONT_LIGHT};
font-size: ${({ $issub }) => ($issub ? '1.2rem' : '1.4rem')};
line-height: 2.2rem;
font-size: ${({ $issub }) => ($issub ? '0.75rem' : '0.875rem')};
line-height: 1.375rem;
background-color: ${({ theme }) => theme.INPUT_BG_LIGHT};
&:focus {
Expand All @@ -64,7 +64,7 @@ const TextArea = styled.textarea<{ $issub: boolean }>`
`;

const ThisField = styled.div<{ grid: boolean; noBorder?: boolean }>`
padding: 1.6rem 0 1.6rem 0;
padding: 1rem 0 1rem 0;
display: ${({ grid }) => grid && 'grid'};
grid-template-columns: ${({ grid }) => grid && ' 3fr 0.75fr'};
border-bottom: ${({ grid, theme, noBorder }) =>
Expand All @@ -73,7 +73,7 @@ const ThisField = styled.div<{ grid: boolean; noBorder?: boolean }>`

const Label = styled.label<{ $issub: boolean; grid: boolean }>`
margin-top: ${({ grid }) => grid && '10px'};
font-size: ${({ $issub }) => ($issub ? '1.4rem' : '1.6rem')};
font-size: ${({ $issub }) => ($issub ? '0.875rem' : '1rem')};
font-weight: ${({ theme, $issub }) => !$issub && theme.FONT_WEIGHT_BOLD};
line-height: 1.75;
align-self: center;
Expand Down
6 changes: 3 additions & 3 deletions src/Components/Forms/Forms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { capitalize, MyFieldsProps } from '../../utils';
import { FormBuilder } from './Components';

const ThisField = styled.div`
padding-top: 1.6rem;
padding-top: 1rem;
`;

const Label = styled.label<{ $issub: boolean }>`
font-size: ${({ $issub }) => ($issub ? '1.4rem' : '1.6rem')};
font-size: ${({ $issub }) => ($issub ? '0.875rem' : '1rem')};
font-weight: ${({ theme, $issub }) => !$issub && theme.FONT_WEIGHT_BOLD};
line-height: 1.75;
`;
Expand All @@ -25,7 +25,7 @@ const RemoveButton = styled(BaseButton)`
`;

const SubTitle = styled.div`
font-size: 1.4rem;
font-size: 0.875rem;
font-weight: ${({ theme }) => theme.FONT_WEIGHT_BOLD};
`;

Expand Down
2 changes: 1 addition & 1 deletion src/Components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Title = styled.h2`
&& {
margin: 0;
padding: 0;
font-size: 1.4rem;
font-size: 0.875rem;
font-weight: ${({ theme }) => theme.FONT_WEIGHT_BOLD};
}
`;
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const Element = styled(NumberFormat)`
border: 1px solid ${({ theme }) => theme.INPUT_BORDER_LIGHT};
border-radius: 4px;
color: ${({ theme }) => theme.INPUT_FONT_LIGHT};
font-size: 1.4rem;
line-height: 2.2rem;
font-size: 0.875rem;
line-height: 1.375rem;
background-color: ${({ theme }) => theme.INPUT_BG_LIGHT};
&:focus {
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Layout/Content.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Sprite = styled(BaseSprite)`
margin-right: 10px;
`;
const Title = styled.div`
font-size: ${({ titleSize }) => (titleSize ? titleSize : '1.6rem')};
font-size: ${({ titleSize }) => (titleSize ? titleSize : '1rem')};
`;
const Link = styled(BaseLink)`
justify-content: flex-end;
Expand Down Expand Up @@ -82,7 +82,7 @@ const Content = ({

const buildHeader = () => (
<Header headerMargin={headerMargin}>
{icon && <Sprite icon={icon} size="2rem" color={iconColor} />}
{icon && <Sprite icon={icon} size="1.25rem" color={iconColor} />}
{title && <Title titleSize={titleSize}>{title}</Title>}
{linkTo && linkTitle && <Link to={link.to}>{link.title}</Link>}
{headerContent}
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Layout/Wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const PageWrapper = styled.div<{ noHeader: boolean }>`
padding: 131px 10%;
position: relative;
background-color: transparent;
font-size: 1.4rem;
font-size: 0.875rem;
@media ${breakpoints.down('lg')} {
padding: ${({ noHeader }) => (noHeader ? '126px 4%' : '110px 4%')};
}
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Loading/Loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Loading.propTypes = {

Loading.defaultProps = {
className: '',
size: '5rem',
size: '3.125rem',
};

export default Loading;
12 changes: 6 additions & 6 deletions src/Components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ const Dialog = styled.div`
display: flex;
align-items: center;
position: relative;
margin: 0.5rem;
margin: 0.313rem;
width: 100%;
/* animate.css @keyframe */
animation: flipInX;
animation-duration: 0.8s;
@media ${breakpoints.up('sm')} {
margin: 1.75rem auto;
margin: 1.094rem auto;
max-width: 500px;
}
`;
Expand All @@ -46,7 +46,7 @@ const Content = styled.div<{ largeModal: boolean }>`
flex-direction: column;
max-height: ${({ largeModal }) => largeModal && '70vh'};
overflow-y: ${({ largeModal }) => largeModal && 'auto'};
padding: 2.4rem;
padding: 1.5rem;
width: 100%;
border-radius: 4px;
box-shadow: 0 15px 35px rgb(50 50 93 / 20%), 0 5px 15px rgb(0 0 0 / 17%);
Expand All @@ -56,8 +56,8 @@ const Content = styled.div<{ largeModal: boolean }>`

const Sprite = styled(OgSprite)`
position: absolute;
top: 1.6rem;
right: 1.6rem;
top: 1rem;
right: 1rem;
cursor: pointer;
`;

Expand All @@ -82,7 +82,7 @@ const Modal = React.memo(
<Overlay />
<Dialog>
<Content largeModal={largeModal}>
<Sprite icon="CLOSE" color={theme.FONT_PRIMARY} size="2rem" onClick={onClose} />
<Sprite icon="CLOSE" color={theme.FONT_PRIMARY} size="1.25rem" onClick={onClose} />
<Body>{children}</Body>
</Content>
</Dialog>
Expand Down
Loading

0 comments on commit 8875070

Please sign in to comment.