diff --git a/apps/canonical-bridge-server/src/main.ts b/apps/canonical-bridge-server/src/main.ts index 7968ee17..793c8338 100644 --- a/apps/canonical-bridge-server/src/main.ts +++ b/apps/canonical-bridge-server/src/main.ts @@ -38,8 +38,8 @@ async function bootstrap() { logger.log('Listening on port', SERVER_PORT); }); - server.keepAliveTimeout = 61 * 1000; - server.headersTimeout = 62 * 1000; + server.keepAliveTimeout = 121 * 1000; + server.headersTimeout = 122 * 1000; } bootstrap(); diff --git a/apps/canonical-bridge-ui/core/components/ThemeProvider/index.tsx b/apps/canonical-bridge-ui/core/components/ThemeProvider/index.tsx index 5e900bfb..36882505 100644 --- a/apps/canonical-bridge-ui/core/components/ThemeProvider/index.tsx +++ b/apps/canonical-bridge-ui/core/components/ThemeProvider/index.tsx @@ -24,6 +24,326 @@ export const ThemeProvider = ({ children }: ThemeProviderProps) => { global: ({ colorMode }: { colorMode: ColorMode }) => ({ body: { bg: theme.colors[colorMode].background[3], + '.bccb-widget-transfer-widget-wrapper': { + bg: '#123456', + borderRadius: '10px', + padding: '100px 20px', + }, + '.bccb-widget-route-wrapper': { + background: '#8C8F9B', + padding: '20px', + borderWidth: '5px', + borderRadius: '20px', + color: '#fff', + }, + '.bccb-widget-transfer-widget-title': { + fontSize: '20px', + fontWeight: 700, + color: 'red', + }, + '.bccb-widget-route-container-inner': { + borderColor: 'orange', + }, + '.bccb-widget-route-estimated-time, .bccb-widget-route-fee-info, .bccb-widget-allowed-send-amount': + { + color: 'orange', + fontWeight: 700, + fontSize: '20px', + }, + '.bccb-widget-route-info-tooltip-fee, .bccb-widget-route-token-tooltip-content, .bccb-widget-route-token-tooltip-content .tooltip-arrow, .bccb-widget-route-token-tooltip-body': + { + background: 'pink', + fontWeight: 700, + fontSize: '20px', + borderRadius: '20px', + }, + '.bccb-widget-route-token-tooltip-body > div, .bccb-widget-route-info-tooltip-fee > div, .bccb-widget-route-token-tooltip > div': + { + fontWeight: 700, + fontSize: '20px', + }, + '.bccb-widget-info-tooltip': { + background: 'orange', + borderRadius: '20px', + shadowBox: '0 0 10px 0 rgba(0, 0, 0, 0.1)', + }, + '.bccb-widget-info-tooltip .chakra-tooltip__arrow': { background: 'orange !important' }, + '.bccb-widget-route-name-tag-bestTime, .bccb-widget-route-name-tag-bestReturn': { + color: 'grey', + fontSize: '20px', + }, + '.bccb-widget-route-token-amount': { + color: '#123456', + }, + '.bccb-widget-received-info-container p': { + color: 'yellow', + fontSize: '20px', + }, + '.bccb-widget-token-list-item': { + bg: 'brown', + border: '3px solid red', + padding: '30px', + borderRadius: '20px', + '&:hover': { + bg: 'green', + }, + '> img, .default-icon': { + width: '50px', + height: '50px', + transform: 'rotate(125deg)', + }, + }, + '.bccb-widget-token-list-item-disabled': { + bg: '#fff1af', + opacify: 0.1, + border: '3px solid purple', + padding: '30px', + borderRadius: '20px', + '&:hover': { + bg: 'green', + }, + }, + '.bccb-widget-token-list-address > p': { + color: 'purple', + fontSize: '20px', + fontWeight: 700, + }, + '.bccb-widget-token-list-token-balance': { + fontSize: '20px', + color: '#83a6ac', + }, + '.bccb-widget-token-list-symbol': { + fontSize: '20px', + color: '#83a6ac', + }, + '.bccb-widget-select-list-item-tag': { + fontSize: '20px', + fontWeight: 700, + color: '#83a6ac', + }, + '.bccb-widget-from-network-modal-content': { + background: 'pink', + borderRadius: '20px', + padding: '20px', + width: '700px', + }, + '.bccb-widget-token-modal-search > input, .bccb-widget-token-modal-header-search > input, .bccb-widget-from-network-modal-search > input': + { + fontSize: '35px', + color: 'red', + borderColor: '#83a6ac', + }, + '.bccb-widget-token-address-link .token-name': { + color: 'black', + bg: 'white', + }, + '.bccb-widget-select-list-wrapper': { + paddingBottom: '30px', + }, + '.bccb-widget-transfer-max .max-text': { + fontSize: '20px', + color: 'red', + }, + '.bccb-widget-modal-no-result-found, .bccb-widget-modal-no-result-found-text': { + fontSize: '25px', + fontWeight: 700, + color: 'green', + '& svg': { + width: '70px', + height: '70px', + }, + }, + '.bccb-widget-token-modal-search svg': { + height: '50px', + width: '50px', + }, + '.bccb-widget-token-modal-header': { + fontSize: '20px', + fontWeight: 700, + color: '#83a6ac', + }, + '.bccb-widget-transfer-input-container': { + '& > div': { + marginBottom: '20px', + }, + '& .input-header-label': { + color: '#83a6ac', + fontSize: '20px', + fontWeight: 700, + }, + '.bccb-widget-transfer-input-wrapper': { + '&:hover': { + borderColor: 'yellow', + borderWidth: '5px', + borderRadius: '4px', + }, + }, + '& input': { + fontSize: '15px', + fontWeight: 400, + color: 'pink', + borderColor: '#83a6ac', + + '&:hover': { + borderColor: 'red', + }, + }, + }, + '.bccb-widget-token-select-button': { + borderRadius: '2px', + height: '50px', + bg: 'pink', + color: '#83a6ac', + fontSize: '20px', + fontWeight: 700, + }, + '.bccb-widget-route-error': { + '& .error-text': { + color: 'green', + fontSize: '20px', + fontWeight: 700, + }, + '& svg': { + width: '20px', + height: '20px', + }, + }, + '.bccb-widget-route-name-text': { + color: 'white', + fontSize: '24px', + fontWeight: 700, + }, + '.bccb-widget-network-button': { + bg: '#83a6ac', + color: 'white', + borderRadius: '20px', + padding: '10px 20px', + borderWidth: '5px', + '& .bccb-widget-network-name > p': { + fontSize: '18px', + fontWeight: 700, + }, + }, + '.bccb-widget-transfer-input-error': { + color: 'pink', + fontSize: '20px', + fontWeight: 700, + }, + '.bccb-widget-from-network-list-item, .bccb-widget-to-network-list-item ': { + p: '30px', + bg: 'red', + borderRadius: '20px', + fontWeight: 700, + color: 'black', + fontSize: '20px', + '&:hover': { + bg: 'orange', + }, + }, + '.bccb-widget-from-network-list-item-active, .bccb-widget-to-network-list-item-active': { + borderColor: 'green', + borderWidth: '5px', + bg: '#83a6ac', + }, + '.bccb-widget-transfer-button button': { + fontSize: '20px', + fontWeight: 700, + borderRadius: '30px', + borderWidth: '1px', + borderColor: 'red', + }, + '.bccb-widget-network-title > p': { + color: 'pink', + }, + '.bccb-widget-wallet-connect-button, .bccb-widget-switch-network-button, .bccb-widget-transfer-button': + { + fontWeight: 700, + fontSize: '27px', + borderRadius: '2px', + padding: '10px 20px', + }, + '.bccb-widget-transaction-confirming-modal, .bccb-widget-transaction-submitted-modal, .bccb-widget-transaction-failed-modal, .bccb-widget-transaction-confirming-modal, .bccb-widget-transaction-approve-modal': + { + maxWidth: '700px', + borderRadius: '2px', + '& .bccb-widget-modal-body ': { + bg: 'pink', + '& svg': { + height: '20px', + width: '20px', + }, + }, + '.bccb-widget-modal-main-button': { + padding: '30px', + fontWeight: 700, + fontSize: '25px', + }, + }, + '.bccb-widget-route-header': { + fontWeight: 700, + fontSize: '20px', + }, + '.bccb-widget-refreshing-button svg': { + width: '20px', + height: '20px', + }, + '.bccb-widget-header-menu-list': { + padding: '20px', + '& .bccb-widget-header-menu-item': { + fontSize: '20px', + fontWeight: 700, + color: 'pink', + '&:hover': { + bg: 'orange', + }, + }, + '& .bccb-widget-header-menu-item-selected': { + bg: 'orange', + }, + }, + '.bccb-widget-header-menu-button, .bccb-widget-header-network-status-network, .bccb-widget-header-dropdown-button, .bccb-widget-header-dropdown-button-not-connect, .bccb-widget-header-profile-button': + { + color: 'pink', + borderRadius: '2px', + outlineColor: 'red', + '& button, & .profile-address': { + fontWeight: 700, + fontSize: '30px', + }, + '& p': { + color: 'red', + }, + }, + '.bccb-widget-header-network-status': { + '& .bccb-widget-switch-network-button': { + fontSize: '10px', + borderRadius: '5px', + bg: 'white', + }, + }, + '.bccb-widget-header-network-status-title': { + fontSize: '20px', + fontWeight: 700, + }, + '.bccb-widget-header-dropdown-button': { + fontWeight: 700, + fontSize: '30px', + color: 'green', + ' & .chain-name p': { + fontSize: '20px', + }, + }, + '.bccb-widget-header-profile-list': { + color: 'red', + }, + '.bccb-widget-header-profile-balance': { + color: '#d7877d', + }, + '.bccb-widget-header-profile-disconnect-link > div': { + bg: 'orange', + fontSize: '20px', + fontWeight: 700, + }, }, }), }, diff --git a/apps/canonical-bridge-ui/pages/mainnet/index.tsx b/apps/canonical-bridge-ui/pages/mainnet/index.tsx index f9f48ec2..e7088d95 100644 --- a/apps/canonical-bridge-ui/pages/mainnet/index.tsx +++ b/apps/canonical-bridge-ui/pages/mainnet/index.tsx @@ -24,6 +24,7 @@ export const bridgeConfig: ICanonicalBridgeConfig = { theme: { dark: dark, light: light, + fontFamily: 'Georgia', }, }, wallet: { diff --git a/packages/canonical-bridge-widget/docs/Custom Themes.md b/packages/canonical-bridge-widget/docs/Custom Themes.md index aeed5b5b..4199a76a 100644 --- a/packages/canonical-bridge-widget/docs/Custom Themes.md +++ b/packages/canonical-bridge-widget/docs/Custom Themes.md @@ -58,6 +58,7 @@ export const ThemeProvider = ({ children }: ThemeProviderProps) => { 1. Widget Main - bccb-widget-transfer-widget +- bccb-widget-transfer-widget-wrapper - bccb-widget-transfer-widget-title - bccb-widget-exchange-chain-icon - bccb-widget-copy-address @@ -80,6 +81,7 @@ export const ThemeProvider = ({ children }: ThemeProviderProps) => { - bccb-widget-route-bottom - bccb-widget-route-wrapper - bccb-widget-route-container +- bccb-widget-route-container-inner - bccb-widget-route-name - bccb-widget-route-name-text - bccb-widget-route-name-tag-bestTime @@ -110,11 +112,15 @@ export const ThemeProvider = ({ children }: ThemeProviderProps) => { - bccb-widget-header-wallet-connect-button - bccb-widget-header-menu-button - bccb-widget-header-menu-item +- bccb-widget-header-profile-balance - bccb-widget-header-profile-list - bccb-widget-header-profile-disconnect-link - bccb-widget-header-profile-button - bccb-widget-header-switching-tips-modal - bccb-widget-header-preventing-modal +- bccb-widget-header-network-status +- bccb-widget-header-network-status-title +- bccb-widget-header-network-status-network 5. Token Selection Modal @@ -122,8 +128,10 @@ export const ThemeProvider = ({ children }: ThemeProviderProps) => { - bccb-widget-token-modal-content - bccb-widget-token-virtual-list - bccb-widget-token-list-address +- bccb-widget-token-list-symbol - bccb-widget-token-address-link - bccb-widget-token-list-item +- bccb-widget-token-list-item-disabled - bccb-widget-token-list-token-balance 6. From Network Selection @@ -153,6 +161,7 @@ export const ThemeProvider = ({ children }: ThemeProviderProps) => { 9. Send Amount Input - bccb-widget-transfer-input-container +- bccb-widget-transfer-input-wrapper - bccb-widget-transfer-input - bccb-widget-transfer-max - bccb-widget-transfer-input-error diff --git a/packages/canonical-bridge-widget/src/core/components/IconImage/index.tsx b/packages/canonical-bridge-widget/src/core/components/IconImage/index.tsx index e1059b55..88398828 100644 --- a/packages/canonical-bridge-widget/src/core/components/IconImage/index.tsx +++ b/packages/canonical-bridge-widget/src/core/components/IconImage/index.tsx @@ -19,6 +19,7 @@ export function IconImage(props: IconImageProps) { <> {isError ? ( - {item.displaySymbol} + + {item.displaySymbol} + {isMobile && !isNative && ( {(!isActive || isNative) && ( {(item) => ( {(item) => ( {title} diff --git a/packages/canonical-bridge-widget/src/modules/aggregator/components/SelectModal/components/ListItem.tsx b/packages/canonical-bridge-widget/src/modules/aggregator/components/SelectModal/components/ListItem.tsx index a9a2bf9e..a96a7adc 100644 --- a/packages/canonical-bridge-widget/src/modules/aggregator/components/SelectModal/components/ListItem.tsx +++ b/packages/canonical-bridge-widget/src/modules/aggregator/components/SelectModal/components/ListItem.tsx @@ -31,8 +31,9 @@ export const ListItem = React.forwardRef((props: ListItemProps, ref: any) => { const { formatMessage } = useIntl(); return ( - + { {showTag && isDisabled && ( + { const theme = useTheme(); return ( - + - + {formatMessage({ id: 'from.section.title' })} diff --git a/packages/canonical-bridge-widget/src/modules/transfer/components/SendInput/MaxLink.tsx b/packages/canonical-bridge-widget/src/modules/transfer/components/SendInput/MaxLink.tsx index 255938f8..8b2efa50 100644 --- a/packages/canonical-bridge-widget/src/modules/transfer/components/SendInput/MaxLink.tsx +++ b/packages/canonical-bridge-widget/src/modules/transfer/components/SendInput/MaxLink.tsx @@ -46,6 +46,7 @@ export const MaxLink: React.FC = () => { {showBalance ? ( { return ( - + {formatMessage({ id: 'you.send.title' })} { return ( <> - + { }, }} > - - + + {routeError[bridgeType]} diff --git a/packages/canonical-bridge-widget/src/modules/transfer/components/TransferOverview/RouteInfo/TokenInfoTooltip.tsx b/packages/canonical-bridge-widget/src/modules/transfer/components/TransferOverview/RouteInfo/TokenInfoTooltip.tsx index fc177be7..e1c7642b 100644 --- a/packages/canonical-bridge-widget/src/modules/transfer/components/TransferOverview/RouteInfo/TokenInfoTooltip.tsx +++ b/packages/canonical-bridge-widget/src/modules/transfer/components/TransferOverview/RouteInfo/TokenInfoTooltip.tsx @@ -38,14 +38,20 @@ export const TokenInfoTooltip = ({ {children} - - e.stopPropagation()}> - + + e.stopPropagation()} + > + <> {nativeToken ? 'Native token' : 'Token address:'} @@ -72,7 +78,7 @@ export const TokenInfoTooltip = ({ )} )} - + diff --git a/packages/canonical-bridge-widget/src/modules/transfer/components/TransferOverview/index.tsx b/packages/canonical-bridge-widget/src/modules/transfer/components/TransferOverview/index.tsx index b22ad7f2..3a881218 100644 --- a/packages/canonical-bridge-widget/src/modules/transfer/components/TransferOverview/index.tsx +++ b/packages/canonical-bridge-widget/src/modules/transfer/components/TransferOverview/index.tsx @@ -117,7 +117,7 @@ export function TransferOverview({ routeContentBottom }: { routeContentBottom?: w={'100%'} overflow={['auto', 'auto', 'auto', 'hidden']} > - + {cBridgeSupport && } - + {!routeContentBottom ? ( content ) : ( diff --git a/packages/canonical-bridge-widget/src/modules/transfer/index.tsx b/packages/canonical-bridge-widget/src/modules/transfer/index.tsx index 9fa24d14..4457a707 100644 --- a/packages/canonical-bridge-widget/src/modules/transfer/index.tsx +++ b/packages/canonical-bridge-widget/src/modules/transfer/index.tsx @@ -43,7 +43,7 @@ export function TransferWidget() { justifyContent={'center'} > {appearance.bridgeTitle && ( )} - + {chain.name} @@ -175,6 +184,7 @@ export function NetworkStatus() { return ( { )} - + {formatAppAddress({ address })} @@ -81,7 +87,10 @@ export const ProfileMenu = () => { {!!balance?.formatted && ( - + {formatNumber(Number(balance?.formatted), 4)} {balance?.symbol} )}