diff --git a/apps/cowswap-frontend/src/assets/icon/carret.svg b/apps/cowswap-frontend/src/assets/icon/carret.svg new file mode 100644 index 0000000000..c7374a1dad --- /dev/null +++ b/apps/cowswap-frontend/src/assets/icon/carret.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/cowswap-frontend/src/assets/icon/gas-free.svg b/apps/cowswap-frontend/src/assets/icon/gas-free.svg index 96b8d2d0c0..afd180e2ac 100644 --- a/apps/cowswap-frontend/src/assets/icon/gas-free.svg +++ b/apps/cowswap-frontend/src/assets/icon/gas-free.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/apps/cowswap-frontend/src/assets/icon/wallet.svg b/apps/cowswap-frontend/src/assets/icon/wallet.svg new file mode 100644 index 0000000000..a320a3cd8b --- /dev/null +++ b/apps/cowswap-frontend/src/assets/icon/wallet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/cowswap-frontend/src/common/constants/theme.ts b/apps/cowswap-frontend/src/common/constants/theme.ts index 6f4442824d..47cfd98680 100644 --- a/apps/cowswap-frontend/src/common/constants/theme.ts +++ b/apps/cowswap-frontend/src/common/constants/theme.ts @@ -24,6 +24,8 @@ export enum UI { // Icons ICON_SIZE_NORMAL = '--cow-icon-size-normal', + ICON_SIZE_SMALL = '--cow-icon-size-small', + ICON_SIZE_XSMALL = '--cow-icon-size-xsmall', ICON_SIZE_LARGE = '--cow-icon-size-large', ICON_COLOR_NORMAL = '--cow-icon-color-normal', diff --git a/apps/cowswap-frontend/src/common/pure/ConfirmationPendingContent/styled.tsx b/apps/cowswap-frontend/src/common/pure/ConfirmationPendingContent/styled.tsx index c9640e8c95..eabdfe0f55 100644 --- a/apps/cowswap-frontend/src/common/pure/ConfirmationPendingContent/styled.tsx +++ b/apps/cowswap-frontend/src/common/pure/ConfirmationPendingContent/styled.tsx @@ -302,11 +302,19 @@ export const StepsWrapper = styled.div` margin: auto; position: absolute; width: 100%; - max-width: 162px; + max-width: 35%; left: 0; right: 0; top: 32px; z-index: 1; + + ${({ theme }) => theme.mediaWidth.upToSmall` + max-width: 25%; + `} + + ${({ theme }) => theme.mediaWidth.upToVerySmall` + max-width: 20%; + `} } > hr::before { diff --git a/apps/cowswap-frontend/src/common/pure/CurrencySelectButton/styled.tsx b/apps/cowswap-frontend/src/common/pure/CurrencySelectButton/styled.tsx index f03be68b0a..3b77df839d 100644 --- a/apps/cowswap-frontend/src/common/pure/CurrencySelectButton/styled.tsx +++ b/apps/cowswap-frontend/src/common/pure/CurrencySelectButton/styled.tsx @@ -3,6 +3,8 @@ import { ReactComponent as DropDown } from '@cowprotocol/assets/images/dropdown. import { lighten, transparentize } from 'polished' import styled from 'styled-components/macro' +import { UI } from 'common/constants/theme' + export const CurrencySelectWrapper = styled.button<{ isLoading: boolean; $stubbed: boolean; readonlyMode: boolean }>` display: flex; justify-content: space-between; @@ -19,7 +21,7 @@ export const CurrencySelectWrapper = styled.button<{ isLoading: boolean; $stubbe : `0px 4px 8px ${transparentize(0.96, theme.text1)}`}; opacity: ${({ isLoading }) => (isLoading ? 0.6 : 1)}; pointer-events: ${({ readonlyMode }) => (readonlyMode ? 'none' : '')}; - border-radius: 16px; + border-radius: var(${UI.BORDER_RADIUS_NORMAL}); padding: 6px; transition: background-color 0.15s ease-in-out; max-width: 190px; diff --git a/apps/cowswap-frontend/src/cow-react/index.tsx b/apps/cowswap-frontend/src/cow-react/index.tsx index 550ac9907f..eb78e960c7 100644 --- a/apps/cowswap-frontend/src/cow-react/index.tsx +++ b/apps/cowswap-frontend/src/cow-react/index.tsx @@ -7,6 +7,7 @@ import { Provider as AtomProvider } from 'jotai' import { StrictMode } from 'react' import { BlockNumberProvider } from '@cowprotocol/common-hooks' +import { isInjectedWidget } from '@cowprotocol/common-utils' import { nodeRemoveChildFix } from '@cowprotocol/common-utils' import { jotaiStore } from '@cowprotocol/core' import { SnackbarsWidget } from '@cowprotocol/snackbars' @@ -41,6 +42,7 @@ if (window.ethereum) { } const root = createRoot(document.getElementById('root')!) +const isInjectedWidgetMode = isInjectedWidget() root.render( @@ -56,12 +58,18 @@ root.render( - - - + + {!isInjectedWidgetMode && ( + <> + + + + + + )} + - diff --git a/apps/cowswap-frontend/src/legacy/components/Copy/CopyMod.tsx b/apps/cowswap-frontend/src/legacy/components/Copy/CopyMod.tsx index 25d9bea369..22834dc072 100644 --- a/apps/cowswap-frontend/src/legacy/components/Copy/CopyMod.tsx +++ b/apps/cowswap-frontend/src/legacy/components/Copy/CopyMod.tsx @@ -13,6 +13,7 @@ import { UI } from 'common/constants/theme' // MOD imports export const CopyIcon = styled(LinkStyledButton)` + --iconSize: var(${UI.ICON_SIZE_NORMAL}); color: ${({ theme }) => theme.text3}; flex-shrink: 0; display: flex; @@ -22,8 +23,8 @@ export const CopyIcon = styled(LinkStyledButton)` font-size: 0.825rem; border-radius: 50%; background-color: transparent; - min-width: 20px; - min-height: 20px; + min-width: var(--iconSize); + min-height: var(--iconSize); align-self: flex-end; :hover, :active, diff --git a/apps/cowswap-frontend/src/legacy/components/ErrorBoundary/index.tsx b/apps/cowswap-frontend/src/legacy/components/ErrorBoundary/index.tsx index 74d286ca67..6cca9b4af0 100644 --- a/apps/cowswap-frontend/src/legacy/components/ErrorBoundary/index.tsx +++ b/apps/cowswap-frontend/src/legacy/components/ErrorBoundary/index.tsx @@ -1,10 +1,12 @@ import React, { ErrorInfo, PropsWithChildren } from 'react' import { sendError } from '@cowprotocol/analytics' +import { isInjectedWidget } from '@cowprotocol/common-utils' import * as Sentry from '@sentry/react' import styled from 'styled-components/macro' + import { ChunkLoadError } from 'legacy/components/ErrorBoundary/ChunkLoadError' import { ErrorWithStackTrace } from 'legacy/components/ErrorBoundary/ErrorWithStackTrace' import Footer from 'legacy/components/Footer' @@ -128,6 +130,8 @@ export default class ErrorBoundary extends React.Component + + {!isInjectedWidget() && @@ -137,6 +141,8 @@ export default class ErrorBoundary extends React.Component + } + {isChunkLoadError ? : }