From e420fe5c08fa27a9c301bd2e6b19c5d24bde2c82 Mon Sep 17 00:00:00 2001 From: Christopher Cali Date: Mon, 6 Nov 2023 16:41:42 -0500 Subject: [PATCH 1/7] Update Connect Wallet button to show user logged in state --- apps/web/src/layouts/default-layout.vue | 134 +++++++++++++++++++----- 1 file changed, 109 insertions(+), 25 deletions(-) diff --git a/apps/web/src/layouts/default-layout.vue b/apps/web/src/layouts/default-layout.vue index 958b2ad6f..771cb7329 100644 --- a/apps/web/src/layouts/default-layout.vue +++ b/apps/web/src/layouts/default-layout.vue @@ -3,14 +3,16 @@ import { ref, onMounted, onUnmounted } from "vue" import router from "@/composables/router" import VueFeather from "vue-feather" import useAuth from "@/composables/auth" +import useFormat from "@/composables/format" import useScreenDimensions from "@/composables/screenDimensions" import useUser from "@/composables/user" import useWallets from "@/composables/wallets" import ConnectWalletsFlow from "@/components/ConnectWalletsFlow.vue" -const { screenWidth } = useScreenDimensions() const { logout } = useAuth() +const { convertString } = useFormat() +const { screenWidth } = useScreenDimensions() const { user } = useUser() const { detectInstalledWalletProviders } = useWallets() @@ -19,6 +21,7 @@ const openRouterMenu = ref(false) const openWalletsModal = ref(false) const show_setting_modal = ref(false) +const showUserAddressesModal = ref(false) async function handleConnectWalletButtonClick() { openWalletsModal.value = true @@ -48,6 +51,20 @@ const handleOutsideClick = (event: any) => { authFlowCardNumber.value = 1 } } + + const user_addresses_modal = document.getElementById("user_addresses_modal") + const connect_wallet_button = document.getElementById("connect_wallet_button") + if (user_addresses_modal && connect_wallet_button) { + if (showUserAddressesModal.value) { + if (!user_addresses_modal.contains(event.target)) { + showUserAddressesModal.value = false + } + } else { + if (connect_wallet_button.contains(event.target)) { + showUserAddressesModal.value = true + } + } + } } const doesScrollBarExist = ref(true) @@ -158,6 +175,7 @@ const toggleModal = (showModal: boolean) => {
+ - - -
+ +
+ +
+ +
-
@@ -243,6 +306,11 @@ const toggleModal = (showModal: boolean) => { \ No newline at end of file From 74a133266c7cb870ed11659c0b1221597d0fcd64 Mon Sep 17 00:00:00 2001 From: Christopher Cali Date: Mon, 6 Nov 2023 16:52:06 -0500 Subject: [PATCH 2/7] Add a star on user's primary address in dropdown --- apps/web/src/layouts/default-layout.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/web/src/layouts/default-layout.vue b/apps/web/src/layouts/default-layout.vue index 771cb7329..f4f2d9444 100644 --- a/apps/web/src/layouts/default-layout.vue +++ b/apps/web/src/layouts/default-layout.vue @@ -230,6 +230,13 @@ const toggleModal = (showModal: boolean) => {
{{ convertString(account.address) }}
+
  • Date: Mon, 6 Nov 2023 16:53:52 -0500 Subject: [PATCH 3/7] Add cursor-default to Goerli Testnet --- apps/web/src/layouts/default-layout.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/web/src/layouts/default-layout.vue b/apps/web/src/layouts/default-layout.vue index f4f2d9444..e9fd8a980 100644 --- a/apps/web/src/layouts/default-layout.vue +++ b/apps/web/src/layouts/default-layout.vue @@ -175,7 +175,9 @@ const toggleModal = (showModal: boolean) => {
    - +
    + Goerli Testnet +
    - - -
    -
      - +
      +