-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New page allowing to blend NFTs airdropped.
- Loading branch information
1 parent
e23c5c0
commit 13089a1
Showing
12 changed files
with
543 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<template> | ||
<q-img | ||
v-if="uri !== null" | ||
:src="uri" | ||
:class="nftClass" | ||
fit="scaled-down" | ||
spinner-color="white" | ||
style="max-width: 300px; height: 300px;" | ||
/> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Prop, Vue } from 'vue-property-decorator' | ||
@Component | ||
export default class NftPicture extends Vue { | ||
@Prop({ type: String, required: true }) uri!: string | ||
@Prop({ type: Boolean, default: false }) disabled!: boolean | ||
get nftClass() { | ||
if (this.disabled) { | ||
return 'nft-disabled' | ||
} else { | ||
return '' | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="sass" scoped> | ||
.nft-disabled | ||
opacity: 0.2 | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<template> | ||
<div class="col-xl-3 col-lg-3 col-md-4 col-sm-8 col-xs-12 flex"> | ||
<q-card class="nft-card fit text-white"> | ||
<q-item> | ||
<q-item-section> | ||
<q-item-label> | ||
<div class="text-bold">{{ data.name }}</div> | ||
</q-item-label> | ||
</q-item-section> | ||
<q-item-section side> | ||
<q-item-label class="text-right text-bold">Qty: {{ data.balance }}</q-item-label> | ||
</q-item-section> | ||
</q-item> | ||
<q-separator class="bg-secondary" /> | ||
<q-card-section class="text-center"> | ||
<nft-picture :uri="data.image" :disabled="data.balance === 0" /> | ||
</q-card-section> | ||
<q-separator class="bg-secondary" /> | ||
<q-card-actions class="nft-actions"> | ||
<q-btn-group outline spread class="fit"> | ||
<q-btn @click="buyOrSell()" color="primary" class="fit" flat>Buy/Sell</q-btn> | ||
</q-btn-group> | ||
</q-card-actions> | ||
</q-card> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Prop, Vue } from 'vue-property-decorator' | ||
import { namespace } from 'vuex-class' | ||
import NftPicture from '@/components/nft/NftPicture.vue' | ||
import NftData from '@/models/nft/NftData' | ||
import { openURL } from 'quasar' | ||
const nftStore = namespace('nft') | ||
@Component({ | ||
components: { | ||
NftPicture | ||
} | ||
}) | ||
export default class NftReward extends Vue { | ||
@Prop({ type: String, required: true }) nftId!: string | ||
@Prop({ type: Object, required: true }) data!: NftData | ||
@nftStore.Getter('uri') | ||
uriTemplate!: string | ||
name = '' | ||
description = '' | ||
uri = '' | ||
static NFT_REWARDS_CONTRACT: string = process.env.VUE_APP_NFT_REWARDS_CONTRACT || '' | ||
static NFT_OPENSEA_URL: string = process.env.VUE_APP_NFT_OPENSEA_URL || '' | ||
buyOrSell() { | ||
openURL(`${NftReward.NFT_OPENSEA_URL}/${NftReward.NFT_REWARDS_CONTRACT}/${this.nftId}`) | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="sass" scoped> | ||
@import '@/styles/quasar.sass' | ||
.nft-card | ||
background-color: lighten($secondary, 10%) !important | ||
.nft-actions | ||
background-color: lighten($secondary, 10%) !important | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { WBANLPRewards } from "wban-nfts" | ||
|
||
type ClaimGoldenRequest = { | ||
contract: WBANLPRewards | ||
account: string | ||
level: number | ||
} | ||
|
||
export default ClaimGoldenRequest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { WBANLPRewards } from "wban-nfts" | ||
|
||
type LoadBalanceRequest = { | ||
contract: WBANLPRewards | ||
account: string | ||
} | ||
|
||
export default LoadBalanceRequest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type NftData = { | ||
id: string | ||
name: string | ||
description: string | ||
image: string | ||
balance: number | ||
} | ||
|
||
export default NftData |
Oops, something went wrong.