update slideoutpanel, open errors tokeninit
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
import { storeToRefs } from "pinia";
|
||||
import { ref, onMounted, onBeforeUnmount, inject } from "vue";
|
||||
import { useWalletStoreV2 } from "@/stores/walletV2";
|
||||
import { getblocky } from "@/helper/helper.js";
|
||||
|
||||
const emit = defineEmits(["showPanel"]);
|
||||
|
||||
const walletStore = useWalletStoreV2();
|
||||
@@ -13,8 +15,7 @@ const showNavbar = ref(true);
|
||||
const lastScrollPosition = ref(0);
|
||||
|
||||
function onScroll() {
|
||||
const currentScrollPosition =
|
||||
window.pageYOffset || document.documentElement.scrollTop;
|
||||
const currentScrollPosition = window.pageYOffset || document.documentElement.scrollTop;
|
||||
if (currentScrollPosition < 0) {
|
||||
return;
|
||||
}
|
||||
@@ -67,10 +68,13 @@ onBeforeUnmount(() => {
|
||||
<div v-if="!isMobile">
|
||||
<!-- <div v-if="!connected" class="btn btn-immortal" @click="walletStore.connectWallet">connect</div> -->
|
||||
<div v-if="!address" class="btn btn-immortal" @click="showPanel = true">connect</div>
|
||||
<span v-else @click="showPanel = true"> {{ address }}</span>
|
||||
<span v-else @click="showPanel = true"> test</span>
|
||||
</div>
|
||||
<div v-else class="hamburger-menu" @click="showPanel = true">
|
||||
<font-awesome-icon :icon="['fas', 'bars']" />
|
||||
<div v-else @click="showPanel = true">
|
||||
<div class="login-icon" v-if="!address">
|
||||
<font-awesome-icon :icon="['fas', 'fa-arrow-right-to-bracket']" />
|
||||
</div>
|
||||
<div v-else><img :src="getblocky(address)" alt="avatar" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -133,7 +137,19 @@ header
|
||||
.navbar-end
|
||||
display: flex
|
||||
margin-left: auto
|
||||
.hamburger-menu
|
||||
color: var(--purple)
|
||||
font-size: 42px
|
||||
.login-icon
|
||||
color: var(--white)
|
||||
background-color: var(--purple)
|
||||
padding: 8px
|
||||
font-size: 25px
|
||||
border-radius: 8px
|
||||
width: 44px
|
||||
height: 44px
|
||||
display: flex
|
||||
justify-content: center
|
||||
align-items: center
|
||||
img
|
||||
width: 32px
|
||||
height: 32px
|
||||
border-radius: 8px
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user