Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Hotfix 1.7.3 - Winter has come #2018

Merged
merged 2 commits into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "CowSwap - Gnosis Protocol",
"homepage": ".",
"private": true,
"version": "1.7.2",
"version": "1.7.3",
"engines": {
"node": ">=14.0.0"
},
Expand Down Expand Up @@ -208,6 +208,7 @@
"react-appzi": "^1.0.4",
"react-inlinesvg": "^2.3.0",
"react-router-hash-link": "^2.4.0",
"react-snowfall": "^1.1.1",
"simple-sitemap-renderer": "^1.1.0",
"timeago.js": "^4.0.2"
}
Expand Down
Binary file removed public/audio/mooooo-error__lower-30.mp3
Binary file not shown.
Binary file removed public/audio/mooooo-error__lower-50.mp3
Binary file not shown.
Binary file removed public/audio/mooooo-send__lower-30.mp3
Binary file not shown.
Binary file removed public/audio/mooooo-send__lower-50.mp3
Binary file not shown.
Binary file removed public/audio/mooooo-send__lower-80.mp3
Binary file not shown.
Binary file added public/audio/mooooo-send__winter-edition.mp3
Binary file not shown.
Binary file removed public/audio/mooooo-success__ben.m4a
Binary file not shown.
Binary file removed public/audio/mooooo-success__ben__lower-30.mp3
Binary file not shown.
Binary file removed public/audio/mooooo-success__ben__lower-50.mp3
Binary file not shown.
Binary file added src/custom/assets/cow-swap/santa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 38 additions & 2 deletions src/custom/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ import { formatSmart } from 'utils/format'
import NetworkCard, { NetworkInfo } from './NetworkCard'
import SVG from 'react-inlinesvg'

// Winter edition
import SantaHat from 'assets/cow-swap/santa.png'
import Snowfall from 'react-snowfall'

export const NETWORK_LABELS: { [chainId in ChainId]?: string } = {
[ChainId.RINKEBY]: 'Rinkeby',
// [ChainId.ROPSTEN]: 'Ropsten',
Expand Down Expand Up @@ -157,19 +161,48 @@ export const TwitterLink = styled(StyledMenuButton)`
}
`

export const LogoImage = styled.div`
export const LogoImage = styled.div<{ darkMode: boolean }>`
width: 190px;
height: 48px;
background: ${({ theme }) => `url(${theme.logo.src}) no-repeat center/contain`};
margin: 0 32px 0 0;
position: relative;

// Winter edition
${({ darkMode }) =>
darkMode &&
`&::before {
content: '';
display: block;
position: absolute;
top: -22px;
left: 0;
height: 50px;
width: 40px;
background: url(${SantaHat}) no-repeat center/contain;
}`}

${({ theme }) => theme.mediaWidth.upToSmall`
width: 160px;

&::before {
top: -16px;
left: 0;
height: 42px;
width: 35px;
}
`}

${({ theme }) => theme.mediaWidth.upToVerySmall`
background: ${({ theme }) => `url(${theme.logo.srcIcon}) no-repeat left/contain`};
height: 34px;

&::before {
top: -19px;
left: 0;
height: 42px;
width: 29px;
}
`}

> svg {
Expand Down Expand Up @@ -215,7 +248,7 @@ export default function Header() {
<HeaderRow marginRight="0">
<Title href=".">
<UniIcon>
<LogoImage />
<LogoImage darkMode={darkMode} />
</UniIcon>
</Title>
<HeaderLinks>
Expand Down Expand Up @@ -249,6 +282,9 @@ export default function Header() {
</HeaderControls>
{isOrdersPanelOpen && <OrdersPanel closeOrdersPanel={closeOrdersPanel} />}
</HeaderModWrapper>

{/* // mod */}
{darkMode && <Snowfall snowflakeCount={100} />}
</Wrapper>
)
}
2 changes: 1 addition & 1 deletion src/custom/state/orders/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type SoundType = 'SEND' | 'SUCCESS' | 'ERROR'
type Sounds = Record<SoundType, string>

const COW_SOUNDS: Sounds = {
SEND: '/audio/mooooo-send__lower-90.mp3',
SEND: '/audio/mooooo-send__winter-edition.mp3',
SUCCESS: '/audio/mooooo-success__ben__lower-90.mp3',
ERROR: '/audio/mooooo-error__lower-90.mp3',
}
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18068,7 +18068,7 @@ react-error-overlay@^6.0.9:
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.9.tgz#3c743010c9359608c375ecd6bc76f35d93995b0a"
integrity sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew==

react-fast-compare@^3.0.1:
react-fast-compare@^3.0.1, react-fast-compare@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb"
integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==
Expand Down Expand Up @@ -18290,6 +18290,13 @@ react-scripts@^4.0.3:
optionalDependencies:
fsevents "^2.1.3"

react-snowfall@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/react-snowfall/-/react-snowfall-1.1.1.tgz#bdd5e43ed622606fb6fdb9f1c82ca367608e65db"
integrity sha512-SREER5iikqVY8Fu0BpaYllzGHB1iKZacXY76E/rW1n1zKUH5ClqVWG1UZS+3fR6OTg9GkeGG459juSnARVoNGQ==
dependencies:
react-fast-compare "^3.2.0"

react-spring@^8.0.27:
version "8.0.27"
resolved "https://registry.yarnpkg.com/react-spring/-/react-spring-8.0.27.tgz#97d4dee677f41e0b2adcb696f3839680a3aa356a"
Expand Down