Merge remote-tracking branch 'origin/v3-single' into v3-single

This commit is contained in:
liangping 2023-05-03 13:57:50 +08:00
commit 19f5f21ab6
10 changed files with 4723 additions and 44 deletions

View File

@ -21,6 +21,7 @@
"@cosmjs/encoding": "^0.29.5",
"@floating-ui/dom": "^1.2.0",
"@iconify/vue": "^4.1.0",
"@injectivelabs/wallet-ts": "^1.10.69",
"@intlify/unplugin-vue-i18n": "^0.8.2",
"@osmonauts/lcd": "^0.8.0",
"@ping-pub/chain-registry-client": "^0.0.25",
@ -31,6 +32,7 @@
"apexcharts": "^3.37.1",
"autoprefixer": "^10.4.14",
"axios": "^1.3.2",
"buffer": "^6.0.3",
"cross-fetch": "^3.1.5",
"dayjs": "^1.11.7",
"long": "^5.2.1",

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -0,0 +1,85 @@
<script lang="ts" setup>
import { Wallet } from '@injectivelabs/wallet-ts';
import { useWalletStore } from '@/stores'
import MetaLogo from '@/assets/wallet/metamask.png';
import KeplrLogo from '@/assets/wallet/keplr.png';
import LedgerLogo from '@/assets/wallet/ledger.png';
const isDialogVisible = ref(false)
interface WalletItem {
logo: string;
name: string;
wallet: Wallet;
discription: string;
}
const wallets: WalletItem[] = [
{
logo: MetaLogo,
name: 'Metamask',
wallet: Wallet.Metamask,
discription: '',
},
{
logo: KeplrLogo,
name: 'Keplr',
wallet: Wallet.Keplr,
discription: '',
},
{
logo: LedgerLogo,
name: 'Ledger',
wallet: Wallet.Ledger,
discription: '',
},
];
const store = useWalletStore();
</script>
<template>
<VDialog
v-model="isDialogVisible"
persistent
class="v-dialog-sm"
>
<!-- Dialog Activator -->
<template #activator="{ props }">
<VBtn v-bind="props">
Connect Wallet
</VBtn>
</template>
<!-- Dialog Content -->
<VCard title="Connect Wallet">
<DialogCloseBtn
variant="text"
size="small"
@click="isDialogVisible = false"
/>
<VCardText>
</VCardText>
<VCardActions>
<VSpacer />
<VBtn
color="error"
@click="isDialogVisible = false"
>
Disagree
</VBtn>
<VBtn
color="success"
@click="isDialogVisible = false"
>
Agree
</VBtn>
</VCardActions>
</VCard>
</VDialog>
</template>

View File

@ -15,6 +15,7 @@ import NavSearchBar from './NavSearchBar.vue';
import NavBarNotifications from './NavBarNotifications.vue';
import TheCustomizer from '@/plugins/vuetify/@core/components/TheCustomizer.vue';
import Breadcrumbs from './Breadcrumbs.vue';
import ConnectWallet from '@/components/dialogs/ConnectWallet.vue'
import { useBlockchain } from '@/stores';
const {
@ -66,6 +67,7 @@ blockchain.$subscribe((m, s) => {
<NavBarNotifications class="hidden md:inline-block" />
<NavBarI18n class="hidden md:inline-block" />
<NavbarThemeSwitcher class="hidden md:inline-block" />
<ConnectWallet class="md:inline-block"/>
</div>
</template>

View File

@ -6,6 +6,8 @@ import UptimeBar from '@/components/UptimeBar.vue';
import type { Commit } from '@/types'
import { consensusPubkeyToHexAddress, valconsToBase64 } from "@/libs";
const props = defineProps(['chain'])
const stakingStore = useStakingStore();
const baseStore = useBaseStore();
const chainStore = useBlockchain()
@ -78,7 +80,7 @@ onUnmounted(() => {
<VRow>
<VCol v-for="(v, i) in validators" cols="12" md="3" xl="2" class="py-1">
<div class="d-flex justify-between">
<span class="text-truncate">{{i + 1}}. {{v.description.moniker}}</span>
<span class="text-truncate"> {{i + 1}}. <RouterLink class="" :to="`/${props.chain}/staking/${v.operator_address}`"> {{v.description.moniker}} </RouterLink></span>
<VChip v-if="Number(signingInfo[consensusPubkeyToHexAddress(v.consensus_pubkey)]?.missed_blocks_counter || 0) > 0" size="small" class="mb-1" label color="error">{{ signingInfo[consensusPubkeyToHexAddress(v.consensus_pubkey)]?.missed_blocks_counter }}</VChip>
<VChip v-else size="small" class="mb-1" label color="success">{{ signingInfo[consensusPubkeyToHexAddress(v.consensus_pubkey)]?.missed_blocks_counter }}</VChip>
</div>

View File

@ -8,4 +8,5 @@ export * from './useGovStore'
export * from './useMintStore'
export * from './useStakingStore'
export * from './useDistributionStore'
export * from './useParamsStore'
export * from './useParamsStore'
export * from './useWalletStore'

View File

@ -0,0 +1,13 @@
import { defineStore } from "pinia";
export const useWalletStore = defineStore('walletStore', {
state: () => {
return {
}
},
getters: {
},
actions: {
}
})

4658
yarn.lock

File diff suppressed because it is too large Load Diff