Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 41 additions & 42 deletions web/src/assets/svgs/hero/hero-darkmode-desktop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions web/src/assets/svgs/hero/hero-darkmode-mobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions web/src/components/DisputePreview/DisputeContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const ReactMarkdownWrapper = styled.div`
}
`;

const QuestionAndDescriptionWrapper = styled.div``;

const VotingOptions = styled.div`
display: flex;
flex-direction: column;
Expand All @@ -38,7 +40,7 @@ const AnswersContainer = styled.div`
flex-direction: column;
`;

const AnswersHeader = styled.h3`
const AnswersHeader = styled.small`
margin: 0;
`;

Expand All @@ -62,11 +64,12 @@ interface IDisputeContext {

export const DisputeContext: React.FC<IDisputeContext> = ({ disputeDetails, isRpcError = false }) => {
const errMsg = isRpcError ? RPC_ERROR : INVALID_DISPUTE_DATA_ERROR;

return (
<>
<StyledH1>{isUndefined(disputeDetails) ? <StyledSkeleton /> : (disputeDetails?.title ?? errMsg)}</StyledH1>
{!isUndefined(disputeDetails) ? (
<>
{disputeDetails?.question?.trim() || disputeDetails?.description?.trim() ? (
<QuestionAndDescriptionWrapper>
{disputeDetails?.question?.trim() ? (
<ReactMarkdownWrapper>
<ReactMarkdown>{disputeDetails.question}</ReactMarkdown>
Expand All @@ -77,7 +80,7 @@ export const DisputeContext: React.FC<IDisputeContext> = ({ disputeDetails, isRp
<ReactMarkdown>{disputeDetails.description}</ReactMarkdown>
</ReactMarkdownWrapper>
) : null}
</>
</QuestionAndDescriptionWrapper>
) : null}

{isUndefined(disputeDetails?.frontendUrl) ? null : (
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/FavoriteCases.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import DisputeView from "components/DisputeView";
import { SkeletonDisputeCard } from "components/StyledSkeleton";

const Container = styled.div`
margin-top: ${responsiveSize(48, 80)};
margin-top: ${responsiveSize(24, 48)};
`;

const Title = styled.h1`
Expand Down
18 changes: 18 additions & 0 deletions web/src/components/OverlayPortal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "react";
import ReactDOM from "react-dom";
import styled from "styled-components";

const PortalContainer = styled.div`
position: fixed;
top: 0;
left: 0;
z-index: 9999;
width: 100%;
height: 100%;
`;

const OverlayPortal: React.FC<{ children: React.ReactNode }> = ({ children }) => {
return ReactDOM.createPortal(<PortalContainer>{children}</PortalContainer>, document.body);
};

export default OverlayPortal;
1 change: 0 additions & 1 deletion web/src/components/Verdict/FinalDecision.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const VerdictContainer = styled.div`

const JuryDecisionTag = styled.small`
font-weight: 400;
line-height: 19px;
color: ${({ theme }) => theme.secondaryText};
`;

Expand Down
2 changes: 1 addition & 1 deletion web/src/layout/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ExternalLink } from "components/ExternalLink";
const Container = styled.div`
height: 122px;
width: 100%;
background-color: ${({ theme }) => theme.primaryPurple};
background-color: ${({ theme }) => (theme.name === "dark" ? theme.lightBlue : theme.primaryPurple)};
display: flex;
flex-direction: column;
justify-content: center;
Expand Down
24 changes: 9 additions & 15 deletions web/src/layout/Header/DesktopHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import { MiniguideHashesType } from "components/Popup/MiniGuides/MainStructureTe
import Onboarding from "components/Popup/MiniGuides/Onboarding";
import RankedVoting from "components/Popup/MiniGuides/RankedVoting";
import Staking from "components/Popup/MiniGuides/Staking";
import OverlayPortal from "components/OverlayPortal";
import { Overlay } from "components/Overlay";

import Logo from "./Logo";
import DappList from "./navbar/DappList";
Expand Down Expand Up @@ -86,16 +88,6 @@ const ConnectWalletContainer = styled.div<{ isConnected: boolean; isDefaultChain
}
`;

const PopupContainer = styled.div`
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
background-color: ${({ theme }) => theme.blackLowOpacity};
`;

const DesktopHeader: React.FC = () => {
const [isDappListOpen, toggleIsDappListOpen] = useToggle(false);
const [isHelpOpen, toggleIsHelpOpen] = useToggle(false);
Expand Down Expand Up @@ -178,11 +170,13 @@ const DesktopHeader: React.FC = () => {
</RightSide>
</Container>
{(isDappListOpen || isHelpOpen || isSettingsOpen) && (
<PopupContainer>
{isDappListOpen && <DappList {...{ toggleIsDappListOpen, isDappListOpen }} />}
{isHelpOpen && <Help {...{ toggleIsHelpOpen, isHelpOpen }} />}
{isSettingsOpen && <Settings {...{ toggleIsSettingsOpen, isSettingsOpen, initialTab }} />}
</PopupContainer>
<OverlayPortal>
<Overlay>
{isDappListOpen && <DappList {...{ toggleIsDappListOpen, isDappListOpen }} />}
{isHelpOpen && <Help {...{ toggleIsHelpOpen, isHelpOpen }} />}
{isSettingsOpen && <Settings {...{ toggleIsSettingsOpen, isSettingsOpen, initialTab }} />}
</Overlay>
</OverlayPortal>
)}
{isJurorLevelsMiniGuideOpen && <JurorLevels toggleMiniGuide={toggleIsJurorLevelsMiniGuideOpen} />}
{isAppealMiniGuideOpen && <Appeal toggleMiniGuide={toggleIsAppealMiniGuideOpen} />}
Expand Down
21 changes: 8 additions & 13 deletions web/src/layout/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,23 @@ import DesktopHeader from "./DesktopHeader";
import MobileHeader from "./MobileHeader";

const Container = styled.div`
display: flex;
flex-wrap: wrap;
position: sticky;
padding: 0 24px;
z-index: 10;
top: 0;
width: 100%;
background-color: ${({ theme }) => theme.primaryPurple};

display: flex;
flex-wrap: wrap;
`;

const HeaderContainer = styled.div`
width: 100%;
padding: 0 24px;
background-color: ${({ theme }) => (theme.name === "dark" ? `${theme.lightBlue}A6` : theme.primaryPurple)};
backdrop-filter: ${({ theme }) => (theme.name === "dark" ? "blur(12px)" : "none")};
-webkit-backdrop-filter: ${({ theme }) => (theme.name === "dark" ? "blur(12px)" : "none")}; // Safari support
`;

const Header: React.FC = () => {
return (
<Container>
<HeaderContainer>
<DesktopHeader />
<MobileHeader />
</HeaderContainer>
<DesktopHeader />
<MobileHeader />
</Container>
);
};
Expand Down
23 changes: 8 additions & 15 deletions web/src/layout/Header/navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useLockOverlayScroll } from "hooks/useLockOverlayScroll";

import ConnectWallet from "components/ConnectWallet";
import LightButton from "components/LightButton";
import OverlayPortal from "components/OverlayPortal";
import { Overlay } from "components/Overlay";

import { useOpenContext } from "../MobileHeader";
Expand Down Expand Up @@ -69,16 +70,6 @@ const DisconnectWalletButtonContainer = styled.div`
align-items: center;
`;

const PopupContainer = styled.div`
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
background-color: ${({ theme }) => theme.blackLowOpacity};
`;

export interface ISettings {
toggleIsSettingsOpen: () => void;
initialTab?: number;
Expand Down Expand Up @@ -131,11 +122,13 @@ const NavBar: React.FC = () => {
</StyledOverlay>
</Wrapper>
{(isDappListOpen || isHelpOpen || isSettingsOpen) && (
<PopupContainer>
{isDappListOpen && <DappList {...{ toggleIsDappListOpen }} />}
{isHelpOpen && <Help {...{ toggleIsHelpOpen }} />}
{isSettingsOpen && <Settings {...{ toggleIsSettingsOpen }} />}
</PopupContainer>
<OverlayPortal>
<Overlay>
{isDappListOpen && <DappList {...{ toggleIsDappListOpen }} />}
{isHelpOpen && <Help {...{ toggleIsHelpOpen }} />}
{isSettingsOpen && <Settings {...{ toggleIsSettingsOpen }} />}
</Overlay>
</OverlayPortal>
)}
</>
);
Expand Down
1 change: 1 addition & 0 deletions web/src/pages/Cases/CaseDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const StyledCard = styled(Card)`
width: 100%;
height: auto;
min-height: 100px;
border-radius: 0 0 3px 3px;
`;

const HeaderContainer = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/Dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Container = styled.div`
`;

const StyledCasesDisplay = styled(CasesDisplay)`
margin-top: ${responsiveSize(32, 48)};
margin-top: ${responsiveSize(24, 48)};

.title {
margin-bottom: ${responsiveSize(12, 24)};
Expand Down
1 change: 0 additions & 1 deletion web/src/pages/Home/CourtOverview/ExtraStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const StyledCard = styled.div`
`;

const StyledLabel = styled.label`
margin-top: 24px;
font-size: 14px;
font-weight: 600;
`;
Expand Down
2 changes: 1 addition & 1 deletion web/src/styles/global-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const GlobalStyle = createGlobalStyle`
body {
font-family: "Open Sans", sans-serif;
margin: 0px;
background-color: ${({ theme }) => theme.primaryPurple};
background-color: ${({ theme }) => theme.lightBlue};
}

html {
Expand Down
3 changes: 2 additions & 1 deletion web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"resolveJsonModule": true,
"target": "ES2020",
"lib": [
"ESNext.Array"
"ESNext.Array",
"dom"
],
"types": [
"vite/client",
Expand Down
Loading