diff --git a/web/src/components/CasesDisplay/Search.tsx b/web/src/components/CasesDisplay/Search.tsx index 2179df17f..390784c3c 100644 --- a/web/src/components/CasesDisplay/Search.tsx +++ b/web/src/components/CasesDisplay/Search.tsx @@ -90,6 +90,7 @@ const Search: React.FC = () => { )} = ({ name, address }) => { const resolvedAddress = addressFromENS ?? (address as `0x${string}`); return ( - + {isLoading ? : } {isLoading ? : }  diff --git a/web/src/components/DisputePreview/DisputeContext.tsx b/web/src/components/DisputePreview/DisputeContext.tsx index 6a93a81ce..12cbb673b 100644 --- a/web/src/components/DisputePreview/DisputeContext.tsx +++ b/web/src/components/DisputePreview/DisputeContext.tsx @@ -12,10 +12,11 @@ import { responsiveSize } from "styles/responsiveSize"; import ReactMarkdown from "components/ReactMarkdown"; import { StyledSkeleton } from "components/StyledSkeleton"; -import AliasDisplay from "./Alias"; import { Divider } from "../Divider"; import { ExternalLink } from "../ExternalLink"; +import AliasDisplay from "./Alias"; + const StyledH1 = styled.h1` margin: 0; word-wrap: break-word; @@ -75,16 +76,18 @@ export const DisputeContext: React.FC = ({ disputeDetails, isRp return ( <> - {isUndefined(disputeDetails) ? : (disputeDetails?.title ?? errMsg)} + + {isUndefined(disputeDetails) ? : (disputeDetails?.title ?? errMsg)} + {disputeDetails?.question?.trim() || disputeDetails?.description?.trim() ? (
{disputeDetails?.question?.trim() ? ( - + {disputeDetails.question} ) : null} {disputeDetails?.description?.trim() ? ( - + {disputeDetails.description} ) : null} @@ -100,7 +103,7 @@ export const DisputeContext: React.FC = ({ disputeDetails, isRp {isUndefined(disputeDetails) ? null : Voting Options} {disputeDetails?.answers?.map((answer: IAnswer, i: number) => ( - + {answer.title} {answer.description.trim() ? ` - ${answer.description}` : null} diff --git a/web/src/components/DisputeView/DisputeCardView.tsx b/web/src/components/DisputeView/DisputeCardView.tsx index 3cb231c5a..7cf554918 100644 --- a/web/src/components/DisputeView/DisputeCardView.tsx +++ b/web/src/components/DisputeView/DisputeCardView.tsx @@ -46,7 +46,7 @@ const StyledCaseCardTitleSkeleton = styled(StyledSkeleton)` const TruncatedTitle = ({ text, maxLength }) => { const truncatedText = text.length <= maxLength ? text : text.slice(0, maxLength) + "…"; - return {truncatedText}; + return {truncatedText}; }; interface IDisputeCardView { diff --git a/web/src/components/DisputeView/DisputeListView.tsx b/web/src/components/DisputeView/DisputeListView.tsx index d0c1c967a..5b00b7967 100644 --- a/web/src/components/DisputeView/DisputeListView.tsx +++ b/web/src/components/DisputeView/DisputeListView.tsx @@ -8,8 +8,8 @@ import { Card } from "@kleros/ui-components-library"; import { Periods } from "consts/periods"; -import { responsiveSize } from "styles/responsiveSize"; import { hoverShortTransitionTiming } from "styles/commonStyles"; +import { responsiveSize } from "styles/responsiveSize"; import DisputeInfo from "./DisputeInfo"; import PeriodBanner from "./PeriodBanner"; @@ -37,11 +37,12 @@ const TitleContainer = styled.div<{ isLabel?: boolean }>` width: ${({ isLabel }) => (isLabel ? responsiveSize(150, 340, 900) : "fit-content")}; h3 { margin: 0; + flex: 1; } `; const TruncatedTitle = ({ text, maxLength }) => { const truncatedText = text.length <= maxLength ? text : text.slice(0, maxLength) + "…"; - return

{truncatedText}

; + return

{truncatedText}

; }; interface IDisputeListView { title: string; diff --git a/web/src/components/EvidenceCard.tsx b/web/src/components/EvidenceCard.tsx index 0a328b29d..106daaa11 100644 --- a/web/src/components/EvidenceCard.tsx +++ b/web/src/components/EvidenceCard.tsx @@ -1,10 +1,6 @@ import React, { useMemo } from "react"; import styled, { css } from "styled-components"; -import { landscapeStyle } from "styles/landscapeStyle"; -import { responsiveSize } from "styles/responsiveSize"; -import { hoverShortTransitionTiming } from "styles/commonStyles"; - import Identicon from "react-identicons"; import ReactMarkdown from "react-markdown"; @@ -19,6 +15,10 @@ import { shortenAddress } from "utils/shortenAddress"; import { type Evidence } from "src/graphql/graphql"; +import { hoverShortTransitionTiming } from "styles/commonStyles"; +import { landscapeStyle } from "styles/landscapeStyle"; +import { responsiveSize } from "styles/responsiveSize"; + import { ExternalLink } from "./ExternalLink"; import { InternalLink } from "./InternalLink"; @@ -65,6 +65,7 @@ const Index = styled.p` color: ${({ theme }) => theme.secondaryText}; `; +const ReactMarkdownWrapper = styled.div``; const StyledReactMarkdown = styled(ReactMarkdown)` a { font-size: 16px; @@ -229,12 +230,18 @@ const EvidenceCard: React.FC = ({ return ( - + #{index}.

{name}

- {name && description ? {description} :

{evidence}

} + {name && description ? ( + + {description} + + ) : ( +

{evidence}

+ )}
diff --git a/web/src/components/Field.tsx b/web/src/components/Field.tsx index e9d5bff65..891ae8936 100644 --- a/web/src/components/Field.tsx +++ b/web/src/components/Field.tsx @@ -1,5 +1,6 @@ import React from "react"; import styled, { css } from "styled-components"; + import { landscapeStyle } from "styles/landscapeStyle"; import { InternalLink } from "./InternalLink"; @@ -99,7 +100,7 @@ const Field: React.FC = ({ className, }) => { return ( - + {(!displayAsList || isOverview || isJurorBalance) && } {link ? ( diff --git a/web/src/components/LabeledInput.tsx b/web/src/components/LabeledInput.tsx index dee85ebbc..5a8e1332e 100644 --- a/web/src/components/LabeledInput.tsx +++ b/web/src/components/LabeledInput.tsx @@ -30,7 +30,7 @@ const LabeledInput: React.FC = (props) => { return ( {!isUndefined(props.label) ? {props.label} : null} - + ); }; diff --git a/web/src/components/Verdict/Answer.tsx b/web/src/components/Verdict/Answer.tsx index b52e6759f..47d17b66b 100644 --- a/web/src/components/Verdict/Answer.tsx +++ b/web/src/components/Verdict/Answer.tsx @@ -22,7 +22,7 @@ const AnswerDisplay: React.FC = ({ answer, currentRuling }) => { return ( <> {answer ? ( - + {answer.title} {answer.description.trim() ? ` - ${answer.description}` : null} diff --git a/web/src/components/Verdict/FinalDecision.tsx b/web/src/components/Verdict/FinalDecision.tsx index 40729df8e..f2a25320d 100644 --- a/web/src/components/Verdict/FinalDecision.tsx +++ b/web/src/components/Verdict/FinalDecision.tsx @@ -7,9 +7,9 @@ import { useAccount } from "wagmi"; import ArrowIcon from "svgs/icons/arrow.svg"; +import { DEFAULT_CHAIN } from "consts/chains"; import { REFETCH_INTERVAL } from "consts/index"; import { Periods } from "consts/periods"; -import { DEFAULT_CHAIN } from "consts/chains"; import { useReadKlerosCoreCurrentRuling } from "hooks/contracts/generated"; import { usePopulatedDisputeData } from "hooks/queries/usePopulatedDisputeData"; import { useVotingHistory } from "hooks/queries/useVotingHistory"; @@ -21,11 +21,12 @@ import { useDisputeDetailsQuery } from "queries/useDisputeDetailsQuery"; import { landscapeStyle } from "styles/landscapeStyle"; -import RulingAndRewardsIndicators from "./RulingAndRewardsIndicators"; -import AnswerDisplay from "./Answer"; import { Divider } from "../Divider"; import { StyledArrowLink } from "../StyledArrowLink"; +import AnswerDisplay from "./Answer"; +import RulingAndRewardsIndicators from "./RulingAndRewardsIndicators"; + const Container = styled.div` width: 100%; `; @@ -36,11 +37,14 @@ const JuryContainer = styled.div` flex-wrap: wrap; align-items: center; gap: 5px 7px; - + flex: 1; h3 { line-height: 21px; margin-bottom: 0px; } + > div { + flex: 1; + } `; const VerdictContainer = styled.div` @@ -104,7 +108,7 @@ const FinalDecision: React.FC = ({ arbitrable }) => { if (isVotingPeriod && isHiddenVotes && commited && !hasVoted) return "Reveal your vote"; if (isVotingPeriod && !isHiddenVotes && !hasVoted) return "Cast your vote"; return "Check how the jury voted"; - }, [wasDrawn, hasVoted, isCommitPeriod, isVotingPeriod, commited, isHiddenVotes]); + }, [wasDrawn, hasVoted, isCommitPeriod, isVotingPeriod, commited, isHiddenVotes, isDisconnected]); return ( diff --git a/web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/FormContact.tsx b/web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/FormContact.tsx index 073f53300..e317b2770 100644 --- a/web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/FormContact.tsx +++ b/web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/FormContact.tsx @@ -2,6 +2,7 @@ import React, { Dispatch, SetStateAction, useMemo, useEffect } from "react"; import styled from "styled-components"; import { Field } from "@kleros/ui-components-library"; + import { isEmpty } from "src/utils"; const StyledLabel = styled.label` @@ -58,6 +59,7 @@ const FormContact: React.FC = ({ <> {contactLabel} = ({ search, setSearch, evidence setSearch(e.target.value)} value={search} diff --git a/web/src/pages/Cases/CaseDetails/Evidence/SubmitEvidenceModal.tsx b/web/src/pages/Cases/CaseDetails/Evidence/SubmitEvidenceModal.tsx index a577af8f2..d8056574a 100644 --- a/web/src/pages/Cases/CaseDetails/Evidence/SubmitEvidenceModal.tsx +++ b/web/src/pages/Cases/CaseDetails/Evidence/SubmitEvidenceModal.tsx @@ -4,15 +4,16 @@ import styled from "styled-components"; import Modal from "react-modal"; import { useWalletClient, usePublicClient, useConfig } from "wagmi"; +import { useAtlasProvider, Roles } from "@kleros/kleros-app"; import { Textarea, Button, FileUploader } from "@kleros/ui-components-library"; -import { useAtlasProvider, Roles } from "@kleros/kleros-app"; import { simulateEvidenceModuleSubmitEvidence } from "hooks/contracts/generated"; import { wrapWithToast, errorToast, infoToast, successToast } from "utils/wrapWithToast"; +import { isEmpty } from "src/utils"; + import EnsureAuth from "components/EnsureAuth"; import { EnsureChain } from "components/EnsureChain"; -import { isEmpty } from "src/utils"; const StyledModal = styled(Modal)` position: absolute; @@ -91,7 +92,12 @@ const SubmitEvidenceModal: React.FC<{ return (

Submit New Evidence

- setMessage(e.target.value)} placeholder="Your Arguments" /> + setMessage(e.target.value)} + placeholder="Your Arguments" + /> setFile(file)} />