forked from cerc-io/cosmos-explorer
add donation address
This commit is contained in:
parent
bab7192206
commit
9917b2c534
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<p class="clearfix mb-0">
|
||||
<span class="float-md-left d-block d-md-inline-block mt-25">
|
||||
<span class="float-md-left d-none d-md-block d-md-inline-block mt-25">
|
||||
Powered By
|
||||
<b-link
|
||||
class="ml-25 font-weight-bolder"
|
||||
@ -9,11 +9,13 @@
|
||||
>Ping.pub</b-link>
|
||||
</span>
|
||||
|
||||
<span class="float-md-right d-none d-md-block">Buy me a cup of coffee.
|
||||
<router-link
|
||||
v-ripple.400="'rgba(113, 102, 240, 0.15)'"
|
||||
class="float-md-right"
|
||||
to="/coffee"
|
||||
>Buy me a cup of coffee.
|
||||
<span
|
||||
v-b-popover.hover.topleft="'Atom: cosmos1ev0vtddkl7jlwfawlk06yzncapw2x9quyxx75u'"
|
||||
v-ripple.400="'rgba(113, 102, 240, 0.15)'"
|
||||
title="Thanks for your donation!"
|
||||
variant="outline-primary"
|
||||
>
|
||||
<feather-icon
|
||||
@ -22,7 +24,7 @@
|
||||
class="text-danger stroke-current"
|
||||
/>
|
||||
</span>
|
||||
</span>
|
||||
</router-link>
|
||||
</p>
|
||||
</template>
|
||||
|
||||
|
79
src/@core/layouts/components/Coffee.vue
Normal file
79
src/@core/layouts/components/Coffee.vue
Normal file
@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-row>
|
||||
<b-col
|
||||
v-for="(item, i) in chains"
|
||||
:key="`coffee-${item.addr}-${i}`"
|
||||
md="4"
|
||||
>
|
||||
<b-input-group
|
||||
size="sm"
|
||||
class="input-group-merge mb-10"
|
||||
>
|
||||
<b-input-group-prepend is-text>
|
||||
<b-avatar
|
||||
:src="item.icon"
|
||||
variant="light-primary"
|
||||
size="16"
|
||||
/>
|
||||
</b-input-group-prepend>
|
||||
<b-form-input :value="item.addr" />
|
||||
</b-input-group>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<operation-transfer-component
|
||||
:recipient-address.sync="selectedAddress"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
BRow, BCol,
|
||||
BAvatar, BFormInput, BInputGroupPrepend, BInputGroup,
|
||||
} from 'bootstrap-vue'
|
||||
import Ripple from 'vue-ripple-directive'
|
||||
import {
|
||||
addressEnCode, addressDecode,
|
||||
} from '@/libs/utils'
|
||||
import OperationTransferComponent from '@/views/OperationTransferComponent.vue'
|
||||
|
||||
export default {
|
||||
name: 'AppFooter',
|
||||
components: {
|
||||
BCol,
|
||||
BRow,
|
||||
BAvatar,
|
||||
BFormInput,
|
||||
BInputGroupPrepend,
|
||||
BInputGroup,
|
||||
OperationTransferComponent,
|
||||
},
|
||||
directives: {
|
||||
Ripple,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedAddress: 'cosmos1ev0vtddkl7jlwfawlk06yzncapw2x9quyxx75u',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
chains() {
|
||||
const { data } = addressDecode('cosmos1ev0vtddkl7jlwfawlk06yzncapw2x9quyxx75u')
|
||||
const config = Object.values(JSON.parse(localStorage.getItem('chains')))
|
||||
.map(x => ({
|
||||
addr: addressEnCode(x.addr_prefix, data),
|
||||
icon: x.logo,
|
||||
}))
|
||||
return config
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
transfer(addr) {
|
||||
this.selectedAddress = addr
|
||||
this.$bvModal.show('transfer-window')
|
||||
console.log(this.selectedAddress)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
@ -54,6 +54,20 @@ const router = new VueRouter({
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/coffee',
|
||||
name: 'coffee',
|
||||
component: () => import('@core/layouts/components/Coffee.vue'),
|
||||
meta: {
|
||||
pageTitle: 'Donation',
|
||||
breadcrumb: [
|
||||
{
|
||||
text: 'Buy me a cup of coffee!',
|
||||
active: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/wallet/accounts',
|
||||
alias: '/wallet',
|
||||
|
@ -290,6 +290,10 @@ export default {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
recipientAddress: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -299,7 +303,7 @@ export default {
|
||||
token: '',
|
||||
amount: null,
|
||||
memo: '',
|
||||
recipient: null,
|
||||
recipient: this.recipientAddress,
|
||||
fee: '800',
|
||||
feeDenom: '',
|
||||
wallet: 'ledgerUSB',
|
||||
|
Loading…
Reference in New Issue
Block a user