diff --git a/src/routes/safe/components/Settings/Advanced/index.tsx b/src/routes/safe/components/Settings/Advanced/index.tsx index 74d9f3d5..e0ee038a 100644 --- a/src/routes/safe/components/Settings/Advanced/index.tsx +++ b/src/routes/safe/components/Settings/Advanced/index.tsx @@ -1,4 +1,4 @@ -import { GenericModal, ModalFooterConfirmation, Text } from '@gnosis.pm/safe-react-components' +import { Button, GenericModal, Text, Title, theme } from '@gnosis.pm/safe-react-components' import { makeStyles } from '@material-ui/core/styles' import TableContainer from '@material-ui/core/TableContainer' import cn from 'classnames' @@ -9,15 +9,9 @@ import { useDispatch, useSelector } from 'react-redux' import { generateColumns, MODULES_TABLE_ADDRESS_ID, getModuleData } from './dataFetcher' import { styles } from './style' -import BinIcon from '../assets/icons/bin.svg' -import DividerLine from 'src/components/DividerLine' import Identicon from 'src/components/Identicon' import Block from 'src/components/layout/Block' -import Bold from 'src/components/layout/Bold' -import Heading from 'src/components/layout/Heading' -import Img from 'src/components/layout/Img' -import Paragraph from 'src/components/layout/Paragraph' import Row from 'src/components/layout/Row' import { TableCell, TableRow } from 'src/components/layout/Table' import Table from 'src/components/Table' @@ -31,12 +25,37 @@ import { safeNonceSelector, safeModulesSelector, } from 'src/routes/safe/store/selectors' +import styled from 'styled-components' export const REMOVE_MODULE_BTN_TEST_ID = 'remove-module-btn' export const MODULES_ROW_TEST_ID = 'owners-row' const useStyles = makeStyles(styles) +const AddressText = styled(Text)` + margin-left: 12px; +` + +const InfoText = styled(Text)` + margin-top: 16px; +` + +const Bold = styled.strong` + color: ${theme.colors.text}; +` + +const TableActionButton = styled(Button)` + background-color: transparent; + + &:hover { + background-color: transparent; + } +` +const FooterWrapper = styled.div` + display: flex; + justify-content: space-around; +` + const Advanced: React.FC = () => { const classes = useStyles() @@ -82,21 +101,24 @@ const Advanced: React.FC = () => { <> {/* Nonce */} - Safe Nonce - + + Safe Nonce + + For security reasons, transactions made with the Safe need to be executed in order. The nonce shows you which transaction was executed most recently. You can find the nonce for a transaction in the transaction details. - - + + Current Nonce: {nonce} - + - {/* Modules */} - Safe Modules - + + Safe Modules + + Modules allow you to customize the access-control logic of your Safe. Modules are potentially risky, so make sure to only use modules from trusted sources. Learn more about modules{' '} { here . - + {moduleData.size === 0 ? ( - + No modules enabled - + ) : ( { const rowElement = row[columnId] return ( - - {columnId === MODULES_TABLE_ADDRESS_ID ? ( - - - {rowElement} - - ) : ( - rowElement - )} - + <> + + {columnId === MODULES_TABLE_ADDRESS_ID ? ( + + + {rowElement} + + ) : ( + rowElement + )} + + + + {granted && ( + triggerRemoveSelectedModule(columnId)} + data-testid={REMOVE_MODULE_BTN_TEST_ID} + > + {null} + + )} + + + ) })} - - - {granted && ( - Remove module - )} - - )) } @@ -175,12 +202,14 @@ const Advanced: React.FC = () => { title="Disable Module" body={
This is the body
} footer={ - + + + + } /> )}