From 7310a71381e7b302b68978b222fd8ce5d6b5bee8 Mon Sep 17 00:00:00 2001 From: Dima Rifai <dima.rifai@gmail.com> Date: Fri, 7 Mar 2025 21:13:11 +0200 Subject: [PATCH] Issue #480 - Make edges round --- components/DataExport.tsx | 2 +- components/NoResult.tsx | 2 +- components/Witnesses/VotersDialog.tsx | 2 +- components/account/AccountPagination.tsx | 2 +- components/account/tabs/AccountOperationViewTabs.tsx | 2 +- .../tabs/comments/AccountCommentPermlinkResultTable.tsx | 2 +- .../tabs/comments/AccountCommentPermlinkSearchResults.tsx | 6 +++--- .../account/tabs/interactions/InteractionsTabResult.tsx | 2 +- components/balanceHistory/BalanceHistoryTable.tsx | 2 +- components/home/searches/CommentPermlinkResultTable.tsx | 3 +-- .../home/searches/searchesResults/AccountSearchResults.tsx | 2 +- .../searchesResults/CommentPermlinkSearchResults.tsx | 2 +- .../home/searches/searchesResults/CommentSearchResults.tsx | 2 +- components/ui/CopyButton.tsx | 1 - components/ui/dialog.tsx | 2 +- pages/block/[blockId].tsx | 2 +- 16 files changed, 17 insertions(+), 19 deletions(-) diff --git a/components/DataExport.tsx b/components/DataExport.tsx index 867173c6..e41b91aa 100644 --- a/components/DataExport.tsx +++ b/components/DataExport.tsx @@ -140,7 +140,7 @@ const DataExport: React.FC<DataExportProps> = ({ <Button variant="outline" className={cn( - " border-gray-300 text-gray-700 shadow-sm hover:bg-explorer-extra-light-gray flex items-center space-x-1 max-w-fit h-8 p-2", + " border-gray-300 shadow-sm hover:bg-explorer-extra-light-gray flex items-center space-x-1 max-w-fit h-8 p-2 rounded", className )} disabled={isExporting || data.length === 0} //Disable if exporting or no data diff --git a/components/NoResult.tsx b/components/NoResult.tsx index 36eed738..df46e582 100644 --- a/components/NoResult.tsx +++ b/components/NoResult.tsx @@ -13,7 +13,7 @@ const NoResult: React.FC<NoResultProps> = ({ }) => { return ( - <div className="mt-2 flex flex-col items-center justify-center bg-theme p-6 w-full text-center space-y-3"> + <div className="mt-2 flex flex-col items-center justify-center bg-theme p-6 w-full text-center space-y-3 rounded"> <div className="flex items-center justify-center w-12 h-12 bg-explorer-bg-start rounded-full"> <Search className="w-6 h-6" /> </div> diff --git a/components/Witnesses/VotersDialog.tsx b/components/Witnesses/VotersDialog.tsx index 0a907b8b..7ffe209a 100644 --- a/components/Witnesses/VotersDialog.tsx +++ b/components/Witnesses/VotersDialog.tsx @@ -171,7 +171,7 @@ const VotersDialog: React.FC<VotersDialogProps> = ({ }} pageSize={config.standardPaginationSize} totalCount={witnessVoters.total_operations} - className="text-black dark:text-white" + className="rounded" isMirrored={false} /> {witnessVoters?.voters?.length === 0 && !isWitnessVotersLoading ? ( diff --git a/components/account/AccountPagination.tsx b/components/account/AccountPagination.tsx index d2295a60..c9ce6bcc 100644 --- a/components/account/AccountPagination.tsx +++ b/components/account/AccountPagination.tsx @@ -22,7 +22,7 @@ const AccountPagination: React.FC<AccountPaginationProps> = ({ <div className="flex-col w-full"> {operationsCount && Math.ceil(operationsCount / config.standardPaginationSize) > 1 && ( <div - className="flex w-full justify-center items-center flex-wrap bg-theme" + className="flex w-full justify-center items-center flex-wrap bg-theme rounded" data-testid="account-top-bar" > <div className="flex items-center justify-center w-full md:ml-auto md:w-3/4"> diff --git a/components/account/tabs/AccountOperationViewTabs.tsx b/components/account/tabs/AccountOperationViewTabs.tsx index 3f22d93b..d3832bcb 100644 --- a/components/account/tabs/AccountOperationViewTabs.tsx +++ b/components/account/tabs/AccountOperationViewTabs.tsx @@ -64,7 +64,7 @@ const AccountOperationViewTabs: React.FC<AccountOperationViewTabs> = ({ onValueChange={handleTabChange} className="flex-col w-full" > - <TabsList className="flex w-full justify-between"> + <TabsList className="flex w-full justify-between p-0"> <div className="bg-theme p-1 flex gap-2 rounded w-auto"> <TabsTrigger className="rounded cursor-pointer hover:bg-buttonHover" diff --git a/components/account/tabs/comments/AccountCommentPermlinkResultTable.tsx b/components/account/tabs/comments/AccountCommentPermlinkResultTable.tsx index 750bad38..063f4383 100644 --- a/components/account/tabs/comments/AccountCommentPermlinkResultTable.tsx +++ b/components/account/tabs/comments/AccountCommentPermlinkResultTable.tsx @@ -159,7 +159,7 @@ const AccountCommentPermlinkResultTable = ({ /> </div> </div> - <div className="flex w-full overflow-auto"> + <div className="flex w-full overflow-auto rounded"> <div className="text-text w-[100%] bg-theme p-5"> <Table data-testid="table-body"> <TableHeader> diff --git a/components/account/tabs/comments/AccountCommentPermlinkSearchResults.tsx b/components/account/tabs/comments/AccountCommentPermlinkSearchResults.tsx index 3544f70f..e557b8d6 100644 --- a/components/account/tabs/comments/AccountCommentPermlinkSearchResults.tsx +++ b/components/account/tabs/comments/AccountCommentPermlinkSearchResults.tsx @@ -25,7 +25,7 @@ const AccountCommentPermlinkSearchResults: React.FC< <> {data.total_permlinks ? ( <div> - <div className="flex justify-center items-center text-text sticky z-20 top-[3.2rem] md:top-[4rem]"> + <div className="rounded flex justify-center items-center text-text sticky z-20 top-[3.2rem] md:top-[4rem]"> <CustomPagination currentPage={paramsState?.pageNumber ?? 1} totalCount={data.total_permlinks} @@ -33,11 +33,11 @@ const AccountCommentPermlinkSearchResults: React.FC< onPageChange={(page: number) => setParams({ ...paramsState, pageNumber: page }) } - className="mb-4" + className="rounded" /> </div> - <div className="flex flex-wrap"> + <div className="flex flex-wrap mt-4"> <AccountCommentPermlinkResultTable data={data.permlinks_result} accountName={accountName} diff --git a/components/account/tabs/interactions/InteractionsTabResult.tsx b/components/account/tabs/interactions/InteractionsTabResult.tsx index af0e1d80..e0d70715 100644 --- a/components/account/tabs/interactions/InteractionsTabResult.tsx +++ b/components/account/tabs/interactions/InteractionsTabResult.tsx @@ -60,7 +60,7 @@ const InteractionsTabResult: React.FC<InteractionsTabResultProps> = ({ return ( <> <div> - <div className="flex flex-wrap justify-between items-center bg-theme p-2 gap-4 mb-4 sticky z-20 top-[3.2rem] md:top-[4rem]"> + <div className="flex flex-wrap justify-between items-center bg-theme p-2 gap-4 mb-4 sticky z-20 top-[3.2rem] md:top-[4rem] rounded"> <div className="flex justify-center w-full md:w-auto md:justify-start"> <Link href={commentPageLink}> <Button data-testid="go-to-result-page">Go to result page</Button> diff --git a/components/balanceHistory/BalanceHistoryTable.tsx b/components/balanceHistory/BalanceHistoryTable.tsx index ecc41042..0a06f75b 100644 --- a/components/balanceHistory/BalanceHistoryTable.tsx +++ b/components/balanceHistory/BalanceHistoryTable.tsx @@ -204,7 +204,7 @@ const BalanceHistoryTable: React.FC<BalanceHistoryTableProps> = ({ onPageChange={updateUrl} pageSize={config.standardPaginationSize} totalCount={total_operations} - className="text-black dark:text-white" + className="rounded" isMirrored={false} /> </div> diff --git a/components/home/searches/CommentPermlinkResultTable.tsx b/components/home/searches/CommentPermlinkResultTable.tsx index e309a747..8739512c 100644 --- a/components/home/searches/CommentPermlinkResultTable.tsx +++ b/components/home/searches/CommentPermlinkResultTable.tsx @@ -140,8 +140,7 @@ const CommentPermlinkResultTable = ({ </div> </div> <div className="flex w-full overflow-auto"> - - <div className="text-text w-[100%] bg-theme dark:bg-theme p-5"> + <div className="text-text w-[100%] bg-theme dark:bg-theme p-5 rounded"> <Table data-testid="table-body"> <TableHeader> <TableRow>{buildTableHeader()}</TableRow> diff --git a/components/home/searches/searchesResults/AccountSearchResults.tsx b/components/home/searches/searchesResults/AccountSearchResults.tsx index 99a95e7e..4c60f2e7 100644 --- a/components/home/searches/searchesResults/AccountSearchResults.tsx +++ b/components/home/searches/searchesResults/AccountSearchResults.tsx @@ -72,7 +72,7 @@ const AccountSearchResults = () => { <> {accountOperations.total_operations > 0 ? ( <div data-testid="operations-card" > - <div className="flex flex-wrap justify-between items-center bg-theme p-2 gap-4 mb-4 sticky z-20 top-[3.2rem] md:top-[4rem]"> + <div className="flex flex-wrap justify-between items-center bg-theme p-2 gap-4 mb-4 sticky z-20 top-[3.2rem] md:top-[4rem] rounded"> <div className="flex justify-center w-full md:w-auto md:justify-start"> <Link href={accountPageLink}> <Button diff --git a/components/home/searches/searchesResults/CommentPermlinkSearchResults.tsx b/components/home/searches/searchesResults/CommentPermlinkSearchResults.tsx index f12b3e3d..49fbec90 100644 --- a/components/home/searches/searchesResults/CommentPermlinkSearchResults.tsx +++ b/components/home/searches/searchesResults/CommentPermlinkSearchResults.tsx @@ -49,7 +49,7 @@ const CommentPermlinkSearchResults = () => { totalCount={permlinkSearchData.total_permlinks} pageSize={config.standardPaginationSize} onPageChange={changePermlinkSearchPagination} - className="mb-4" + className="mb-4 rounded" /> </div> diff --git a/components/home/searches/searchesResults/CommentSearchResults.tsx b/components/home/searches/searchesResults/CommentSearchResults.tsx index 817b9f9c..73a23b8d 100644 --- a/components/home/searches/searchesResults/CommentSearchResults.tsx +++ b/components/home/searches/searchesResults/CommentSearchResults.tsx @@ -58,7 +58,7 @@ const CommentSearchResults = () => { <> {commentSearchData.operations_result.length ? ( <div> - <div className="flex flex-wrap justify-between items-center bg-theme p-2 gap-4 mb-4 sticky z-20 top-[3.2rem] md:top-[4rem]"> + <div className="flex flex-wrap justify-between items-center bg-theme p-2 gap-4 mb-4 sticky z-20 top-[3.2rem] md:top-[4rem] rounded"> <div className="flex justify-center w-full md:w-auto md:justify-start"> {!isCommentsPage && ( <Link href={commentPageLink}> diff --git a/components/ui/CopyButton.tsx b/components/ui/CopyButton.tsx index c5b52199..03fee99e 100644 --- a/components/ui/CopyButton.tsx +++ b/components/ui/CopyButton.tsx @@ -27,7 +27,6 @@ const CopyButton: React.FC<CopyButtonProps> = ({ setIsCopied(true); setTimeout(() => setIsCopied(false), 1000); } catch (err) { - console.error("Failed to copy text: ", err); setIsCopied(false); } }; diff --git a/components/ui/dialog.tsx b/components/ui/dialog.tsx index c9d9c725..283a6b0f 100644 --- a/components/ui/dialog.tsx +++ b/components/ui/dialog.tsx @@ -36,7 +36,7 @@ const DialogContent = React.forwardRef< <DialogPrimitive.Content ref={ref} className={cn( - "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-theme p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full", + "rounded fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-theme p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] md:w-full", className )} {...props} diff --git a/pages/block/[blockId].tsx b/pages/block/[blockId].tsx index fbf2f64f..16eef6c5 100644 --- a/pages/block/[blockId].tsx +++ b/pages/block/[blockId].tsx @@ -295,7 +295,7 @@ export default function Block() { > {!!totalOperations?.total_operations && totalOperations?.total_operations > 1000 && ( - <div className="my-4 w-full sticky z-20 top-[3.2rem] md:top-[4rem]"> + <div className="my-4 w-full sticky z-20 top-[3.2rem] md:top-[4rem] rounded"> <CustomPagination currentPage={paramsState.page} onPageChange={(newPage: number) => -- GitLab