diff --git a/frontend/components/Main/Main.tsx b/frontend/components/Main/Main.tsx
index 460ba061..cfffd702 100644
--- a/frontend/components/Main/Main.tsx
+++ b/frontend/components/Main/Main.tsx
@@ -39,10 +39,10 @@ export const Main = () => {
style={{ borderTopColor: 'transparent' }}
>
-
+
diff --git a/frontend/components/Main/MainAddFunds.tsx b/frontend/components/Main/MainAddFunds.tsx
index 2058e70f..9f4ef935 100644
--- a/frontend/components/Main/MainAddFunds.tsx
+++ b/frontend/components/Main/MainAddFunds.tsx
@@ -1,10 +1,8 @@
import {
CopyOutlined,
// QrcodeOutlined,
- WarningOutlined,
} from '@ant-design/icons';
import {
- Alert,
Button,
Flex,
message,
@@ -18,11 +16,12 @@ import { useCallback, useMemo, useState } from 'react';
import styled from 'styled-components';
import { copyToClipboard, truncateAddress } from '@/common-util';
-import { COLOR, COW_SWAP_GNOSIS_XDAI_OLAS_URL } from '@/constants';
+import { COW_SWAP_GNOSIS_XDAI_OLAS_URL } from '@/constants';
import { UNICODE_SYMBOLS } from '@/constants/unicode';
import { useWallet } from '@/hooks/useWallet';
import { Address } from '@/types';
+import { Alert } from '../common/Alert';
import { CardSection } from '../styled/CardSection';
const { Text } = Typography;
@@ -94,16 +93,15 @@ export const MainAddFunds = () => {
const AddFundsWarningAlertSection = () => (
}
message={
-
+
Only send funds on Gnosis Chain!
-
+
You will lose any assets you send on other chains.
@@ -121,7 +119,7 @@ const AddFundsAddressSection = ({
truncatedFundingAddress?: string;
handleCopy: () => void;
}) => (
-
+
@@ -132,9 +130,7 @@ const AddFundsAddressSection = ({
GNO: {truncatedFundingAddress ?? '--'}
-
+ } size="large" />
{/*
}
>
-
+ } size="large" />
*/}
);
const AddFundsGetTokensSection = () => (
-
+
Get OLAS + XDAI on Gnosis Chain {UNICODE_SYMBOLS.EXTERNAL_LINK}
diff --git a/frontend/components/Main/MainGasBalance.tsx b/frontend/components/Main/MainGasBalance.tsx
index 5266c5ca..f92751e8 100644
--- a/frontend/components/Main/MainGasBalance.tsx
+++ b/frontend/components/Main/MainGasBalance.tsx
@@ -70,8 +70,13 @@ export const MainGasBalance = () => {
const { isBalanceLoaded } = useBalance();
return (
-
-
+
+
Gas and trading balance
{masterSafeAddress && (
{
const serviceTemplate = SERVICE_TEMPLATES[0];
@@ -71,22 +72,29 @@ export const MainNeedsFunds = () => {
const message: ReactNode = useMemo(
() => (
-
-
- Your agent needs funds
-
-
+
+ Your agent needs funds
+
+ USE THE ACCOUNT CREDENTIALS PROVIDED IN THE “ADD FUNDS” INSTRUCTIONS
+ BELOW.
+
+
To run your agent, you must add these amounts to your account:
-
-
- {!hasEnoughOlas && (
- -
- {UNICODE_SYMBOLS.OLAS}
- {serviceFundRequirements.olas} OLAS (for staking)
-
- )}
- {!hasEnoughEth && - ${serviceFundRequirements.eth} XDAI
}
-
+
+ {!hasEnoughOlas && (
+
+ {`${UNICODE_SYMBOLS.OLAS}${serviceFundRequirements.olas} OLAS `}
+ - for staking.
+
+ )}
+ {!hasEnoughEth && (
+
+
+ {`${serviceFundRequirements.eth} XDAI `}
+
+ - for gas & trading balance.
+
+ )}
),
[serviceFundRequirements, hasEnoughEth, hasEnoughOlas],
@@ -96,19 +104,8 @@ export const MainNeedsFunds = () => {
if (!isBalanceLoaded) return null;
return (
-
-
- }
- showIcon
- message={message}
- type="info"
- />
+
+
);
};
diff --git a/frontend/components/Main/MainRewards.tsx b/frontend/components/Main/MainRewards.tsx
index 829464c2..411b7133 100644
--- a/frontend/components/Main/MainRewards.tsx
+++ b/frontend/components/Main/MainRewards.tsx
@@ -17,7 +17,10 @@ const RewardsRow = styled(Row)`
margin: 0 -24px;
> .ant-col {
padding: 24px;
- border-right: 1px solid ${COLOR.BORDER_GRAY};
+
+ &:not(:last-child) {
+ border-right: 1px solid ${COLOR.BORDER_GRAY};
+ }
}
`;
@@ -32,7 +35,7 @@ const DisplayRewards = () => {
- Staking rewards today
+ Staking rewards today
{isBalanceLoaded ? (
<>
@@ -55,7 +58,7 @@ const DisplayRewards = () => {
- Staked amount
+ Staked amount
{isBalanceLoaded ? (
<>
diff --git a/frontend/components/Settings/Settings.tsx b/frontend/components/Settings/Settings.tsx
index f4f9f55a..e780d5cc 100644
--- a/frontend/components/Settings/Settings.tsx
+++ b/frontend/components/Settings/Settings.tsx
@@ -1,16 +1,16 @@
import { CloseOutlined, SettingOutlined } from '@ant-design/icons';
-import { Alert, Button, Card, Flex, Typography } from 'antd';
+import { Button, Card, Flex, Typography } from 'antd';
import Link from 'next/link';
import { useMemo } from 'react';
import { truncateAddress } from '@/common-util';
-import { COLOR } from '@/constants';
import { UNICODE_SYMBOLS } from '@/constants/unicode';
import { PageState, SettingsScreen } from '@/enums';
import { usePageState } from '@/hooks';
import { useMasterSafe } from '@/hooks/useMasterSafe';
import { useSettings } from '@/hooks/useSettings';
+import { Alert } from '../common/Alert';
import { CardTitle } from '../common/CardTitle';
import { CardSection } from '../styled/CardSection';
import { SettingsAddBackupWallet } from './SettingsAddBackupWallet';
@@ -98,17 +98,13 @@ const NoBackupWallet = () => {
-
- Your funds are at risk!
-
-
- You will lose any assets you send on other chains.
-
+ Your funds are at risk!
+ You will lose any assets you send on other chains.
>
}
diff --git a/frontend/components/Setup/Create/SetupEoaFunding.tsx b/frontend/components/Setup/Create/SetupEoaFunding.tsx
index 5eb6399a..0dbc5412 100644
--- a/frontend/components/Setup/Create/SetupEoaFunding.tsx
+++ b/frontend/components/Setup/Create/SetupEoaFunding.tsx
@@ -1,10 +1,8 @@
import {
CopyOutlined,
- InfoCircleOutlined,
// QrcodeOutlined
} from '@ant-design/icons';
import {
- Alert,
Button,
Flex,
message,
@@ -18,10 +16,10 @@ import styled from 'styled-components';
import { Chain } from '@/client';
import { copyToClipboard } from '@/common-util';
+import { Alert } from '@/components/common/Alert';
import { CardFlex } from '@/components/styled/CardFlex';
import { CardSection } from '@/components/styled/CardSection';
import {
- COLOR,
COW_SWAP_GNOSIS_XDAI_OLAS_URL,
MIN_ETH_BALANCE_THRESHOLDS,
} from '@/constants';
@@ -141,15 +139,15 @@ const SetupEoaFundingWaiting = ({
<>
-
+
Only send funds on Gnosis Chain!
-
+
You will lose any assets you send on other chains.
@@ -194,9 +192,8 @@ const SetupEoaFundingWaiting = ({
{`GNO: ${masterEoa}`}
}
message={
'After this point, do not send more funds to this address. Once your account is created, you will be given a new address - send further funds there.'
}
@@ -218,14 +215,6 @@ const AccountCreationCard = styled.div`
padding: 16px;
background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='12' ry='12' stroke='%23A3AEBB' stroke-width='2' stroke-dasharray='6' stroke-dashoffset='15' stroke-linecap='square'/%3e%3c/svg%3e");
border-radius: 12px;
-
- .account-creation-alert {
- margin-top: 8px;
- background: #e6f4ff;
- border: 1px solid #91caff;
- color: #002c8c;
- align-items: flex-start;
- }
`;
const ICON_STYLE = { color: '#606F85' };
diff --git a/frontend/components/common/Alert.tsx b/frontend/components/common/Alert.tsx
new file mode 100644
index 00000000..3cadd98b
--- /dev/null
+++ b/frontend/components/common/Alert.tsx
@@ -0,0 +1,28 @@
+import {
+ ExclamationCircleOutlined,
+ InfoCircleOutlined,
+ WarningOutlined,
+} from '@ant-design/icons';
+import { Alert as AlertAntd, AlertProps } from 'antd';
+
+type AlertType = 'primary' | 'info' | 'warning' | 'error';
+
+const icons = {
+ primary: ,
+ info: ,
+ warning: ,
+ error: ,
+};
+
+export const Alert = ({
+ type,
+ fullWidth,
+ ...rest
+}: { type: AlertType; fullWidth?: boolean } & Omit) => (
+
+);
diff --git a/frontend/components/styled/CardSection.tsx b/frontend/components/styled/CardSection.tsx
index 8f54467a..3c38139b 100644
--- a/frontend/components/styled/CardSection.tsx
+++ b/frontend/components/styled/CardSection.tsx
@@ -6,7 +6,7 @@ import { COLOR } from '@/constants';
type CardSectionProps = FlexProps & {
bordertop?: 'true' | 'false';
borderbottom?: 'true' | 'false';
- padding?: number;
+ padding?: string;
};
/**
@@ -17,7 +17,7 @@ export const CardSection = styled(Flex)`
${(props) => {
const { padding, borderbottom, bordertop } = props;
- const paddingStyle = `padding: ${Number(padding) ? `${padding}` : '24'}px;`;
+ const paddingStyle = `padding: ${padding ?? '24px'};`;
const borderTopStyle =
bordertop === 'true' ? `border-top: 1px solid ${COLOR.BORDER_GRAY};` : '';
const borderBottomStyle =
diff --git a/frontend/constants/color.ts b/frontend/constants/color.ts
index dd52eda2..1c825de0 100644
--- a/frontend/constants/color.ts
+++ b/frontend/constants/color.ts
@@ -6,6 +6,6 @@ export const COLOR = {
BLUE: '#1677FF',
ORANGE: '#FAAD14',
WHITE: '#ffffff',
- BORDER_GRAY: '#f0f0f0',
+ BORDER_GRAY: '#DFE5EE',
BROWN: '#873800',
};
diff --git a/frontend/styles/globals.scss b/frontend/styles/globals.scss
index f2a62c14..880ef9b2 100644
--- a/frontend/styles/globals.scss
+++ b/frontend/styles/globals.scss
@@ -60,13 +60,44 @@ button, input, select, textarea, .ant-input-suffix {
line-height: 24px;
}
-.card-section-alert {
- margin: 0;
- border-radius: 0;
- border-left: 0;
- border-right: 0;
- margin: -24px;
+.custom-alert {
align-items: flex-start;
+
+ &--primary {
+ border-color: #ECD7FE;
+ background-color: #F8F0FF;
+ color: #36075F;
+
+ .ant-alert-icon {
+ color: #7E22CE;
+ }
+ }
+
+ &--info {
+ color: #002C8C;
+ }
+
+ &--warning {
+ color: #873800;
+ }
+
+ &--error {
+ color: #A8071A;
+ }
+
+ .ant-typography {
+ color: inherit;
+ }
+
+ &--full-width {
+ flex: auto;
+ margin: 0;
+ border-radius: 0;
+ border-left: 0;
+ border-right: 0;
+ padding: 12px 24px;
+ margin: -24px;
+ }
}
.can-select-text {
@@ -81,6 +112,10 @@ button, input, select, textarea, .ant-input-suffix {
margin: 0 !important;
}
+.mb-4 {
+ margin-bottom: 4px !important;
+}
+
.mb-auto {
margin-bottom: auto !important;
}
diff --git a/frontend/theme/mainTheme.ts b/frontend/theme/mainTheme.ts
index 3033c7d1..e42767da 100644
--- a/frontend/theme/mainTheme.ts
+++ b/frontend/theme/mainTheme.ts
@@ -16,12 +16,6 @@ export const mainTheme: ThemeConfig = {
components: {
Alert: {
fontSize: 16,
- colorInfoBg: '#F8F0FF',
- colorInfoBorder: '#CF9EFA',
- colorInfoText: '#36075F',
- colorIconHover: '#36075F',
- colorText: '#36075F',
- colorIcon: '#36075F',
},
Button: {
fontSize: 16,