From e8b6d9f81d24b30774f9c018eae069e9b4683c8e Mon Sep 17 00:00:00 2001 From: saml33 Date: Wed, 6 Dec 2023 22:28:13 +1100 Subject: [PATCH] add some styling and move to deposit modal --- components/TopBar.tsx | 14 - components/modals/BridgeModal.tsx | 306 +++++++++++---------- components/modals/DepositWithdrawModal.tsx | 74 +++-- public/locales/en/common.json | 1 + public/locales/es/common.json | 1 + public/locales/ru/common.json | 1 + public/locales/zh/common.json | 1 + public/locales/zh_tw/common.json | 1 + styles/colors.ts | 28 ++ utils/constants.ts | 4 +- yarn.lock | 27 +- 11 files changed, 245 insertions(+), 213 deletions(-) diff --git a/components/TopBar.tsx b/components/TopBar.tsx index 2c944426..066ec789 100644 --- a/components/TopBar.tsx +++ b/components/TopBar.tsx @@ -42,7 +42,6 @@ import FormatNumericValue from './shared/FormatNumericValue' import { useRouter } from 'next/router' import TopBarStore from '@store/topBarStore' import MedalIcon from './icons/MedalIcon' -import BridgeModal from './modals/BridgeModal' export const TOPBAR_ICON_BUTTON_CLASSES = 'relative flex h-16 w-10 sm:w-16 items-center justify-center sm:border-l sm:border-th-bkg-3 focus-visible:bg-th-bkg-3 md:hover:bg-th-bkg-2' @@ -72,7 +71,6 @@ const TopBar = () => { const [showDepositWithdrawModal, setShowDepositWithdrawModal] = useState(false) const [showCreateAccountModal, setShowCreateAccountModal] = useState(false) - const [showBridgeModal, setShowBridgeModal] = useState(false) const { showSettingsModal, setShowSettingsModal } = TopBarStore() const isOnline = useOnlineStatus() @@ -274,15 +272,6 @@ const TopBar = () => { )} -
- -
+ ) : null} + + {showBridgeModal ? ( + setShowBridgeModal(false)} + /> + ) : null} + ) } diff --git a/public/locales/en/common.json b/public/locales/en/common.json index e9235582..7adee0f5 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -34,6 +34,7 @@ "borrow-fee": "Borrow Fee", "borrow-funds": "Borrow Funds", "borrow-rate": "Borrow APR", + "bridge-wormhole": "Bridge from another chain via Wormhole", "buy": "Buy", "cancel": "Cancel", "chart-unavailable": "Chart Unavailable", diff --git a/public/locales/es/common.json b/public/locales/es/common.json index e9235582..7adee0f5 100644 --- a/public/locales/es/common.json +++ b/public/locales/es/common.json @@ -34,6 +34,7 @@ "borrow-fee": "Borrow Fee", "borrow-funds": "Borrow Funds", "borrow-rate": "Borrow APR", + "bridge-wormhole": "Bridge from another chain via Wormhole", "buy": "Buy", "cancel": "Cancel", "chart-unavailable": "Chart Unavailable", diff --git a/public/locales/ru/common.json b/public/locales/ru/common.json index e9235582..7adee0f5 100644 --- a/public/locales/ru/common.json +++ b/public/locales/ru/common.json @@ -34,6 +34,7 @@ "borrow-fee": "Borrow Fee", "borrow-funds": "Borrow Funds", "borrow-rate": "Borrow APR", + "bridge-wormhole": "Bridge from another chain via Wormhole", "buy": "Buy", "cancel": "Cancel", "chart-unavailable": "Chart Unavailable", diff --git a/public/locales/zh/common.json b/public/locales/zh/common.json index 89e57cf4..02755519 100644 --- a/public/locales/zh/common.json +++ b/public/locales/zh/common.json @@ -34,6 +34,7 @@ "borrow-fee": "借贷费用", "borrow-funds": "进行借贷", "borrow-rate": "借贷APR", + "bridge-wormhole": "Bridge from another chain via Wormhole", "buy": "买", "cancel": "取消", "chart-unavailable": "无法显示图表", diff --git a/public/locales/zh_tw/common.json b/public/locales/zh_tw/common.json index 39ea6a71..56180534 100644 --- a/public/locales/zh_tw/common.json +++ b/public/locales/zh_tw/common.json @@ -34,6 +34,7 @@ "borrow-fee": "借貸費用", "borrow-funds": "進行借貸", "borrow-rate": "借貸APR", + "bridge-wormhole": "Bridge from another chain via Wormhole", "buy": "買", "cancel": "取消", "chart-unavailable": "無法顯示圖表", diff --git a/styles/colors.ts b/styles/colors.ts index 324582e8..02256fd4 100644 --- a/styles/colors.ts +++ b/styles/colors.ts @@ -55,6 +55,20 @@ export const COLORS: Record> = { Bonk: '#DDA131', Pepe: '#51833F', }, + FGD1: { + 'Mango Classic': '#E6E4EC', + Dark: '#d1d1d1', + Light: '#141414', + 'High Contrast': '#fff', + Avocado: '#EAF1EA', + Medium: '#ccc', + Blueberry: '#EEF2FC', + Banana: '#272720', + Lychee: '#54181B', + Olive: '#F3F1DD', + Bonk: '#FFFEFA', + Pepe: '#F0F7EE', + }, FGD4: { 'Mango Classic': '#9189ae', Dark: '#858585', @@ -69,6 +83,20 @@ export const COLORS: Record> = { Bonk: '#F3E9AA', Pepe: '#88BD75', }, + BUTTON: { + 'Mango Classic': '#794CA9', + Dark: '#616161', + Light: '#d6d6d6', + 'High Contrast': '#F3FA19', + Avocado: '#1E674A', + Medium: '#6e6e6e', + Blueberry: '#0A4ED6', + Banana: '#FBE774', + Lychee: '#EBADB1', + Olive: '#7F7A62', + Bonk: '#AC5039', + Pepe: '#338415', + }, UP: { 'Mango Classic': '#89B92A', Dark: '#4aa13a', diff --git a/utils/constants.ts b/utils/constants.ts index b8ffab67..46f71dce 100644 --- a/utils/constants.ts +++ b/utils/constants.ts @@ -106,9 +106,9 @@ export const MIN_SOL_BALANCE = 0.001 export const MAX_PRIORITY_FEE_KEYS = 128 -export const ACCOUNT_ACTION_MODAL_HEIGHT = '488px' +export const ACCOUNT_ACTION_MODAL_HEIGHT = '498px' -export const ACCOUNT_ACTION_MODAL_INNER_HEIGHT = '426px' +export const ACCOUNT_ACTION_MODAL_INNER_HEIGHT = '436px' export const TRADE_VOLUME_ALERT_KEY = 'tradeVolumeAlert-0.1' diff --git a/yarn.lock b/yarn.lock index c5693572..988297ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17,14 +17,7 @@ resolved "https://registry.yarnpkg.com/@apocentre/alias-sampling/-/alias-sampling-0.5.3.tgz#897ff181b48ad7b2bcb4ecf29400214888244f08" integrity sha512-7UDWIIF9hIeJqfKXkNIzkVandlwLf1FWTSdrb9iXvOP8oF544JRXQjCbiTmCv2c9n44n/FIWtehhBfNuAx2CZA== -"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.5", "@babel/runtime@^7.17.2", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.5", "@babel/runtime@^7.23.2": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.4.tgz#36fa1d2b36db873d25ec631dcc4923fdc1cf2e2e" - integrity sha512-2Yv65nlWnWlSpe3fXEyX5i7fx5kIKo4Qbcj+hMO0odwaneFjfXw5fdum+4yL20O0QiaHpia0cYQ9xpNMqrBwHg== - dependencies: - regenerator-runtime "^0.14.0" - -"@babel/runtime@^7.23.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7": +"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.5", "@babel/runtime@^7.17.2", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.5", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7": version "7.23.5" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.5.tgz#11edb98f8aeec529b82b211028177679144242db" integrity sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w== @@ -2768,12 +2761,7 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== -"@types/prop-types@*": - version "15.7.5" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" - integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== - -"@types/prop-types@^15.7.11": +"@types/prop-types@*", "@types/prop-types@^15.7.11": version "15.7.11" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.11.tgz#2596fb352ee96a1379c657734d4b913a613ad563" integrity sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng== @@ -7433,7 +7421,7 @@ postcss@8.4.12: picocolors "^1.0.0" source-map-js "^1.0.2" -postcss@8.4.31: +postcss@8.4.31, postcss@^8.4.23, postcss@^8.4.4: version "8.4.31" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d" integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== @@ -7442,15 +7430,6 @@ postcss@8.4.31: picocolors "^1.0.0" source-map-js "^1.0.2" -postcss@^8.4.23, postcss@^8.4.4: - version "8.4.29" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.29.tgz#33bc121cf3b3688d4ddef50be869b2a54185a1dd" - integrity sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw== - dependencies: - nanoid "^3.3.6" - picocolors "^1.0.0" - source-map-js "^1.0.2" - preact@10.4.1: version "10.4.1" resolved "https://registry.yarnpkg.com/preact/-/preact-10.4.1.tgz#9b3ba020547673a231c6cf16f0fbaef0e8863431"