From 69f2749f115e90621c553c8d401566212c7003b1 Mon Sep 17 00:00:00 2001 From: Lionell Briones Date: Wed, 31 Jan 2024 12:29:02 +0800 Subject: [PATCH 1/2] responsive + openlogin details --- src/components/CardHeading/CardHeading.vue | 26 +++--- src/components/LoginDetails/LoginDetails.vue | 55 +++--------- src/components/LoginForm/LoginForm.vue | 68 -------------- src/components/LoginForm/index.ts | 1 - src/components/Navbar/Navbar.vue | 10 +-- .../OpenloginDetails/OpenloginDetails.vue | 51 +++++------ src/components/Steps/Steps.vue | 4 +- src/components/TopupDetails/TopupDetails.vue | 2 +- .../WalletConnectDetails.vue | 1 + src/constants/common.ts | 89 +------------------ src/routes.ts | 18 ++-- src/views/Home.vue | 42 ++++++--- src/views/Steps.vue | 7 ++ 13 files changed, 109 insertions(+), 265 deletions(-) delete mode 100644 src/components/LoginForm/LoginForm.vue delete mode 100644 src/components/LoginForm/index.ts create mode 100644 src/views/Steps.vue diff --git a/src/components/CardHeading/CardHeading.vue b/src/components/CardHeading/CardHeading.vue index 88e2613..315f0e3 100644 --- a/src/components/CardHeading/CardHeading.vue +++ b/src/components/CardHeading/CardHeading.vue @@ -1,15 +1,17 @@ @@ -31,8 +33,4 @@ withDefaults( const emits = defineEmits(['onClick']) - + diff --git a/src/components/LoginDetails/LoginDetails.vue b/src/components/LoginDetails/LoginDetails.vue index 331d702..20e79bc 100644 --- a/src/components/LoginDetails/LoginDetails.vue +++ b/src/components/LoginDetails/LoginDetails.vue @@ -6,8 +6,11 @@ import { getCountryName, getBrowserName, getOSName, getTruncateString } from '@/ import CardHeading from '../CardHeading' import { useWeb3authStore } from '@/store/web3authStore' +import { ROUTES } from '@/constants/common' +import { useRouter } from 'vue-router' const web3Auth = useWeb3authStore() +const router = useRouter() const openConsole = ref(false) const isCopied = ref(false) @@ -41,6 +44,10 @@ const handleCopyAddress = () => { }, 1000) } +const onViewSteps = () => { + router.push({ name: ROUTES.STEPS }) +} + const returnAvatarLetter = (name: string) => { if (!name) return 'W3A' if (name.includes('@')) { @@ -61,54 +68,14 @@ const returnAvatarLetter = (name: string) => { :show-btn="false" />
- - - - - - - + -->
{
- + > -
-
- -

Sign in

-

- Your blockchain wallet in one-click -

- - - -

- We do not store any data related to your social logins. -

-
-
- web3auth logo -
-
- - - - - diff --git a/src/components/LoginForm/index.ts b/src/components/LoginForm/index.ts deleted file mode 100644 index 53ce3c7..0000000 --- a/src/components/LoginForm/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './LoginForm.vue' diff --git a/src/components/Navbar/Navbar.vue b/src/components/Navbar/Navbar.vue index 1cbc37a..18fe23d 100644 --- a/src/components/Navbar/Navbar.vue +++ b/src/components/Navbar/Navbar.vue @@ -24,9 +24,9 @@ const getStepLogo = (url: string) => { return new URL(`../../assets/images/${url}.svg`, import.meta.url).href } -const handleMenuClick = (index: number) => { +const handleMenuClick = (route: string) => { isMenuOpen.value = false - emits('onMenuClick', index) + router.push({ name: route }) } const logout = async () => { @@ -68,7 +68,7 @@ const isLoggedIn = computed(() => web3Auth.isLoggedIn)