forked from cerc-io/cosmos-explorer
feat: show H5 wallet
This commit is contained in:
parent
deba817806
commit
16335bd081
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useBaseStore, useBlockchain, useWalletStore } from '@/stores';
|
import { useBaseStore, useBlockchain, useWalletStore } from '@/stores';
|
||||||
import { Icon } from '@iconify/vue';
|
import { Icon } from '@iconify/vue';
|
||||||
import { ref, computed, } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
|
|
||||||
const walletStore = useWalletStore();
|
const walletStore = useWalletStore();
|
||||||
const chainStore = useBlockchain();
|
const chainStore = useBlockchain();
|
||||||
@ -38,7 +38,7 @@ const tipMsg = computed(() => {
|
|||||||
<div class="dropdown dropdown-hover dropdown-end">
|
<div class="dropdown dropdown-hover dropdown-end">
|
||||||
<label
|
<label
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
class="btn btn-sm btn-primary m-1 lowercase hidden truncate md:!inline-flex text-xs md:!text-sm"
|
class="btn btn-sm btn-primary m-1 lowercase truncate !inline-flex text-xs md:!text-sm"
|
||||||
>
|
>
|
||||||
<Icon icon="mdi:wallet" />
|
<Icon icon="mdi:wallet" />
|
||||||
<span class="ml-1 hidden md:block">
|
<span class="ml-1 hidden md:block">
|
||||||
@ -47,7 +47,7 @@ const tipMsg = computed(() => {
|
|||||||
</label>
|
</label>
|
||||||
<div
|
<div
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
class="dropdown-content menu shadow p-2 bg-base-100 rounded w-64 overflow-auto"
|
class="dropdown-content menu shadow p-2 bg-base-100 rounded w-52 md:!w-64 overflow-auto"
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
v-if="!walletStore?.currentAddress"
|
v-if="!walletStore?.currentAddress"
|
||||||
@ -71,19 +71,19 @@ const tipMsg = computed(() => {
|
|||||||
</a>
|
</a>
|
||||||
<div class="divider mt-1 mb-1"></div>
|
<div class="divider mt-1 mb-1"></div>
|
||||||
<RouterLink
|
<RouterLink
|
||||||
class="block py-2 px-2 hover:bg-gray-100 dark:hover:bg-[#353f5a] rounded cursor-pointer"
|
class="block py-1 px-1 md:!py-2 md:!px-2 hover:bg-gray-100 dark:hover:bg-[#353f5a] rounded cursor-pointer"
|
||||||
to="/wallet/accounts"
|
to="/wallet/accounts"
|
||||||
>Accounts</RouterLink
|
>Accounts</RouterLink
|
||||||
>
|
>
|
||||||
<RouterLink
|
<RouterLink
|
||||||
class="block py-2 px-2 hover:bg-gray-100 dark:hover:bg-[#353f5a] rounded cursor-pointer"
|
class="block py-1 px-1 md:!py-2 md:!px-2 hover:bg-gray-100 dark:hover:bg-[#353f5a] rounded cursor-pointer"
|
||||||
to="/wallet/portfolio"
|
to="/wallet/portfolio"
|
||||||
>Portfolio</RouterLink
|
>Portfolio</RouterLink
|
||||||
>
|
>
|
||||||
<div v-if="walletStore.currentAddress" class="divider mt-1 mb-1"></div>
|
<div v-if="walletStore.currentAddress" class="divider mt-1 mb-1"></div>
|
||||||
<a
|
<a
|
||||||
v-if="walletStore.currentAddress"
|
v-if="walletStore.currentAddress"
|
||||||
class="block py-2 px-2 hover:bg-gray-100 dark:hover:bg-[#353f5a] rounded cursor-pointer"
|
class="py-1 px-1 block md:!py-2 md:!px-2 hover:bg-gray-100 dark:hover:bg-[#353f5a] rounded cursor-pointer"
|
||||||
@click="walletStore.disconnect()"
|
@click="walletStore.disconnect()"
|
||||||
>Disconnect</a
|
>Disconnect</a
|
||||||
>
|
>
|
||||||
@ -91,14 +91,14 @@ const tipMsg = computed(() => {
|
|||||||
</div>
|
</div>
|
||||||
<div class="toast" v-show="showCopyToast === 1">
|
<div class="toast" v-show="showCopyToast === 1">
|
||||||
<div class="alert alert-success">
|
<div class="alert alert-success">
|
||||||
<div class="text-sm">
|
<div class="text-xs md:!text-sm">
|
||||||
<span>{{ tipMsg.msg }}</span>
|
<span>{{ tipMsg.msg }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="toast" v-show="showCopyToast === 2">
|
<div class="toast" v-show="showCopyToast === 2">
|
||||||
<div class="alert alert-error">
|
<div class="alert alert-error">
|
||||||
<div class="text-sm">
|
<div class="text-xs md:!text-sm">
|
||||||
<span>{{ tipMsg.msg }}</span>
|
<span>{{ tipMsg.msg }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user