Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9641ce5
refactor: scaffold to migrate from styled-components to Tailwind CSS
kyrers Dec 16, 2025
a3f01fd
chore: add clsx and tailwind-merge dependencies
kyrers Dec 16, 2025
75568be
refactor: migrate Header and related components
kyrers Dec 16, 2025
5e24ad3
refactor: migrate Footer component
kyrers Dec 17, 2025
0034dfd
refactor: begin "new-transaction" route migration (WIP)
kyrers Dec 17, 2025
d810250
refactor: minor fix to connect wallet message display in NewTransacti…
kyrers Dec 17, 2025
01d2991
refactor: migrate NewTransaction TypeOfEscrow and related components
kyrers Dec 18, 2025
baa32a3
refactor: migrate NewTransaction Title component
kyrers Dec 18, 2025
bc774cb
refactor: migrate NewTransaction Deliverable component (WIP)
kyrers Dec 18, 2025
474c3e0
refactor: migrate and fix markdown editor
kyrers Dec 19, 2025
93de7f8
fix: do not add token if it already exists to prevent infinite loop
kyrers Dec 30, 2025
a1b92d4
refactor: migrate NewTransaction Payment and related components
kyrers Dec 30, 2025
6a766a8
refactor: minor style improvements
kyrers Dec 30, 2025
929cb90
fix: remove maxLength from Buyer and Destination Address components …
kyrers Dec 30, 2025
a4a65f3
refactor: migrate NewTransaction Deadline component
kyrers Jan 1, 2026
e67b5dc
refactor: migrate NewTransaction Notifications and related components
kyrers Jan 1, 2026
d52b6ed
refactor: migrate NewTransaction Preview and related components
kyrers Jan 2, 2026
d71f096
fix: replace custom 50% border radius with equivalent tailwind class
kyrers Jan 6, 2026
dc6d112
fix: properly handle undefined status in StatusBanner component
kyrers Jan 6, 2026
b684184
refactor: migrate MyTransactions TransactionFetcher and related compo…
kyrers Jan 6, 2026
4522f31
refactor: migrate MyTransaction TransactionDetails and related compon…
kyrers Jan 7, 2026
0f893c5
fix: minor prop fixes in two separate NumberField components
kyrers Jan 7, 2026
a54218f
refactor: enhance layout and styling in Description component for bet…
kyrers Jan 8, 2026
635af5e
feat: implement formatting utility for NumberField components to hand…
kyrers Jan 8, 2026
3b6fd25
fix: prevent ProposeSettlementModal from losing state due to parent s…
kyrers Jan 8, 2026
3fa01da
refactor: migrate AttrachmentDisplay and related components
kyrers Jan 8, 2026
d51b4d9
refactor: replace NumberField with BigNumberField where handling amounts
kyrers Jan 9, 2026
8178db5
refactor: migrate minor dispute related components
kyrers Jan 9, 2026
dbf59a3
fix: improve TimeOutButton logic based on party seeing the transaction
kyrers Jan 9, 2026
8c757ab
refactor: migrate Settings and related components
kyrers Jan 9, 2026
8e67152
chore: remove unused code
kyrers Jan 9, 2026
9610230
refactor: simplify message rendering in EnsureAuth component
kyrers Jan 10, 2026
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
9 changes: 1 addition & 8 deletions web/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import {} from "styled-components";
import { lightTheme } from "./src/styles/themes";

declare global {
module "*.svg" {
const content: React.FC<React.SVGAttributes<SVGElement>>;
Expand All @@ -12,8 +9,4 @@ declare global {
}
}

declare module "styled-components" {
type Theme = typeof lightTheme;
//eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface DefaultTheme extends Theme {}
}
export {};
8 changes: 5 additions & 3 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"@types/react": "^18.2.59",
"@types/react-dom": "^18.2.18",
"@types/react-modal": "^3.16.3",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@typescript-eslint/utils": "^5.62.0",
Expand All @@ -70,17 +69,19 @@
"dependencies": {
"@cyntler/react-doc-viewer": "^1.16.3",
"@kleros/kleros-app": "^2.1.0",
"@kleros/ui-components-library": "^2.19.0",
"@kleros/ui-components-library": "^3.6.0",
"@mdxeditor/editor": "^3.45.0",
"@reown/appkit": "^1.6.6",
"@reown/appkit-adapter-wagmi": "^1.6.6",
"@sentry/react": "^7.93.0",
"@sentry/tracing": "^7.93.0",
"@tailwindcss/vite": "^4.1.17",
"@tanstack/react-query": "^5.66.0",
"@yornaath/batshit": "^0.9.0",
"alchemy-sdk": "^3.3.1",
"chart.js": "^3.9.1",
"chartjs-adapter-moment": "^1.0.1",
"clsx": "^2.1.1",
"core-js": "^3.35.0",
"graphql": "^16.9.0",
"graphql-request": "^7.1.2",
Expand All @@ -103,8 +104,9 @@
"rehype-raw": "^6.1.1",
"rehype-sanitize": "^5.0.1",
"remark-gfm": "^3.0.1",
"styled-components": "^5.3.11",
"subgraph-status": "^1.2.4",
"tailwind-merge": "^3.4.0",
"tailwindcss": "^4.1.17",
"viem": "^2.27.2",
"wagmi": "^2.14.16"
}
Expand Down
8 changes: 5 additions & 3 deletions web/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import { Navigate, Route } from "react-router-dom";
import { SentryRoutes } from "./utils/sentry";
import "react-loading-skeleton/dist/skeleton.css";
import "react-toastify/dist/ReactToastify.css";
import "overlayscrollbars/styles/overlayscrollbars.css";
import "./global.css";
import Web3Provider from "context/Web3Provider";
import IsListProvider from "context/IsListProvider";
import QueryClientProvider from "context/QueryClientProvider";
import StyledComponentsProvider from "context/StyledComponentsProvider";
import ThemeProvider from "context/ThemeProvider";
import GraphqlBatcherProvider from "context/GraphqlBatcher";
import Layout from "layout/index";
import NewTransaction from "./pages/NewTransaction";
Expand All @@ -18,7 +20,7 @@ import Settings from "./pages/Settings";

const App: React.FC = () => {
return (
<StyledComponentsProvider>
<ThemeProvider>
<Web3Provider>
<QueryClientProvider>
<AtlasProvider>
Expand All @@ -41,7 +43,7 @@ const App: React.FC = () => {
</AtlasProvider>
</QueryClientProvider>
</Web3Provider>
</StyledComponentsProvider>
</ThemeProvider>
);
};

Expand Down
142 changes: 28 additions & 114 deletions web/src/components/ConnectWallet/AccountDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from "react";
import styled, { css } from "styled-components";

import Identicon from "react-identicons";
import { isAddress } from "viem";
Expand All @@ -9,111 +8,7 @@ import { useAccount, useChainId, useEnsAvatar, useEnsName } from "wagmi";
import { getChain } from "consts/chains";
import { shortenAddress } from "utils/shortenAddress";

import { landscapeStyle } from "styles/landscapeStyle";

const Container = styled.div`
display: flex;
flex-direction: column;
justify-content: space-between;
height: auto;
align-items: flex-start;
gap: 8px;
align-items: center;
background-color: ${({ theme }) => theme.whiteBackground};
padding: 0px;
cursor: pointer;

&:hover {
label {
color: ${({ theme }) => theme.white} !important;
transition: color 0.2s;
}
}

${landscapeStyle(
() => css`
background-color: ${({ theme }) => theme.whiteLowOpacitySubtle};
&:hover {
transition: background-color 0.1s;
background-color: ${({ theme }) => theme.whiteLowOpacityStrong};
}
flex-direction: row;
align-content: center;
border-radius: 300px;
gap: 0px;
padding: 0 12px;
`
)}
`;

const AccountContainer = styled.div`
min-height: 32px;
display: flex;
align-items: center;
width: fit-content;
gap: 8px;

> label {
font-size: 16px;
font-weight: 600;
}

${landscapeStyle(
() => css`
gap: 12px;
> label {
color: ${({ theme }) => theme.white}CC !important;
font-weight: 400;
font-size: 14px;
}
`
)}
`;

const ChainConnectionContainer = styled.div`
display: flex;
width: fit-content;
min-height: 32px;
align-items: center;
padding-left: 0px;
> label {
color: ${({ theme }) => theme.success};
font-size: 16px;

font-weight: 500;
}

:before {
content: "";
width: 8px;
height: 8px;
margin: 0px 13px 0px 3px;
border-radius: 50%;
background-color: ${({ theme }) => theme.success};
}

${landscapeStyle(
() => css`
display: none;
`
)}
`;

const StyledIdenticon = styled(Identicon)<{ size: `${number}` }>`
align-items: center;
svg {
width: ${({ size }) => size + "px"};
height: ${({ size }) => size + "px"};
}
`;

const StyledAvatar = styled.img<{ size: `${number}` }>`
align-items: center;
object-fit: cover;
border-radius: 50%;
width: ${({ size }) => size + "px"};
height: ${({ size }) => size + "px"};
`;
import clsx from "clsx";

interface IIdenticonOrAvatar {
size?: `${number}`;
Expand All @@ -134,9 +29,9 @@ export const IdenticonOrAvatar: React.FC<IIdenticonOrAvatar> = ({ size = "16", a
});

return avatar ? (
<StyledAvatar src={avatar} alt="avatar" size={size} />
<img className="object-cover rounded-full" src={avatar} alt="avatar" width={size} height={size} />
) : (
<StyledIdenticon size={size} string={address} />
<Identicon size={size} string={address} />
);
};

Expand Down Expand Up @@ -164,15 +59,34 @@ export const ChainDisplay: React.FC = () => {

const AccountDisplay: React.FC = () => {
return (
<Container>
<AccountContainer>
<div
className={clsx(
"flex flex-col justify-between items-center gap-2 h-auto p-0",
"lg:flex-row lg:content-center lg:rounded-[300px] lg:gap-0 lg:py-0 lg:px-3",
"cursor-pointer bg-klerosUIComponentsWhiteBackground lg:bg-white-low-opacity-subtle",
"lg:hover:bg-white-low-opacity-strong lg:hover:transition-[background-color_0.1s]",
"hover:[&_label]:text-white hover:[&_label]:transition-colors hover:[&_label]:duration-200"
)}
>
<div
className={clsx(
"flex items-center w-fit min-h-8 gap-2 lg:gap-3",
"[&>label]:text-base [&>label]:font-semibold lg:[&>label]:text-sm lg:[&>label]:font-normal"
)}
>
<IdenticonOrAvatar size="32" />
<AddressOrName />
</AccountContainer>
<ChainConnectionContainer>
</div>
<div
className={clsx(
"flex w-fit min-h-8 items-center pl-0 lg:hidden",
"[&>label]:text-klerosUIComponentsSuccess [&>label]:text-base [&>label]:font-medium",
"before:content-[''] before:w-2 before:h-2 before:rounded-full before:bg-klerosUIComponentsSuccess before:my-0 before:mr-[13px] before:ml-[3px]"
)}
>
<ChainDisplay />
</ChainConnectionContainer>
</Container>
</div>
</div>
);
};

Expand Down
8 changes: 4 additions & 4 deletions web/src/components/ConnectWallet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ export const SwitchChainButton: React.FC<{ className?: string }> = ({ className
<Button
{...{ className }}
isLoading={isPending}
disabled={isPending}
isDisabled={isPending}
text={`Switch to ${SUPPORTED_CHAINS[DEFAULT_CHAIN].name}`}
onClick={handleSwitch}
onPress={handleSwitch}
/>
);
};
Expand All @@ -35,10 +35,10 @@ const ConnectButton: React.FC<{ className?: string }> = ({ className }) => {
return (
<Button
{...{ className }}
disabled={isOpen}
isDisabled={isOpen}
small
text={"Connect"}
onClick={async () => open({ view: "Connect" })}
onPress={async () => open({ view: "Connect" })}
/>
);
};
Expand Down
24 changes: 5 additions & 19 deletions web/src/components/EnsureAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,9 @@ import { useAccount } from "wagmi";

import { Button } from "@kleros/ui-components-library";

import styled from "styled-components";
import { useAtlasProvider } from "@kleros/kleros-app";
import { errorToast, infoToast, successToast } from "utils/wrapWithToast";

const Container = styled.div`
display: flex;
flex-direction: column;
gap: 16px;
justify-content: center;
align-items: center;
`;

const StyledInfo = styled.p`
margin: 0;
padding: 0;
`;

interface IEnsureAuth {
children: React.ReactElement;
message?: string;
Expand All @@ -45,15 +31,15 @@ export const EnsureAuth: React.FC<IEnsureAuth> = ({ children, message, buttonTex
return isVerified ? (
children
) : (
<Container>
{message ? <StyledInfo>{message}</StyledInfo> : null}
<div className="flex flex-col gap-4 justify-center items-center">
{message ? <p>{message}</p> : null}
<Button
text={buttonText ?? "Sign In"}
onClick={handleClick}
disabled={isSigningIn || !address}
onPress={handleClick}
isDisabled={isSigningIn || !address}
isLoading={isSigningIn}
{...{ className }}
/>
</Container>
</div>
);
};
9 changes: 0 additions & 9 deletions web/src/components/ExternalLink.tsx

This file was deleted.

Loading