diff --git a/src/assets/images/christmas/balloon.gif b/src/assets/images/christmas/balloon.gif new file mode 100644 index 000000000..8f4434078 Binary files /dev/null and b/src/assets/images/christmas/balloon.gif differ diff --git a/src/assets/images/christmas/bottomMenu.svg b/src/assets/images/christmas/bottomMenu.svg new file mode 100644 index 000000000..9ee3e0096 --- /dev/null +++ b/src/assets/images/christmas/bottomMenu.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/christmas/ic_future_noel.svg b/src/assets/images/christmas/ic_future_noel.svg new file mode 100644 index 000000000..12bdf9136 --- /dev/null +++ b/src/assets/images/christmas/ic_future_noel.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/images/christmas/ic_orderbook_noel.svg b/src/assets/images/christmas/ic_orderbook_noel.svg new file mode 100644 index 000000000..8587f0e67 --- /dev/null +++ b/src/assets/images/christmas/ic_orderbook_noel.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/images/christmas/linkActiveLeft.svg b/src/assets/images/christmas/linkActiveLeft.svg new file mode 100644 index 000000000..1ec2ab03c --- /dev/null +++ b/src/assets/images/christmas/linkActiveLeft.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/assets/images/christmas/linkActiveRight.svg b/src/assets/images/christmas/linkActiveRight.svg new file mode 100644 index 000000000..5cf52aa58 --- /dev/null +++ b/src/assets/images/christmas/linkActiveRight.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/assets/images/christmas/logo.svg b/src/assets/images/christmas/logo.svg new file mode 100644 index 000000000..b7c8f6660 --- /dev/null +++ b/src/assets/images/christmas/logo.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/christmas/pumkin_left.svg b/src/assets/images/christmas/pumkin_left.svg new file mode 100644 index 000000000..726963469 --- /dev/null +++ b/src/assets/images/christmas/pumkin_left.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/christmas/pumkin_right.svg b/src/assets/images/christmas/pumkin_right.svg new file mode 100644 index 000000000..9daf8526d --- /dev/null +++ b/src/assets/images/christmas/pumkin_right.svg @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/christmas/sleigh.gif b/src/assets/images/christmas/sleigh.gif new file mode 100644 index 000000000..daa8db480 Binary files /dev/null and b/src/assets/images/christmas/sleigh.gif differ diff --git a/src/assets/images/christmas/sleigh.svg b/src/assets/images/christmas/sleigh.svg new file mode 100644 index 000000000..a8e809b66 --- /dev/null +++ b/src/assets/images/christmas/sleigh.svg @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/christmas/snow_left.svg b/src/assets/images/christmas/snow_left.svg new file mode 100644 index 000000000..9e29c28b9 --- /dev/null +++ b/src/assets/images/christmas/snow_left.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/assets/images/christmas/snow_right.svg b/src/assets/images/christmas/snow_right.svg new file mode 100644 index 000000000..9ee4bb21c --- /dev/null +++ b/src/assets/images/christmas/snow_right.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/assets/images/christmas/star.svg b/src/assets/images/christmas/star.svg new file mode 100644 index 000000000..6f423bfae --- /dev/null +++ b/src/assets/images/christmas/star.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/config/eventConfig.tsx b/src/config/eventConfig.tsx index a330a689a..179af1821 100644 --- a/src/config/eventConfig.tsx +++ b/src/config/eventConfig.tsx @@ -2,6 +2,7 @@ import { EVENT_ENUM } from 'reducer/temporaryConfig'; import LogoFullImgDark from 'assets/images/OraiDEX_full_dark.svg'; import LogoFullImgLight from 'assets/images/OraiDEX_full_light.svg'; import LogoFullImgDarkHlw from 'assets/images/halloween/logo.svg'; +import LogoFullImgChristmas from 'assets/images/christmas/logo.svg'; import IconOrderBook from 'assets/icons/ic_orderbook.svg?react'; import IconFuture from 'assets/icons/ic_futures.svg?react'; import IconFutureHLW from 'assets/icons/halloween/ic_future_hlw.svg?react'; @@ -18,6 +19,19 @@ import btnSpiderRight from 'assets/images/halloween/spider_right.svg'; import btnSpiderLeft from 'assets/images/halloween/spider_left.svg'; import bottomHlwMenu from 'assets/images/halloween/bottomMenu.svg'; +import bottomNoelMenu from 'assets/images/christmas/bottomMenu.svg'; +import linkNoelActiveRight from 'assets/images/christmas/linkActiveRight.svg'; +import linkNoelActiveLeft from 'assets/images/christmas/linkActiveLeft.svg'; +import pumpkinNoelLeft from 'assets/images/christmas/pumkin_left.svg'; +import pumpkinNoelRight from 'assets/images/christmas/pumkin_right.svg'; +import bottomNoelBanner from 'assets/images/christmas/star.svg'; +import btnSnowRight from 'assets/images/christmas/snow_right.svg'; +import btnSnowLeft from 'assets/images/christmas/snow_left.svg'; +import IconFutureNoel from 'assets/images/christmas/ic_future_noel.svg?react'; +import IconOrderbookNoel from 'assets/images/christmas/ic_orderbook_noel.svg?react'; +import IconSleighNoel from 'assets/images/christmas/sleigh.gif'; +import IconBalloonNoel from 'assets/images/christmas/balloon.gif'; + export type ConfigTheme = { logo: string; animation: { @@ -114,6 +128,35 @@ export const lightConfig: Record = { } } } + }, + [EVENT_ENUM.christmas]: { + logo: LogoFullImgChristmas, + animation: { + topImg: IconBalloonNoel, + bottomImg: IconSleighNoel + }, + menu: { + orderBookIcon: IconOrderbookNoel, + futureIcon: IconFutureNoel + }, + sideBar: { + backgroundHover: '', + rightLinkImg: linkNoelActiveRight, + leftLinkImg: linkNoelActiveLeft, + bottomImg: bottomNoelMenu + }, + swapBox: { + top: '', + bottom: bottomNoelBanner, + inner: { + bottomRight: pumpkinNoelRight, + bottomLeft: pumpkinNoelLeft, + button: { + rightImg: btnSnowRight, + leftImg: btnSnowLeft + } + } + } } }; @@ -175,6 +218,35 @@ export const darkConfig: Record = { } } } + }, + [EVENT_ENUM.christmas]: { + logo: LogoFullImgChristmas, + animation: { + topImg: IconBalloonNoel, + bottomImg: IconSleighNoel + }, + menu: { + orderBookIcon: IconOrderbookNoel, + futureIcon: IconFutureNoel + }, + sideBar: { + backgroundHover: '', + rightLinkImg: linkNoelActiveRight, + leftLinkImg: linkNoelActiveLeft, + bottomImg: bottomNoelMenu + }, + swapBox: { + top: '', + bottom: bottomNoelBanner, + inner: { + bottomRight: pumpkinNoelRight, + bottomLeft: pumpkinNoelLeft, + button: { + rightImg: btnSnowRight, + leftImg: btnSnowLeft + } + } + } } }; diff --git a/src/layouts/Sidebar.module.scss b/src/layouts/Sidebar.module.scss index 47333c5e4..d8d98bf1b 100644 --- a/src/layouts/Sidebar.module.scss +++ b/src/layouts/Sidebar.module.scss @@ -70,12 +70,24 @@ } .eventItem { - .left { - transform: translate(0, 7px); + &.christmas { + .left { + transform: translate(0px, -15px); + } + + .right { + transform: translate(0px, -13px); + } } - .right { - transform: translate(1px, -9px); + &.halloween { + .left { + transform: translate(0, 7px); + } + + .right { + transform: translate(1px, -9px); + } } } } @@ -136,12 +148,24 @@ } &:hover { - .left { - transform: translate(0, 7px); + &.christmas { + .left { + transform: translate(0px, -15px); + } + + .right { + transform: translate(0px, -13px); + } } - .right { - transform: translate(1px, -9px); + &.halloween { + .left { + transform: translate(0, 7px); + } + + .right { + transform: translate(1px, -9px); + } } } } diff --git a/src/layouts/Sidebar.tsx b/src/layouts/Sidebar.tsx index 599207ce2..cb73e4912 100644 --- a/src/layouts/Sidebar.tsx +++ b/src/layouts/Sidebar.tsx @@ -46,7 +46,7 @@ const Sidebar: React.FC<{}> = React.memo(() => { }} rel="noreferrer" > -
+
{configTheme.sideBar.leftLinkImg && ( )} @@ -58,6 +58,8 @@ const Sidebar: React.FC<{}> = React.memo(() => { {title} ); + + const isActive = (link.includes(to) && link?.length === to?.length) || (link === '/' && to === '/universalswap'); return ( = React.memo(() => { className={classNames( styles.menu_item, { - [styles.active]: - (link.includes(to) && link?.length === to?.length) || (link === '/' && to === '/universalswap') + [styles.active]: isActive }, styles[theme] )} > -
+
{configTheme.sideBar.leftLinkImg && ( )} diff --git a/src/pages/Balance/TransferConvertToken/index.tsx b/src/pages/Balance/TransferConvertToken/index.tsx index d5b1ea9b2..8a32e1eb8 100644 --- a/src/pages/Balance/TransferConvertToken/index.tsx +++ b/src/pages/Balance/TransferConvertToken/index.tsx @@ -493,14 +493,8 @@ const TransferConvertToken: FC = ({ evmChains.find((chain) => chain.chainId === token.chainId) || btcChains.find((chain) => chain.chainId !== token.chainId) ) { - const isBridgeOraichainToSolana = toNetworkChainId === solChainId; - const isOraiOrMaxInSol = - toNetworkChainId === 'Oraichain' && - (token.coinGeckoId === 'max-2' || token.coinGeckoId === 'oraichain-token'); const isValidateFeeTon = bridgeFeeTon ? convertAmount < bridgeFeeTon : false; const isDisabled = - isOraiOrMaxInSol || - isBridgeOraichainToSolana || transferLoading || !addressTransfer || receivedAmount < 0 || diff --git a/src/pages/Pool-V3/components/PoolList/index.tsx b/src/pages/Pool-V3/components/PoolList/index.tsx index 0e796b3d9..7fbae7289 100644 --- a/src/pages/Pool-V3/components/PoolList/index.tsx +++ b/src/pages/Pool-V3/components/PoolList/index.tsx @@ -187,8 +187,8 @@ const PoolList = ({ search, filterType }: { search: string; filterType: POOL_TYP }; }) .sort((a, b) => { - const aIsPrioritized = a.tokenXinfo.denom === prioritizePool; - const bIsPrioritized = b.tokenXinfo.denom === prioritizePool; + const aIsPrioritized = a.tokenXinfo?.denom === prioritizePool; + const bIsPrioritized = b.tokenXinfo?.denom === prioritizePool; if (aIsPrioritized && !bIsPrioritized) return CoefficientBySort[SortType.DESC]; if (bIsPrioritized && !aIsPrioritized) return CoefficientBySort[SortType.ASC]; diff --git a/src/pages/UniversalSwap/Swap/index.module.scss b/src/pages/UniversalSwap/Swap/index.module.scss index 4b22d2873..2fe4593f6 100644 --- a/src/pages/UniversalSwap/Swap/index.module.scss +++ b/src/pages/UniversalSwap/Swap/index.module.scss @@ -542,6 +542,17 @@ display: flex; align-items: center; justify-content: space-between; + + &.christmas { + .left { + transform: translate(20px, 10px); + } + + .right { + z-index: 1000; + transform: translate(-10px, 0px); + } + } } .priceImpact { @@ -761,9 +772,21 @@ align-items: center; justify-content: space-between; + &.christmas { + .left { + transform: translate(0%, -10px); + } + + .right { + transform: translate(5px, 0px); + } + } + img { transition: all ease-in-out 0.2s; + } + &.halloween { &.left { transform: translateX(-100%); } @@ -774,12 +797,24 @@ } &:hover { - .left { - transform: translateX(0%); + &.christmas { + .left { + transform: translateX(0%); + } + + .right { + transform: translate(5px, 0px); + } } - .right { - transform: translateX(0); + &.halloween { + .left { + transform: translateX(0%); + } + + .right { + transform: translateX(0); + } } } } diff --git a/src/pages/UniversalSwap/Swap/index.tsx b/src/pages/UniversalSwap/Swap/index.tsx index 641444cc9..a9105301d 100644 --- a/src/pages/UniversalSwap/Swap/index.tsx +++ b/src/pages/UniversalSwap/Swap/index.tsx @@ -86,6 +86,7 @@ import { useFillToken } from './hooks/useFillToken'; import useHandleEffectTokenChange from './hooks/useHandleEffectTokenChange'; import styles from './index.module.scss'; import TonWallet from '@oraichain/tonbridge-sdk/build/wallet'; +import classNames from 'classnames'; const cx = cn.bind(styles); @@ -834,7 +835,7 @@ const SwapComponent: React.FC<{
-
+
{configTheme.swapBox.inner.bottomLeft && ( )} @@ -866,7 +867,7 @@ const SwapComponent: React.FC<{ disabled={disabledSwapBtn} > {!disabledSwapBtn && ( -
+
{configTheme.swapBox.inner.button.leftImg && ( )} diff --git a/src/pages/UniversalSwap/index.module.scss b/src/pages/UniversalSwap/index.module.scss index 026c4535a..d8d88fc3d 100644 --- a/src/pages/UniversalSwap/index.module.scss +++ b/src/pages/UniversalSwap/index.module.scss @@ -4,39 +4,76 @@ width: 100%; height: 100vh; position: absolute; + &.christmas { + .top { + position: sticky; + top: 68px; + left: 0; - .top { - position: sticky; - top: 68px; - left: 0; + width: 100px; + height: 119px; + z-index: 30; - width: 100px; - height: 119px; - z-index: 30; + @include medium-desktop { + width: 70px; + height: 89px; + } - @include medium-desktop { - width: 70px; - height: 89px; + @include mobile { + width: 70px; + height: 89px; + } } - @include mobile { - width: 70px; - height: 89px; + .bottom { + z-index: 30; + position: fixed; + right: -5px; + bottom: -10px; + + width: 221.82px; + height: 156px; + + @include mobile { + display: none; + } } } - .bottom { - z-index: 30; - position: fixed; - right: -50px; - bottom: -50px; + &.halloween { + .top { + position: sticky; + top: 68px; + left: 0; - width: 136.764px; - height: 193px; - transform: rotate(-12deg); + width: 100px; + height: 119px; + z-index: 30; - @include mobile { - display: none; + @include medium-desktop { + width: 70px; + height: 89px; + } + + @include mobile { + width: 70px; + height: 89px; + } + } + + .bottom { + z-index: 30; + position: fixed; + right: -50px; + bottom: -50px; + + width: 136.764px; + height: 193px; + transform: rotate(-12deg); + + @include mobile { + display: none; + } } } } @@ -93,8 +130,10 @@ position: sticky; top: 800px; margin-top: 32px; - + width: 200px; + height: 60px; @include mobile { + left: 30%; margin-bottom: -100px; } } diff --git a/src/pages/UniversalSwap/index.tsx b/src/pages/UniversalSwap/index.tsx index cccc77779..7c0fa3dd7 100644 --- a/src/pages/UniversalSwap/index.tsx +++ b/src/pages/UniversalSwap/index.tsx @@ -27,6 +27,7 @@ import { initPairSwap } from './Swap/hooks/useFillToken'; import { NetworkFilter, TYPE_TAB_HISTORY, initNetworkFilter } from './helpers'; import { ChartTokenType, useChartUsdPrice } from './hooks/useChartUsdPrice'; import styles from './index.module.scss'; +import classNames from 'classnames'; const cx = cn.bind(styles); @@ -77,7 +78,7 @@ const Swap: React.FC = () => { return ( <> {(configTheme.animation.topImg || configTheme.animation.bottomImg) && ( -
+
{configTheme.animation.topImg && } {configTheme.animation.bottomImg && ( diff --git a/src/reducer/temporaryConfig.ts b/src/reducer/temporaryConfig.ts index 4254cca31..e973be8f2 100644 --- a/src/reducer/temporaryConfig.ts +++ b/src/reducer/temporaryConfig.ts @@ -3,8 +3,8 @@ import { createSlice } from '@reduxjs/toolkit'; export enum EVENT_ENUM { normal = 'normal', - halloween = 'halloween' - // christmas = 'christmas' + halloween = 'halloween', + christmas = 'christmas' } export interface TemporaryConfigState { @@ -14,7 +14,7 @@ export interface TemporaryConfigState { const initialState: TemporaryConfigState = { customBanner: true, - event: EVENT_ENUM.normal + event: EVENT_ENUM.christmas }; export const temporaryConfigSlice = createSlice({