From b5c9f0426172b0646d365312d17a1d9199aeb43f Mon Sep 17 00:00:00 2001 From: Diogo Soares Date: Tue, 20 Jun 2023 12:59:28 +0200 Subject: [PATCH 1/5] style: adjust success and info box styles --- public/images/common/check.svg | 4 ++++ public/images/notifications/info.svg | 2 +- src/components/safe-messages/InfoBox/index.tsx | 11 +++++++---- .../safe-messages/InfoBox/styles.module.css | 10 ++++++---- .../tx-flow/flows/SignMessage/SignMessage.tsx | 5 +++-- src/components/tx/SuccessMessage/index.tsx | 12 +++++------- 6 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 public/images/common/check.svg diff --git a/public/images/common/check.svg b/public/images/common/check.svg new file mode 100644 index 0000000000..cfe44936f4 --- /dev/null +++ b/public/images/common/check.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/images/notifications/info.svg b/public/images/notifications/info.svg index d979abad58..85b63fd090 100644 --- a/public/images/notifications/info.svg +++ b/public/images/notifications/info.svg @@ -1,4 +1,4 @@ - + diff --git a/src/components/safe-messages/InfoBox/index.tsx b/src/components/safe-messages/InfoBox/index.tsx index b644c68d5a..21a22a5c6c 100644 --- a/src/components/safe-messages/InfoBox/index.tsx +++ b/src/components/safe-messages/InfoBox/index.tsx @@ -5,10 +5,12 @@ import InfoIcon from '@/public/images/notifications/info.svg' import css from './styles.module.css' const InfoBox = ({ + title, message, children, className, }: { + title: string message: string children: ReactNode className?: string @@ -16,14 +18,15 @@ const InfoBox = ({ return (
- +
- - {message} + + {title} + {message}
- +
{children}
) diff --git a/src/components/safe-messages/InfoBox/styles.module.css b/src/components/safe-messages/InfoBox/styles.module.css index 2de4715456..1c6764419e 100644 --- a/src/components/safe-messages/InfoBox/styles.module.css +++ b/src/components/safe-messages/InfoBox/styles.module.css @@ -19,12 +19,14 @@ text-decoration: underline; } -.message svg { - margin-top: 4px; -} - .details { margin-top: var(--space-1); color: var(--color-primary-light); word-break: break-word; } + +.divider { + margin-right: calc(-1 * var(--space-2)); + margin-left: calc(-1 * var(--space-2)); + border-color: var(--color-info-light); +} diff --git a/src/components/tx-flow/flows/SignMessage/SignMessage.tsx b/src/components/tx-flow/flows/SignMessage/SignMessage.tsx index 5339a56348..3bf06c1074 100644 --- a/src/components/tx-flow/flows/SignMessage/SignMessage.tsx +++ b/src/components/tx-flow/flows/SignMessage/SignMessage.tsx @@ -115,8 +115,8 @@ const AlreadySignedByOwnerMessage = ({ hasSigned }: { hasSigned: boolean }) => { } return ( - - + + Your connected wallet has already signed this message. @@ -228,6 +228,7 @@ const SignMessage = ({ onClose, message, safeAppId, requestId }: ProposeProps | { return (
- + -
- - {children} - -
+ + {children} +
) From f8f248d7d41226ccee416df32ece3ab63e9a6a1a Mon Sep 17 00:00:00 2001 From: Diogo Soares Date: Tue, 20 Jun 2023 13:21:22 +0200 Subject: [PATCH 2/5] adjust msgSigners style --- src/components/safe-messages/MsgSigners/index.tsx | 2 +- src/components/safe-messages/MsgSigners/styles.module.css | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/safe-messages/MsgSigners/index.tsx b/src/components/safe-messages/MsgSigners/index.tsx index 045a1602bd..10c4d47992 100644 --- a/src/components/safe-messages/MsgSigners/index.tsx +++ b/src/components/safe-messages/MsgSigners/index.tsx @@ -79,7 +79,7 @@ export const MsgSigners = ({ )} - + diff --git a/src/components/safe-messages/MsgSigners/styles.module.css b/src/components/safe-messages/MsgSigners/styles.module.css index 7a6581ed4a..7d4aa34ecf 100644 --- a/src/components/safe-messages/MsgSigners/styles.module.css +++ b/src/components/safe-messages/MsgSigners/styles.module.css @@ -30,6 +30,11 @@ padding-right: 0; } +.signers :global .MuiListItemText-root { + margin-top: var(--space-1); + margin-bottom: var(--space-1); +} + .signers :global .MuiListItemIcon-root { color: var(--color-primary-main); justify-content: center; From 9f90e3a4232fe2f0e6525ad3c9b6217bfbab1eb0 Mon Sep 17 00:00:00 2001 From: Diogo Soares Date: Tue, 20 Jun 2023 13:32:47 +0200 Subject: [PATCH 3/5] style margins in the info elements --- .../safe-messages/InfoBox/styles.module.css | 1 - .../tx-flow/flows/SignMessage/SignMessage.tsx | 44 +++++++++++-------- .../tx/SuccessMessage/styles.module.css | 1 - 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/components/safe-messages/InfoBox/styles.module.css b/src/components/safe-messages/InfoBox/styles.module.css index 1c6764419e..ae24d95400 100644 --- a/src/components/safe-messages/InfoBox/styles.module.css +++ b/src/components/safe-messages/InfoBox/styles.module.css @@ -1,7 +1,6 @@ .container { background-color: var(--color-info-background); padding: var(--space-2); - margin: var(--space-2) 0; border-radius: 4px; display: flex; flex-direction: column; diff --git a/src/components/tx-flow/flows/SignMessage/SignMessage.tsx b/src/components/tx-flow/flows/SignMessage/SignMessage.tsx index 3bf06c1074..fdc8b39ed5 100644 --- a/src/components/tx-flow/flows/SignMessage/SignMessage.tsx +++ b/src/components/tx-flow/flows/SignMessage/SignMessage.tsx @@ -213,18 +213,22 @@ const SignMessage = ({ onClose, message, safeAppId, requestId }: ProposeProps | }, [onClose, ongoingMessage, requestId]) return ( - - - + <> + + + - - Message: - - + + Message: + + - - + + + + + - + - - {/* TODO: Remove this Cancel button once we can figure out how to move the logic outside */} - - - - setShowCloseTooltip(false)} onClose={onClose} /> - + + + {/* TODO: Remove this Cancel button once we can figure out how to move the logic outside */} + + + + setShowCloseTooltip(false)} onClose={onClose} /> + + ) } diff --git a/src/components/tx/SuccessMessage/styles.module.css b/src/components/tx/SuccessMessage/styles.module.css index 7ae0ce6c58..418cdcdea6 100644 --- a/src/components/tx/SuccessMessage/styles.module.css +++ b/src/components/tx/SuccessMessage/styles.module.css @@ -1,7 +1,6 @@ .container { background-color: var(--color-success-background); padding: var(--space-2); - margin: var(--space-2) 0; border-radius: 4px; } From 4cd16f3b79d5083abedc7d6ed6807c7cf110d700 Mon Sep 17 00:00:00 2001 From: Diogo Soares Date: Tue, 20 Jun 2023 15:31:09 +0200 Subject: [PATCH 4/5] clean up redundant variable --- src/components/safe-messages/MsgSigners/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/safe-messages/MsgSigners/index.tsx b/src/components/safe-messages/MsgSigners/index.tsx index 10c4d47992..a0e0c59938 100644 --- a/src/components/safe-messages/MsgSigners/index.tsx +++ b/src/components/safe-messages/MsgSigners/index.tsx @@ -79,7 +79,7 @@ export const MsgSigners = ({ )} - + @@ -92,7 +92,7 @@ export const MsgSigners = ({ {!hideConfirmations && confirmations.map(({ owner }) => ( - + @@ -115,7 +115,7 @@ export const MsgSigners = ({ {showMissingSignatures && missingConfirmations.map((_, idx) => ( - + @@ -130,7 +130,7 @@ export const MsgSigners = ({ ))} {isConfirmed && ( - + Confirmed From 4093b9f7ac92b82194bd162d4d22328a7a2da0bc Mon Sep 17 00:00:00 2001 From: Diogo Soares Date: Tue, 20 Jun 2023 15:55:51 +0200 Subject: [PATCH 5/5] test: update tx builder URL --- src/tests/pages/apps-share.test.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tests/pages/apps-share.test.tsx b/src/tests/pages/apps-share.test.tsx index 119013a185..710394aff2 100644 --- a/src/tests/pages/apps-share.test.tsx +++ b/src/tests/pages/apps-share.test.tsx @@ -19,7 +19,7 @@ describe('Share Safe App Page', () => { render(, { routerProps: { query: { - appUrl: 'https://apps.gnosis-safe.io/tx-builder/', + appUrl: 'https://apps-portal.safe.global/tx-builder/', chain: 'eth', }, }, @@ -38,7 +38,7 @@ describe('Share Safe App Page', () => { expect( screen.getByText('Compose custom contract interactions and batch them into a single transaction'), ).toBeInTheDocument() - expect(screen.getByText('https://apps.gnosis-safe.io/tx-builder')).toBeInTheDocument() + expect(screen.getByText('https://apps-portal.safe.global/tx-builder')).toBeInTheDocument() }, { timeout: FETCH_TIMEOUT }, ) @@ -48,7 +48,7 @@ describe('Share Safe App Page', () => { render(, { routerProps: { query: { - appUrl: 'https://apps.gnosis-safe.io/tx-builder/', + appUrl: 'https://apps-portal.safe.global/tx-builder/', chain: 'eth', }, }, @@ -73,7 +73,7 @@ describe('Share Safe App Page', () => { render(, { routerProps: { query: { - appUrl: 'https://apps.gnosis-safe.io/tx-builder/', + appUrl: 'https://apps-portal.safe.global/tx-builder/', chain: 'eth', }, }, @@ -107,7 +107,7 @@ describe('Share Safe App Page', () => { render(, { routerProps: { query: { - appUrl: 'https://apps.gnosis-safe.io/tx-builder/', + appUrl: 'https://apps-portal.safe.global/tx-builder/', chain: 'rin', }, }, @@ -145,7 +145,7 @@ describe('Share Safe App Page', () => { render(, { routerProps: { query: { - appUrl: 'https://apps.gnosis-safe.io/tx-builder/', + appUrl: 'https://apps-portal.safe.global/tx-builder/', chain: 'eth', }, },