diff --git a/packages/bridge-ui-v2/.eslintrc.cjs b/packages/bridge-ui-v2/.eslintrc.cjs
index 70d7556f37d..b7041ba5134 100644
--- a/packages/bridge-ui-v2/.eslintrc.cjs
+++ b/packages/bridge-ui-v2/.eslintrc.cjs
@@ -33,6 +33,7 @@ module.exports = {
// TS will take care of this potential error. For more information please visit:
// https://typescript-eslint.io/linting/troubleshooting/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
'no-undef': 'off',
+ '@typescript-eslint/ban-ts-comment': 'off',
},
},
],
diff --git a/packages/bridge-ui-v2/src/components/Header/Header.svelte b/packages/bridge-ui-v2/src/components/Header/Header.svelte
index 5f4172ef08a..209e3913e26 100644
--- a/packages/bridge-ui-v2/src/components/Header/Header.svelte
+++ b/packages/bridge-ui-v2/src/components/Header/Header.svelte
@@ -1,24 +1,50 @@
-
+
+ {#if connected}
+
+ {:else}
+
+
+ {/if}
+
-
-
-
diff --git a/packages/bridge-ui-v2/src/components/Spinner/Spinner.svelte b/packages/bridge-ui-v2/src/components/Spinner/Spinner.svelte
new file mode 100644
index 00000000000..7d55bb1247f
--- /dev/null
+++ b/packages/bridge-ui-v2/src/components/Spinner/Spinner.svelte
@@ -0,0 +1,13 @@
+
+
+
diff --git a/packages/bridge-ui-v2/src/components/Spinner/index.ts b/packages/bridge-ui-v2/src/components/Spinner/index.ts
new file mode 100644
index 00000000000..cd9bd18a8df
--- /dev/null
+++ b/packages/bridge-ui-v2/src/components/Spinner/index.ts
@@ -0,0 +1 @@
+export { default as Spinner } from './Spinner.svelte';
diff --git a/packages/bridge-ui-v2/src/i18n/en.json b/packages/bridge-ui-v2/src/i18n/en.json
index ad07357f539..adcd3937c29 100644
--- a/packages/bridge-ui-v2/src/i18n/en.json
+++ b/packages/bridge-ui-v2/src/i18n/en.json
@@ -88,11 +88,11 @@
},
"wallet": {
- "connect": "Connect Wallet",
+ "connect": "Connect wallet",
"status": {
"disconnected": "Disconnected",
"connected": "Connected",
- "connecting": "Connecting..."
+ "connecting": "Connecting"
}
}
}
diff --git a/packages/bridge-ui-v2/src/libs/connect/web3modal.ts b/packages/bridge-ui-v2/src/libs/connect/web3modal.ts
index c16d8bed689..786e52b96c3 100644
--- a/packages/bridge-ui-v2/src/libs/connect/web3modal.ts
+++ b/packages/bridge-ui-v2/src/libs/connect/web3modal.ts
@@ -1,7 +1,7 @@
import { EthereumClient } from '@web3modal/ethereum';
import { Web3Modal } from '@web3modal/html';
-import { PUBLIC_WALLETCONNECT_PROJECT_ID } from '$env/static/public';
+import { PUBLIC_L1_CHAIN_ID, PUBLIC_L2_CHAIN_ID, PUBLIC_WALLETCONNECT_PROJECT_ID } from '$env/static/public';
import { chains } from '$libs/chain';
import { wagmiConfig } from '$libs/wagmi';
@@ -12,18 +12,54 @@ const ethereumClient = new EthereumClient(wagmiConfig, chains);
export const web3modal = new Web3Modal(
{
projectId,
+ chainImages: {
+ [PUBLIC_L1_CHAIN_ID]: '/ethereum-chain.png',
+ [PUBLIC_L2_CHAIN_ID]: '/taiko-chain.png',
+ },
// TODO: can we bring these vars into Tailwind theme?
themeVariables: {
- '--w3m-background-border-radius': '1.25rem',
- '--w3m-container-border-radius': '0rem',
- '--w3m-font-family': 'Public Sans, system-ui, sans-serif',
- '--w3m-button-border-radius': '9999px',
+ '--w3m-font-family': '"Public Sans", sans-serif',
+ '--w3m-font-feature-settings': 'normal',
+
'--w3m-accent-color': 'var(--primary-interactive)',
'--w3m-accent-fill-color': 'var(--primary-content)',
+
+ '--w3m-button-border-radius': '9999px',
+
+ // Body small regular
+ '--w3m-text-small-regular-size': '14px',
+ '--w3m-text-small-regular-weight': '400',
+ '--w3m-text-small-regular-line-height': '20px',
+
+ // Body regular
+ '--w3m-text-medium-regular-size': '16px',
+ '--w3m-text-medium-regular-weight': '400',
+ '--w3m-text-medium-regular-line-height': '24px',
+ '--w3m-text-medium-regular-letter-spacing': 'normal',
+
+ // Title body bold
+ '--w3m-text-big-bold-size': '18px',
+ '--w3m-text-big-bold-weight': '700',
+ '--w3m-text-big-bold-line-height': '24px',
+
'--w3m-background-color': 'var(--neutral-background)',
- // '--w3m-color-bg-1': 'var(--primary-background)',
+ '--w3m-overlay-background-color': 'var(--overlay-background)',
+ '--w3m-background-border-radius': '20px',
+ '--w3m-container-border-radius': '0',
+
// TODO: customize the rest of the theme variables
+
+ // Unofficial variables
+ // @ts-ignore
+ '--w3m-color-fg-1': 'var(--primary-content)',
+ // '--w3m-color-fg-2': '',
+ // '--w3m-color-fg-3': '',
+ '--w3m-color-bg-1': 'var(--primary-background)',
+ '--w3m-color-bg-2': 'var(--neutral-background)',
+ // '--w3m-color-bg-3': '',
+ // '--w3m-color-overlay': 'var(--neutral-background)',
},
+ themeMode: (localStorage.getItem('theme') as 'dark' | 'light') ?? 'dark',
},
ethereumClient,
);
diff --git a/packages/bridge-ui-v2/src/routes/+layout.svelte b/packages/bridge-ui-v2/src/routes/+layout.svelte
index b7982abb634..d8bcc5efc5b 100644
--- a/packages/bridge-ui-v2/src/routes/+layout.svelte
+++ b/packages/bridge-ui-v2/src/routes/+layout.svelte
@@ -7,13 +7,16 @@
import { Header } from '$components/Header';
import { SideNavigation } from '$components/SideNavigation';
import { startWatching, stopWatching } from '$libs/wagmi';
+ import { account } from '$stores/account';
+
+ $: connected = Boolean($account?.isConnected);
onMount(startWatching);
onDestroy(stopWatching);
-
+
diff --git a/packages/bridge-ui-v2/src/styles/base.css b/packages/bridge-ui-v2/src/styles/base.css
index afbf5d06851..fc354f0b5b0 100644
--- a/packages/bridge-ui-v2/src/styles/base.css
+++ b/packages/bridge-ui-v2/src/styles/base.css
@@ -2,7 +2,7 @@
@layer base {
html {
- font-family: Public Sans, system-ui, sans-serif;
+ font-family: 'Public Sans', sans-serif;
}
html,
diff --git a/packages/bridge-ui-v2/src/styles/utilities.css b/packages/bridge-ui-v2/src/styles/utilities.css
index 554183513e1..55a2ebda795 100644
--- a/packages/bridge-ui-v2/src/styles/utilities.css
+++ b/packages/bridge-ui-v2/src/styles/utilities.css
@@ -21,11 +21,8 @@
@apply sticky top-0;
}
- /* TODO: shadow color, vertical length and blur radius are hardcoded */
- .hide-under-b {
- /* primary-background[#0B101B => grey-900] */
- @apply shadow-[0_5px_10px_0_#0B101B];
- clip-path: inset(0px 0px -10px 0px);
+ .glassy-primary-background {
+ @apply bg-grey-900/60 backdrop-filter backdrop-blur-sm;
}
/* Flex shortcuts */
diff --git a/packages/bridge-ui-v2/static/ethereum-chain.png b/packages/bridge-ui-v2/static/ethereum-chain.png
new file mode 100644
index 00000000000..b2d2552ebdf
Binary files /dev/null and b/packages/bridge-ui-v2/static/ethereum-chain.png differ
diff --git a/packages/bridge-ui-v2/static/taiko-chain.png b/packages/bridge-ui-v2/static/taiko-chain.png
new file mode 100644
index 00000000000..19408015866
Binary files /dev/null and b/packages/bridge-ui-v2/static/taiko-chain.png differ