Skip to content

Commit 903465f

Browse files
committed
[TOOL-3366] Dashboard: Contract Deployment UI improvements, Reduce Chakra Usage
1 parent 97c9ab7 commit 903465f

30 files changed

+338
-456
lines changed

apps/dashboard/src/@/components/blocks/FormFieldSetup.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { Label } from "@/components/ui/label";
22
import { ToolTipLabel } from "@/components/ui/tooltip";
33
import { AsteriskIcon, InfoIcon } from "lucide-react";
4+
import type React from "react";
45

56
export function FormFieldSetup(props: {
67
htmlFor?: string;
7-
label: string;
8+
label: React.ReactNode;
89
errorMessage: React.ReactNode | undefined;
910
children: React.ReactNode;
1011
tooltip?: React.ReactNode;

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/platform-fees.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ export const SettingsPlatformFees = ({
132132
<SolidityInput
133133
solidityType="address"
134134
formContext={form}
135-
variant="filled"
136135
{...form.register("platform_fee_recipient")}
137-
isDisabled={!address || sendAndConfirmTx.isPending}
136+
disabled={!address || sendAndConfirmTx.isPending}
138137
/>
139138
<FormErrorMessage>
140139
{
@@ -155,15 +154,14 @@ export const SettingsPlatformFees = ({
155154
>
156155
<FormLabel>Percentage</FormLabel>
157156
<BasisPointsInput
158-
variant="filled"
159157
value={form.watch("platform_fee_basis_points")}
160158
onChange={(value) =>
161159
form.setValue("platform_fee_basis_points", value, {
162160
shouldDirty: true,
163161
shouldTouch: true,
164162
})
165163
}
166-
isDisabled={sendAndConfirmTx.isPending}
164+
disabled={sendAndConfirmTx.isPending}
167165
/>
168166
<FormErrorMessage>
169167
{

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/primary-sale.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,9 @@ export const SettingsPrimarySale = ({
128128
>
129129
<FormLabel>Recipient Address</FormLabel>
130130
<SolidityInput
131-
isDisabled={mutation.isPending || !address}
131+
disabled={mutation.isPending || !address}
132132
solidityType="address"
133133
formContext={form}
134-
variant="filled"
135134
{...form.register("primary_sale_recipient")}
136135
/>
137136
<FormErrorMessage>

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/royalties.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,8 @@ export const SettingsRoyalties = ({
144144
<SolidityInput
145145
solidityType="address"
146146
formContext={form}
147-
variant="filled"
148147
{...form.register("fee_recipient")}
149-
isDisabled={!address}
148+
disabled={!address}
150149
/>
151150
<FormErrorMessage>
152151
{
@@ -165,7 +164,6 @@ export const SettingsRoyalties = ({
165164
>
166165
<FormLabel>Percentage</FormLabel>
167166
<BasisPointsInput
168-
variant="filled"
169167
value={form.watch("seller_fee_basis_points")}
170168
onChange={(value) =>
171169
form.setValue("seller_fee_basis_points", value, {

apps/dashboard/src/app/(dashboard)/published-contract/components/contract-actions-deploy.client.tsx

Lines changed: 0 additions & 41 deletions
This file was deleted.

apps/dashboard/src/app/(dashboard)/published-contract/components/contract-actions-published.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function PublishedActions(props: {
2727
>
2828
Share
2929
</Button>
30-
<Button asChild variant="primary" className="gap-2">
30+
<Button asChild className="gap-2">
3131
<Link
3232
href={`/${props.publisher}/${props.contract_id}${props.version ? `/${props.version}` : ""}/deploy${stringifiedSearchParams ? `?${stringifiedSearchParams}` : ""}`}
3333
>

apps/dashboard/src/app/(dashboard)/published-contract/components/contract-info.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function DeployContractInfo(props: {
1818
<div className="flex flex-col gap-2">
1919
<div className="flex flex-1 items-center gap-4">
2020
{contractImageLink && (
21-
<div className="hidden shrink-0 items-center justify-center rounded-xl border border-border p-2 md:flex">
21+
<div className="hidden shrink-0 items-center justify-center rounded-xl border border-border bg-card p-2 md:flex">
2222
{/*eslint-disable-next-line @next/next/no-img-element*/}
2323
<img className="size-12" alt={props.name} src={contractImageLink} />
2424
</div>

apps/dashboard/src/app/(dashboard)/published-contract/components/publish-based-deploy.tsx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Separator } from "@/components/ui/separator";
21
import { getThirdwebClient } from "@/constants/thirdweb.server";
32
import {
43
fetchPublishedContractVersion,
@@ -7,7 +6,6 @@ import {
76
import { isAddress } from "thirdweb";
87
import { fetchDeployMetadata } from "thirdweb/contract";
98
import { resolveAddress } from "thirdweb/extensions/ens";
10-
import { DeployActions } from "./contract-actions-deploy.client";
119
import { DeployContractHeader } from "./contract-header";
1210
import { DeployFormForUri } from "./uri-based-deploy";
1311

@@ -73,23 +71,17 @@ export async function DeployFormForPublishInfo(props: PublishBasedDeployProps) {
7371
]);
7472

7573
return (
76-
<>
74+
<div className="mx-auto flex w-full max-w-[1000px] flex-col gap-8 pb-20">
7775
<DeployContractHeader
7876
{...props}
7977
allVersions={publishedContractVersions}
8078
activeVersion={publishedContract}
81-
>
82-
<DeployActions
83-
{...props}
84-
displayName={publishedContract.displayName || publishedContract.name}
85-
/>
86-
</DeployContractHeader>
87-
<Separator />
79+
/>
8880
<DeployFormForUri
8981
contractMetadata={contractMetadata}
9082
modules={fetchedModules.filter((m) => m !== null)}
9183
pathname={`/${props.publisher}/${props.contract_id}${props.version ? `/${props.version}` : ""}/deploy`}
9284
/>
93-
</>
85+
</div>
9486
);
9587
}

apps/dashboard/src/app/(dashboard)/published-contract/components/version-selector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function DeployContractVersionSelector({
5656
}
5757
}}
5858
>
59-
<SelectTrigger className="min-w-[180px] bg-transparent hover:bg-accent">
59+
<SelectTrigger className="min-w-[180px] bg-card hover:bg-accent">
6060
<SelectValue />
6161
</SelectTrigger>
6262
<SelectContent>

apps/dashboard/src/app/(landing)/ThemeProvider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ function TailwindTheme(props: { children: React.ReactNode }) {
8686
disableTransitionOnChange
8787
enableSystem={false}
8888
defaultTheme="dark"
89+
enableColorScheme={true}
8990
>
9091
{props.children}
9192
</ThemeProvider>

0 commit comments

Comments
 (0)