feat: show H5 wallet

This commit is contained in:
Alisa | Side.one 2023-05-29 18:03:09 +08:00
parent deba817806
commit 16335bd081

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { useBaseStore, useBlockchain, useWalletStore } from '@/stores';
import { Icon } from '@iconify/vue';
import { ref, computed, } from 'vue';
import { ref, computed } from 'vue';
const walletStore = useWalletStore();
const chainStore = useBlockchain();
@ -38,7 +38,7 @@ const tipMsg = computed(() => {
<div class="dropdown dropdown-hover dropdown-end">
<label
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" />
<span class="ml-1 hidden md:block">
@ -47,7 +47,7 @@ const tipMsg = computed(() => {
</label>
<div
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
v-if="!walletStore?.currentAddress"
@ -71,19 +71,19 @@ const tipMsg = computed(() => {
</a>
<div class="divider mt-1 mb-1"></div>
<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"
>Accounts</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"
>Portfolio</RouterLink
>
<div v-if="walletStore.currentAddress" class="divider mt-1 mb-1"></div>
<a
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()"
>Disconnect</a
>
@ -91,14 +91,14 @@ const tipMsg = computed(() => {
</div>
<div class="toast" v-show="showCopyToast === 1">
<div class="alert alert-success">
<div class="text-sm">
<div class="text-xs md:!text-sm">
<span>{{ tipMsg.msg }}</span>
</div>
</div>
</div>
<div class="toast" v-show="showCopyToast === 2">
<div class="alert alert-error">
<div class="text-sm">
<div class="text-xs md:!text-sm">
<span>{{ tipMsg.msg }}</span>
</div>
</div>