From 166073b35e29b28cc60cf430c68052a2a67d7808 Mon Sep 17 00:00:00 2001 From: "Alexandru G." Date: Tue, 9 Jul 2024 14:02:03 +0300 Subject: [PATCH 1/3] Update Color Contrast --- src/components/AssetInput.tsx | 6 +++-- src/components/Footer.tsx | 22 ++++++++-------- src/components/GovnftAvatar.tsx | 12 ++++----- src/components/GovnftHeader.tsx | 2 +- src/components/GovnftNavbar.tsx | 11 ++++---- src/components/GovnftStatus.tsx | 6 ++--- src/components/Profile/CustomRpc.tsx | 26 +++++++------------ src/components/Profile/index.tsx | 4 +-- src/main.css | 2 +- src/pages/Create/components/Creator.tsx | 2 +- src/pages/Dashboard/components/Govnft.tsx | 12 ++++----- src/pages/Dashboard/components/Govnfts.tsx | 16 ++++++------ src/pages/Delegate/components/DelegateNft.tsx | 4 +-- src/pages/Govnft/components/Overview.tsx | 8 +++--- src/pages/Split/components/Splitter.tsx | 2 +- 15 files changed, 64 insertions(+), 71 deletions(-) diff --git a/src/components/AssetInput.tsx b/src/components/AssetInput.tsx index dc250232..f9b94757 100644 --- a/src/components/AssetInput.tsx +++ b/src/components/AssetInput.tsx @@ -64,8 +64,10 @@ export default function AssetInput({ {asset?.value && ( setFromBalance()}> - Available{" "} - +
+
Available
+ +
)} diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 0fb9a7e2..8b41ba40 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -6,20 +6,20 @@ import ExplorerLink from "./ExplorerLink"; export default function Footer() { return (
-
- {/*@ts-ignore*/} -
{__APP_VERSION__}
-
·
+
+ {/* @ts-ignore */} +
{__APP_VERSION__}
+
·
Latest Deployment Security Audit @@ -27,22 +27,22 @@ export default function Footer() { GitHub -
·
+
·
{/* TODO: Add docs */} - + Documentation
- A public good for{" "} + A public good for{" "} Optimism - OPTIMISM + OPTIMISM
diff --git a/src/components/GovnftAvatar.tsx b/src/components/GovnftAvatar.tsx index 9485e0af..7a87d41d 100644 --- a/src/components/GovnftAvatar.tsx +++ b/src/components/GovnftAvatar.tsx @@ -23,11 +23,11 @@ export default function GovnftAvatar({ return ( -
-
- +
+
+
-
+
GovNFT #{String(nft.id)} @@ -39,8 +39,8 @@ export default function GovnftAvatar({
-
- : +
+ Vesting :
diff --git a/src/components/GovnftHeader.tsx b/src/components/GovnftHeader.tsx index 2fddcf22..d0e363ad 100644 --- a/src/components/GovnftHeader.tsx +++ b/src/components/GovnftHeader.tsx @@ -21,7 +21,7 @@ export default function GovnftHeader({ return ( <> -
+
diff --git a/src/components/GovnftNavbar.tsx b/src/components/GovnftNavbar.tsx index 39ed73e3..6eb9f9f4 100644 --- a/src/components/GovnftNavbar.tsx +++ b/src/components/GovnftNavbar.tsx @@ -28,14 +28,13 @@ export default function GovnftNavbar({ return ( <> {Object.entries(navs).map(([nav, title]) => ( - -
+ } hover:bg-gray-50 hover:dark:bg-gray-700/20 first:rounded-bl-lg`} + >
{title}
-
))} diff --git a/src/components/GovnftStatus.tsx b/src/components/GovnftStatus.tsx index 45b5c80b..70712570 100644 --- a/src/components/GovnftStatus.tsx +++ b/src/components/GovnftStatus.tsx @@ -17,7 +17,7 @@ export default function GovnftStatus({
Scheduled
-
+
@@ -31,7 +31,7 @@ export default function GovnftStatus({
Vesting
-
+
@@ -45,7 +45,7 @@ export default function GovnftStatus({
Vested
-
+
diff --git a/src/components/Profile/CustomRpc.tsx b/src/components/Profile/CustomRpc.tsx index 7ee03932..23c358bb 100644 --- a/src/components/Profile/CustomRpc.tsx +++ b/src/components/Profile/CustomRpc.tsx @@ -1,9 +1,8 @@ -import { TextInput } from "flowbite-react"; +import { Button, TextInput } from "flowbite-react"; import { PlugZap as PlugZapIcon } from "lucide-react"; import { useState } from "react"; import useLocalStorageState from "use-local-storage-state"; -import ActionLink from "#/components/ActionLink"; import { CUSTOM_RPC_URI_KEY } from "#/rpc"; export default function CustomRpc() { @@ -15,36 +14,29 @@ export default function CustomRpc() { return (
-
-
-
- To communicate with the network with your personal RPC, add it here and reload the page. This is saved only - in your browser, locally. -
- -
+
+
To communicate with the network with your personal RPC, add it here and reload the page. This is saved only + in your browser, locally.
+
e.target.select()} onChange={(e) => setRpc(e.target.value)} placeholder="RPC URL ..." + className="grow" /> - { setCustomRpc(rpc); window.location.reload(); }} > Save - +
- -
Leave blank if you want to use the RPC provided by us.
-
+
Leave blank if you want to use the RPC provided by us.
); diff --git a/src/components/Profile/index.tsx b/src/components/Profile/index.tsx index 8a599fd8..51bb7560 100644 --- a/src/components/Profile/index.tsx +++ b/src/components/Profile/index.tsx @@ -69,8 +69,8 @@ export default function Profile() {
-
- Review Minted GovNFTs +
+ Minted GovNFTs
diff --git a/src/main.css b/src/main.css index ee733e32..51b9fa86 100644 --- a/src/main.css +++ b/src/main.css @@ -40,7 +40,7 @@ @layer base { body { - @apply text-black dark:text-white bg-gray-50 dark:bg-gray-900 min-h-screen; + @apply text-black dark:text-white bg-gray-100 dark:bg-gray-900 min-h-screen; } } diff --git a/src/pages/Create/components/Creator.tsx b/src/pages/Create/components/Creator.tsx index f92dd329..b053d50a 100644 --- a/src/pages/Create/components/Creator.tsx +++ b/src/pages/Create/components/Creator.tsx @@ -64,7 +64,7 @@ export default function Creator() {
Recipient Address
setToAddress(accountAddress)} > Use Current Wallet diff --git a/src/pages/Dashboard/components/Govnft.tsx b/src/pages/Dashboard/components/Govnft.tsx index f0a4c0a2..8929d97f 100644 --- a/src/pages/Dashboard/components/Govnft.tsx +++ b/src/pages/Dashboard/components/Govnft.tsx @@ -13,7 +13,7 @@ export default function Govnft({ nft: GovNft; }) { return ( -
+
@@ -26,21 +26,21 @@ export default function Govnft({
-
Locked
+
Locked
-
+
claimed
-
Claimable
+
Claimable
-
+
{nft.claimable === 0n && ( Review diff --git a/src/pages/Dashboard/components/Govnfts.tsx b/src/pages/Dashboard/components/Govnfts.tsx index b864c4aa..1f6dcfe8 100644 --- a/src/pages/Dashboard/components/Govnfts.tsx +++ b/src/pages/Dashboard/components/Govnfts.tsx @@ -8,19 +8,19 @@ export default function Govnfts({ }: { nfts: GovNft[]; }) { - if (!nfts.length) { + if (nfts.length) { return (
-
No NFTs were found.
-
- - Create NFTs +
The dashboard currently shows no NFTs minted. You can create your first NFT to get started. Once minted, you can find all your NFTs under settings.
+
+ + Create - - View Created NFTs + + Minted NFTs
@@ -30,7 +30,7 @@ export default function Govnfts({ return (
Vesting NFTs
-
+
{nfts.map((nft) => ( ))} diff --git a/src/pages/Delegate/components/DelegateNft.tsx b/src/pages/Delegate/components/DelegateNft.tsx index 6845a6e4..13f1a7da 100644 --- a/src/pages/Delegate/components/DelegateNft.tsx +++ b/src/pages/Delegate/components/DelegateNft.tsx @@ -38,14 +38,14 @@ export default function DelegateNft({ nft }: { nft: GovNft }) {
Delegate Address
setToAddress(accountAddress)} > Use Current Wallet
setToAddress(e.target.value as Address)} /> -
+
View Delegates diff --git a/src/pages/Govnft/components/Overview.tsx b/src/pages/Govnft/components/Overview.tsx index 84e13b2c..f81a5ad5 100644 --- a/src/pages/Govnft/components/Overview.tsx +++ b/src/pages/Govnft/components/Overview.tsx @@ -20,21 +20,21 @@ export default function Overview({
-
GovNFT Address:
+
GovNFT Address:
-
Token:
+
Token:
-
Owner:
+
Owner:
@@ -80,7 +80,7 @@ export default function Overview({
) : ( -
No delegation has been set.
+
No delegation has been set.
)} {nft.isOwner && (
Recipient Address
setToAddress(accountAddress)} > Use Current Wallet From 4836b19abfb097c56b2d125d1ea2ca9f41edff19 Mon Sep 17 00:00:00 2001 From: "Alexandru G." Date: Tue, 9 Jul 2024 14:07:52 +0300 Subject: [PATCH 2/3] Run linter --- src/components/GovnftNavbar.tsx | 11 +++--- src/components/Profile/CustomRpc.tsx | 46 +++++++++++----------- src/pages/Dashboard/components/Govnft.tsx | 5 +-- src/pages/Dashboard/components/Govnfts.tsx | 5 ++- 4 files changed, 35 insertions(+), 32 deletions(-) diff --git a/src/components/GovnftNavbar.tsx b/src/components/GovnftNavbar.tsx index 6eb9f9f4..67a8af1f 100644 --- a/src/components/GovnftNavbar.tsx +++ b/src/components/GovnftNavbar.tsx @@ -28,13 +28,14 @@ export default function GovnftNavbar({ return ( <> {Object.entries(navs).map(([nav, title]) => ( - -
{title}
+
{title}
))} diff --git a/src/components/Profile/CustomRpc.tsx b/src/components/Profile/CustomRpc.tsx index 23c358bb..2fb455bf 100644 --- a/src/components/Profile/CustomRpc.tsx +++ b/src/components/Profile/CustomRpc.tsx @@ -15,28 +15,30 @@ export default function CustomRpc() { return (
-
To communicate with the network with your personal RPC, add it here and reload the page. This is saved only - in your browser, locally.
-
- e.target.select()} - onChange={(e) => setRpc(e.target.value)} - placeholder="RPC URL ..." - className="grow" - /> - -
-
Leave blank if you want to use the RPC provided by us.
+
+ To communicate with the network with your personal RPC, add it here and reload the page. This is saved only in + your browser, locally. +
+
+ e.target.select()} + onChange={(e) => setRpc(e.target.value)} + placeholder="RPC URL ..." + className="grow" + /> + +
+
Leave blank if you want to use the RPC provided by us.
); diff --git a/src/pages/Dashboard/components/Govnft.tsx b/src/pages/Dashboard/components/Govnft.tsx index 8929d97f..45a783bb 100644 --- a/src/pages/Dashboard/components/Govnft.tsx +++ b/src/pages/Dashboard/components/Govnft.tsx @@ -38,10 +38,7 @@ export default function Govnft({
{nft.claimable === 0n && ( - + Review )} diff --git a/src/pages/Dashboard/components/Govnfts.tsx b/src/pages/Dashboard/components/Govnfts.tsx index 1f6dcfe8..cfea67cd 100644 --- a/src/pages/Dashboard/components/Govnfts.tsx +++ b/src/pages/Dashboard/components/Govnfts.tsx @@ -14,7 +14,10 @@ export default function Govnfts({
-
The dashboard currently shows no NFTs minted. You can create your first NFT to get started. Once minted, you can find all your NFTs under settings.
+
+ The dashboard currently shows no NFTs minted. You can create your first NFT to get started. Once minted, you + can find all your NFTs under settings. +
Create From 395a7edf57707f7d32262490496fd513adfe930f Mon Sep 17 00:00:00 2001 From: "Alexandru G." Date: Tue, 9 Jul 2024 14:10:06 +0300 Subject: [PATCH 3/3] Fix regression --- src/pages/Dashboard/components/Govnfts.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Dashboard/components/Govnfts.tsx b/src/pages/Dashboard/components/Govnfts.tsx index cfea67cd..ae5381df 100644 --- a/src/pages/Dashboard/components/Govnfts.tsx +++ b/src/pages/Dashboard/components/Govnfts.tsx @@ -8,7 +8,7 @@ export default function Govnfts({ }: { nfts: GovNft[]; }) { - if (nfts.length) { + if (!nfts.length) { return (