update desktop resize
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<div class="blood-chart-coin">
|
||||
<img :src="getImageUrl(coin.vamplogo)" alt="logo" />
|
||||
</div>
|
||||
<div class="blood-chart-coin-title">{{ coin.name }}</div>
|
||||
<div class="blood-chart-coin-title low-mid-text">{{ coin.name }}</div>
|
||||
</div>
|
||||
<div class="blood-chart-element-body">
|
||||
<div class="blood-chart-bar-wrapper">
|
||||
@@ -68,7 +68,7 @@
|
||||
<!-- {{ compactNumber(coin.amount) }} -->
|
||||
{{ coin.amount.toFixed(2) }}
|
||||
</div>
|
||||
<div class="blood-chart-coin">$BLOOD</div>
|
||||
<div>$BLOOD</div>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
|
||||
@@ -117,7 +117,10 @@
|
||||
<use xlink:href="#gentle-wave" x="48" y="7" fill="#8B0000" />
|
||||
</g>
|
||||
</svg>
|
||||
<div class="blood-chart-bar" :style="`height: ${getPercentage(coin.amount, props.data.goal)}%`">
|
||||
<div
|
||||
class="blood-chart-bar"
|
||||
:style="`height: ${getPercentageBloodChart(coin.amount, props.data.goal)}%`"
|
||||
>
|
||||
<div class="wrapper">
|
||||
<div><span class="dot"></span></div>
|
||||
<div><span class="dot"></span></div>
|
||||
@@ -194,6 +197,16 @@ const token = computed(() => props.data?.token);
|
||||
// icon: "/assets/img/token/elonvamp.png",
|
||||
// },
|
||||
// ];
|
||||
|
||||
function getPercentageBloodChart(amount, goal) {
|
||||
let returnNumber = 5;
|
||||
if ((Number(amount) / Number(goal)) * 100 < 5) {
|
||||
returnNumber = 5;
|
||||
} else {
|
||||
returnNumber = (Number(amount) / Number(goal)) * 100;
|
||||
}
|
||||
return returnNumber.toFixed(2);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="sass">
|
||||
@@ -216,25 +229,31 @@ const token = computed(() => props.data?.token);
|
||||
.blood-chart-element
|
||||
height: 100%
|
||||
width: 80px
|
||||
@media (min-width: 992px)
|
||||
width: 60px
|
||||
|
||||
display: flex
|
||||
flex-direction: column
|
||||
.blood-chart-element-header
|
||||
flex: 0 0 100px
|
||||
.blood-chart-coin
|
||||
height: 80px
|
||||
width: 80px
|
||||
border-radius: 80px
|
||||
margin-left: auto
|
||||
margin-right: auto
|
||||
position: relative
|
||||
margin-bottom: 16px
|
||||
overflow: hidden
|
||||
height: 80px
|
||||
width: 80px
|
||||
@media (min-width: 992px)
|
||||
height: 60px
|
||||
width: 60px
|
||||
img
|
||||
height: 100%
|
||||
width: 100%
|
||||
.blood-chart-coin-title
|
||||
text-align: center
|
||||
margin-bottom: 32px
|
||||
font-size: 16px
|
||||
@media (min-width: 992px)
|
||||
font-size: 24px
|
||||
.blood-chart-element-body
|
||||
background-color: rgba(233, 233, 233, 0.2)
|
||||
flex: 0 0 500px
|
||||
@@ -261,8 +280,6 @@ const token = computed(() => props.data?.token);
|
||||
.blood-chart-amount
|
||||
font-size: 24px
|
||||
margin-bottom: 8px
|
||||
.blood-chart-coin
|
||||
font-size: 16px
|
||||
|
||||
|
||||
.swiper-slide
|
||||
|
||||
@@ -93,6 +93,7 @@ function openUnstake() {
|
||||
display: flex
|
||||
text-align: left
|
||||
gap: 16px
|
||||
height: 56px
|
||||
.token-logo
|
||||
margin-left: auto
|
||||
.connected-stake-buttons
|
||||
|
||||
@@ -179,6 +179,7 @@ async function connectWallet(connector) {
|
||||
display: flex
|
||||
gap: 16px
|
||||
align-items: center
|
||||
height: 56px
|
||||
.connected-token-button
|
||||
margin-left: auto
|
||||
.bloodline-badge
|
||||
|
||||
@@ -9,28 +9,7 @@
|
||||
<div class="navbar-text">
|
||||
<router-link to="/">Bloodline</router-link>
|
||||
</div>
|
||||
<div class="navbar-center" v-if="!isMobile">
|
||||
<!-- <div class="navbar-social-links">
|
||||
<div class="social-bloodline-badge">
|
||||
<div class="social-bloodline-badge-icon">
|
||||
<font-awesome-icon icon="fa-brands fa-discord" />
|
||||
</div>
|
||||
<div class="social-bloodline-badge-text">Discord</div>
|
||||
</div>
|
||||
<div class="social-bloodline-badge">
|
||||
<div class="social-bloodline-badge-icon">
|
||||
<font-awesome-icon icon="fa-brands fa-telegram" />
|
||||
</div>
|
||||
<div class="social-bloodline-badge-text">Telegram</div>
|
||||
</div>
|
||||
<div class="social-bloodline-badge">
|
||||
<div class="social-bloodline-badge-icon">
|
||||
<font-awesome-icon icon="fa-brands fa-twitter" />
|
||||
</div>
|
||||
<div class="social-bloodline-badge-text">Twitter</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="navbar-center" v-if="!isMobile"></div>
|
||||
<div class="navbar-end">
|
||||
<div class="navbar-navigation mid-text" v-if="!isMobile">
|
||||
<div
|
||||
@@ -128,10 +107,6 @@ onBeforeUnmount(() => {
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
// margin-bottom: 82px
|
||||
// @media (min-width: 992px)
|
||||
// margin-bottom: 128px
|
||||
|
||||
.navbar
|
||||
position: fixed
|
||||
z-index: 3
|
||||
@@ -142,7 +117,7 @@ onBeforeUnmount(() => {
|
||||
transition: transform .3s ease,visibility 0s .3s linear
|
||||
height: 82px
|
||||
@media (min-width: 992px)
|
||||
height: 128px
|
||||
height: 96px
|
||||
// &.navbar--hidden
|
||||
// transform: translate3d(0,-100%,0)
|
||||
.navbar-inner
|
||||
@@ -158,8 +133,8 @@ onBeforeUnmount(() => {
|
||||
height: 50px
|
||||
width: 50px
|
||||
@media (min-width: 992px)
|
||||
height: 75px
|
||||
width: 75px
|
||||
height: 56px
|
||||
width: 56px
|
||||
|
||||
.navbar-text
|
||||
font-family: 'Vampire', sans-serif
|
||||
@@ -168,7 +143,7 @@ onBeforeUnmount(() => {
|
||||
letter-spacing: 0.138em
|
||||
line-height: 73.107px
|
||||
@media (min-width: 992px)
|
||||
font-size: 64px
|
||||
font-size: 48px
|
||||
a
|
||||
text-decoration: none
|
||||
color: white
|
||||
@@ -237,6 +212,6 @@ onBeforeUnmount(() => {
|
||||
&:hover,&:active,&:focus
|
||||
cursor: pointer
|
||||
img
|
||||
width: 45px
|
||||
height: 45px
|
||||
width: 32px
|
||||
height: 32px
|
||||
</style>
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
{{ props.title }}
|
||||
</div>
|
||||
<div class="rewards-inner">
|
||||
<div class="rewards-body">
|
||||
<div class="rewards-coin low-mid-text">$BLOOD</div>
|
||||
<div class="rewards-amount">{{ props.amount }}</div>
|
||||
</div>
|
||||
<img class="bloodline-token" :src="props.image" alt="vampir" />
|
||||
<token-name-price name="$BLOOD" :price="props.amount"></token-name-price>
|
||||
<token-logo :img="props.image" :alt="'vampire'"></token-logo>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TokenNamePrice from "@/components/TokenNamePrice.vue";
|
||||
import TokenLogo from "@/components/TokenLogo.vue";
|
||||
|
||||
const props = defineProps({
|
||||
title: String,
|
||||
info: String,
|
||||
@@ -27,20 +27,12 @@ const props = defineProps({
|
||||
display: flex
|
||||
flex-direction: column
|
||||
gap: 8px
|
||||
.rewards-inner, .rewards-clan-wrapper
|
||||
padding: 6px 0
|
||||
.rewards-inner
|
||||
display: flex
|
||||
padding: 0 8px 8px 8px
|
||||
padding: 0 6px 6px 6px
|
||||
border-bottom: 1px solid var(--grey, #858585)
|
||||
.rewards-body
|
||||
align-self: center
|
||||
.rewards-amount
|
||||
text-align: left
|
||||
font-size: 24px
|
||||
margin-top: 8px
|
||||
@media (min-width: 992px)
|
||||
font-size: 40px
|
||||
margin-top: 0
|
||||
img
|
||||
margin-left: auto
|
||||
align-self: center
|
||||
justify-content: space-between
|
||||
height: 56px
|
||||
box-sizing: content-box
|
||||
</style>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<img v-if="isMobile" :src="token.logoMobile" alt="token logo" />
|
||||
<img v-if="!isMobile" :src="token.logo" alt="token logo" />
|
||||
</div>
|
||||
<div class="sacrifice-token-name">{{ token.name }}</div>
|
||||
<div class="sacrifice-token-name mid-text">{{ token.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -49,9 +49,18 @@
|
||||
<div class="sacrifice-adder-step bloodline-badge" @click="addTokens(100000000)">+100m</div>
|
||||
<div class="sacrifice-adder-step bloodline-badge" @click="addTokens(1000000000)">+1b</div>
|
||||
</template>
|
||||
<template v-slot:message-end>
|
||||
<div class="input-balance tiny-text">
|
||||
Balance:
|
||||
{{
|
||||
walletStore.token.find((obj) => obj.contractAddress === activeToken.contractAddress)
|
||||
.balanceOf
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
</token-input>
|
||||
</div>
|
||||
<div class="sacrifice-divider bloodline-devider">
|
||||
<div class="bloodline-devider">
|
||||
<font-awesome-icon :icon="['fas', 'arrow-down']" />
|
||||
</div>
|
||||
<div
|
||||
@@ -62,15 +71,11 @@
|
||||
purple: output && output > 0,
|
||||
}"
|
||||
>
|
||||
<div class="sarcrifice-to-input">
|
||||
<div class="sacrifice-to-output">
|
||||
<div class="sacrifice-to-output-coin">$BLOOD</div>
|
||||
<div class="sacrifice-to-output-rewards header">{{ output.toFixed(5) }}</div>
|
||||
</div>
|
||||
<div class="sacrifice-logo">
|
||||
<img :src="activeToken.vamp?.logo" :alt="activeToken.vamp?.name" />
|
||||
</div>
|
||||
<div class="sacrifice-to-body">
|
||||
<token-name-price name="$BLOOD" :price="`≈${output?.toFixed(5)}`"></token-name-price>
|
||||
<token-logo img="/assets/img/token/bloodline.png" :alt="'bloodline logo'"></token-logo>
|
||||
</div>
|
||||
|
||||
<div class="sacrifice-staking-bonus">
|
||||
<div
|
||||
class="sacrifice-staking-bonus-inner"
|
||||
@@ -101,7 +106,7 @@
|
||||
<img src="/assets/img/fuel-noozle.png" alt="fuel noozle" />
|
||||
</div>
|
||||
<div class="sacrifice-fees-body">
|
||||
<div class="sacrifice-fees-body-header">
|
||||
<div class="sacrifice-fees-body-header mid-text">
|
||||
<div class="sacrifice-fees-body-header-title">Gas Subsidy</div>
|
||||
<div class="sacrifice-fees-body-header-amount">≤30 Gwei</div>
|
||||
</div>
|
||||
@@ -109,6 +114,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="sacrifice-buttons-function-wrapper">
|
||||
{{ stateComputed }}
|
||||
<template v-if="walletStore.connected">
|
||||
<div class="btn btn-immortal sub-header" disabled v-if="stateComputed === 0">Enter Amount</div>
|
||||
<div
|
||||
@@ -154,6 +160,8 @@ import { useUniswapStore } from "@/stores/uniswap";
|
||||
import StakeComponentV1 from "@/components/StakeComponentV1.vue";
|
||||
import LoadingComponent from "@/components/LoadingComponent.vue";
|
||||
import TokenInput from "@/components/TokenInput.vue";
|
||||
import TokenNamePrice from "@/components/TokenNamePrice.vue";
|
||||
import TokenLogo from "@/components/TokenLogo.vue";
|
||||
import StakeSuccessToast from "@/components/toasts/StakeSuccessToast.vue";
|
||||
import { useToast } from "vue-toastification";
|
||||
|
||||
@@ -262,6 +270,7 @@ onBeforeUnmount(() => {
|
||||
});
|
||||
|
||||
async function sacrificeToken(amount) {
|
||||
console.log("sacrificeToken");
|
||||
try {
|
||||
state.value = 2;
|
||||
const getRewards = await getRewardsFor(amount);
|
||||
@@ -270,18 +279,27 @@ async function sacrificeToken(amount) {
|
||||
if (getRewards.variant === "sacrifice") {
|
||||
console.log("sacrifice");
|
||||
hash = await memeburnerStore.sacrificeMeme(amount);
|
||||
console.log("hash", hash);
|
||||
} else {
|
||||
console.log("buy");
|
||||
hash = await memeburnerStore.sacrificeMemeAndBuyBLOOD(amount);
|
||||
console.log("hash", hash);
|
||||
}
|
||||
|
||||
console.log("hierabc");
|
||||
console.log("state.value = 2");
|
||||
|
||||
console.log("hash", hash);
|
||||
state.value = 3;
|
||||
console.log("state.value = 3");
|
||||
const data = await waitForTransaction({
|
||||
hash: hash,
|
||||
});
|
||||
console.log("data", data);
|
||||
activeToken.value.allowance = await tokenStore.allowance();
|
||||
state.value = 4;
|
||||
console.log("state.value = 4");
|
||||
|
||||
showSuccessToast(
|
||||
tokenStore.activeToken.rewards?.toFixed(5),
|
||||
"Success!",
|
||||
@@ -350,17 +368,23 @@ async function getRewardsFor(value) {
|
||||
BigInt(value * Math.pow(10, activeToken.value.decimals))
|
||||
);
|
||||
console.log("rewardsForResult", rewardsForResult);
|
||||
const rewardsForResultNumber = Number(rewardsForResult[0]) / Math.pow(10, tokenStore.activeToken.decimals);
|
||||
const rewardsForResultNumber = Number(rewardsForResult) / Math.pow(10, tokenStore.activeToken.decimals);
|
||||
newOutput = rewardsForResultNumber;
|
||||
variant = "sacrifice";
|
||||
} else {
|
||||
const rewardsForResult = await memeburnerStore.getRewardFor(
|
||||
BigInt(value * Math.pow(10, activeToken.value.decimals))
|
||||
);
|
||||
console.log(
|
||||
"tokenNumber.value * Math.pow(10, tokenStore.activeToken.decimals)",
|
||||
tokenNumber.value * Math.pow(10, tokenStore.activeToken.decimals)
|
||||
);
|
||||
console.log("tokenNumber.value", tokenNumber.value);
|
||||
var quoteRewards = await uniswapStore.quoteExactInputSingle(
|
||||
tokenNumber.value * Math.pow(10, tokenStore.activeToken.decimals)
|
||||
);
|
||||
const rewardsForResultNumber = Number(rewardsForResult[0]) / Math.pow(10, tokenStore.activeToken.decimals);
|
||||
console.log("quoteRewards", quoteRewards);
|
||||
const rewardsForResultNumber = Number(rewardsForResult) / Math.pow(10, tokenStore.activeToken.decimals);
|
||||
console.log("rewardsForResultNumber", rewardsForResultNumber);
|
||||
const quoteRewardsNumber = Number(quoteRewards) / Math.pow(10, tokenStore.activeToken.decimals);
|
||||
console.log("quoteRewardsNumber", quoteRewardsNumber);
|
||||
@@ -370,14 +394,13 @@ async function getRewardsFor(value) {
|
||||
variant = "buy";
|
||||
// const hash = await memeburnerStore.sacrificeMeme(tokenNumber.value);
|
||||
} else {
|
||||
newOutput = rewardsForResultNumber[0];
|
||||
newOutput = rewardsForResultNumber;
|
||||
variant = "sacrifice";
|
||||
//sacrificeMemeAndBuyBLOOD
|
||||
// const hash = await memeburnerStore.sacrificeMeme(tokenNumber.value);
|
||||
}
|
||||
}
|
||||
console.log("variant", variant);
|
||||
state.value = 1;
|
||||
output.value = newOutput;
|
||||
tokenStore.activeToken.rewards = newOutput;
|
||||
return { ouput: newOutput, variant: variant };
|
||||
@@ -453,7 +476,7 @@ function showSuccessToast(value, header, subheader, info) {
|
||||
|
||||
.sacrifice-token
|
||||
border-radius: 16px
|
||||
padding: 12px
|
||||
padding: 9px
|
||||
cursor: pointer
|
||||
background-color: #0F0F0F
|
||||
text-align: center
|
||||
@@ -461,17 +484,18 @@ function showSuccessToast(value, header, subheader, info) {
|
||||
border: 4px solid transparent
|
||||
.sacrifice-token-logo
|
||||
pointer-events: none
|
||||
// @media (min-width: 992px)
|
||||
@media (min-width: 992px)
|
||||
img
|
||||
height: 100px
|
||||
width: 100px
|
||||
// padding: 0
|
||||
// background-color: unset
|
||||
&.sacrifice-token--active
|
||||
border-color: var(--purple)
|
||||
|
||||
.sacrifice-token-name
|
||||
font-size: 16px
|
||||
@media (min-width: 992px)
|
||||
padding: 5px 26px
|
||||
font-size: 24px
|
||||
|
||||
.sacrifice-buttons-function-wrapper
|
||||
text-align: center
|
||||
@@ -480,27 +504,28 @@ function showSuccessToast(value, header, subheader, info) {
|
||||
@media (min-width: 992px)
|
||||
display: flex
|
||||
.btn
|
||||
padding: 16px 64px
|
||||
padding: 12px 48px
|
||||
.sacrifice-fees-info-wrapper
|
||||
display: flex
|
||||
border: 2px dashed var(--grey)
|
||||
border: 1px dashed var(--grey)
|
||||
color: var(--grey)
|
||||
border-radius: 16px
|
||||
padding: 16px
|
||||
font-size: 16px
|
||||
gap: 16px
|
||||
padding: 12px
|
||||
gap: 12px
|
||||
.sacrifice-fees-img
|
||||
img
|
||||
height: 46px
|
||||
.sacrifice-fees-body
|
||||
flex: 1 1 auto
|
||||
display: flex
|
||||
flex-direction: column
|
||||
justify-content: space-between
|
||||
.sacrifice-fees-body-header
|
||||
display: flex
|
||||
flex-direction: row
|
||||
justify-content: space-between
|
||||
margin-bottom: 8px
|
||||
@media (min-width: 992px)
|
||||
font-size: 24px
|
||||
margin-bottom: 0
|
||||
|
||||
.sacrifice-from-to-wrapper
|
||||
@@ -511,20 +536,6 @@ function showSuccessToast(value, header, subheader, info) {
|
||||
@media (min-width: 992px)
|
||||
gap: 32px
|
||||
.sacrifice-from-wrapper
|
||||
.sarcrifice-from-input
|
||||
display: flex
|
||||
margin-bottom: 8px
|
||||
@media (min-width: 992px)
|
||||
height: 60px
|
||||
input
|
||||
width: 100%
|
||||
height: 45px
|
||||
font-size: 24px
|
||||
border-radius: 16px
|
||||
padding: 0 16px
|
||||
@media (min-width: 992px)
|
||||
font-size: 32px
|
||||
height: auto
|
||||
.sacrifice-logo
|
||||
margin-left: 16px
|
||||
img
|
||||
@@ -553,13 +564,13 @@ function showSuccessToast(value, header, subheader, info) {
|
||||
font-size: 14px
|
||||
background: var(--grey, #858585)
|
||||
color: var(--midnight-black, #0F0F0F)
|
||||
@media (min-width: 992px)
|
||||
font-size: 16px
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus
|
||||
background-color: var(--grey-light)
|
||||
cursor: pointer
|
||||
@media (min-width: 992px)
|
||||
font-size: 12px
|
||||
// .sacrifice-adder-balance
|
||||
// margin-left: auto
|
||||
// .sacrifice-adder-max
|
||||
@@ -574,19 +585,11 @@ function showSuccessToast(value, header, subheader, info) {
|
||||
.sacrifice-to-wrapper
|
||||
display: flex
|
||||
flex-direction: column
|
||||
gap: 24px
|
||||
.sarcrifice-to-input
|
||||
gap: 18px
|
||||
.sacrifice-to-body
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
.sacrifice-logo
|
||||
img
|
||||
width: 45px
|
||||
height: 45px
|
||||
border-radius: 50%
|
||||
pointer-events: none
|
||||
@media (min-width: 992px)
|
||||
height: 82px
|
||||
width: 82px
|
||||
height: 56px
|
||||
.sacrificed-info
|
||||
display: flex
|
||||
padding: 8px 24px
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="connected-stake-headline mid-mid-text">
|
||||
<slot name="headline" v-if="variant !== 2">Staked</slot>
|
||||
</div>
|
||||
<div class="connected-stake-subheadline">
|
||||
<div class="connected-stake-subheadline low-mid-text">
|
||||
<slot name="subheadline"
|
||||
>Stake for a 25% bonus on your sacrifice.<br />
|
||||
Upper limit is your stake.</slot
|
||||
@@ -176,8 +176,15 @@ function openUnstake() {
|
||||
|
||||
async function orderUnstake() {
|
||||
loading.value = true;
|
||||
var result = await rewardLockerStore.orderUnstake();
|
||||
console.log("orderUnstake", result);
|
||||
state.value = 2;
|
||||
var hash = await rewardLockerStore.orderUnstake();
|
||||
state.value = 3;
|
||||
const data = await waitForTransaction({
|
||||
hash: hash,
|
||||
});
|
||||
state.value = 4;
|
||||
await walletStore.loadWalletData();
|
||||
showSuccessToast();
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
@@ -192,7 +199,12 @@ async function stakeToken() {
|
||||
console.log("data", data);
|
||||
state.value = 4;
|
||||
await walletStore.loadWalletData();
|
||||
showSuccessToast();
|
||||
showSuccessToast(
|
||||
tokenNumber.value,
|
||||
"Success!",
|
||||
"You just staked",
|
||||
"Your next sacrifice will get an extra staking bonus as a reward."
|
||||
);
|
||||
//reload data
|
||||
} catch (error) {
|
||||
state.value = 0;
|
||||
@@ -215,7 +227,7 @@ const stateStake = computed(() => {
|
||||
return returnState;
|
||||
});
|
||||
|
||||
function showSuccessToast() {
|
||||
function showSuccessToast(value, header, subheader, info) {
|
||||
// Define the content object with the component, props and listeners
|
||||
const content = {
|
||||
component: StakeSuccessToast,
|
||||
@@ -223,10 +235,10 @@ function showSuccessToast() {
|
||||
props: {
|
||||
// counter: this.counter,
|
||||
// value: tokenStore.activeToken.rewards?.toFixed(5),
|
||||
value: tokenNumber.value,
|
||||
header: "Success!",
|
||||
subheader: "You just staked",
|
||||
info: "Your next sacrifice will get an extra staking bonus as a reward.",
|
||||
value: value,
|
||||
header: header,
|
||||
subheader: subheader,
|
||||
info: info,
|
||||
},
|
||||
// Listen and react to events using callbacks. In this case we listen for
|
||||
// the "click" event emitted when clicking the toast button
|
||||
@@ -248,20 +260,15 @@ function showSuccessToast() {
|
||||
|
||||
<style lang="sass">
|
||||
|
||||
.connected-stake-subheadline
|
||||
font-size: 16px
|
||||
@media (min-width: 992px)
|
||||
font-size: 24px
|
||||
|
||||
.stake-component--variant2
|
||||
border-radius: 16px
|
||||
background: var(--darkgrey, #202020)
|
||||
display: flex
|
||||
flex-direction: column
|
||||
gap: 24px
|
||||
gap: 18px
|
||||
padding: 8px
|
||||
@media (min-width: 992px)
|
||||
padding: 32px 64px
|
||||
padding: 24px 48px
|
||||
.unstake-menu
|
||||
display: flex
|
||||
flex-direction: column
|
||||
@@ -275,9 +282,6 @@ function showSuccessToast() {
|
||||
.connected-stake
|
||||
.connected-stake-headline
|
||||
text-align: left
|
||||
font-size: 18px
|
||||
.connected-stake-subheadline
|
||||
font-size: 16px
|
||||
.connected-stake-body
|
||||
.token-price-wrapper, .stake-reward
|
||||
.token-name
|
||||
|
||||
@@ -43,24 +43,18 @@
|
||||
<div class="rewards-total-wrapper">
|
||||
<div class="rewards-total-headline low-mid-text">Total Reward</div>
|
||||
<div class="rewards-total-inner bloodline-border bloodline-border--variant1">
|
||||
<div class="rewards-body">
|
||||
<div class="rewards-coin low-mid-text">$BLOOD</div>
|
||||
<token-name-price
|
||||
name="$BLOOD"
|
||||
:price="getCurrentRoundData?.rewards_total?.toFixed(5)"
|
||||
></token-name-price>
|
||||
<token-logo img="/assets/img/vampir.png" :alt="'vampire'"></token-logo>
|
||||
<!-- <div class="rewards-coin low-mid-text">$BLOOD</div>
|
||||
<div class="rewards-amount header" v-if="activeRound === currentRound">0</div>
|
||||
<div class="rewards-amount header" v-else>{{ getCurrentRoundData?.rewards_total.toFixed(5) }}</div>
|
||||
</div>
|
||||
<img class="bloodline-token" src="/assets/img/token/bloodline.png" alt="vampir" />
|
||||
<div class="rewards-amount header" v-else>{{ getCurrentRoundData?.rewards_total.toFixed(5) }}</div> -->
|
||||
<!-- </div> -->
|
||||
<!-- <img class="bloodline-token" src="/assets/img/token/bloodline.png" alt="vampir" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="claim-button">
|
||||
<button v-if="activeRound === currentRound" class="btn btn-immortal" @click="router.push({ name: 'home' })">
|
||||
Sacrifice
|
||||
</button>
|
||||
<div class="stake-buttons" v-else-if="getCurrentRoundData?.rewards_total > 0">
|
||||
<div class="btn btn-immortal" @click="claimRewards">Claim</div>
|
||||
<div class="btn btn-immortal">Stake</div>
|
||||
</div>
|
||||
<div v-else class="btn btn-immortal btn--disabled">Nothing to claim</div>
|
||||
</div> -->
|
||||
<div class="claim-button">
|
||||
<template v-if="!walletStore.connected">
|
||||
<button class="btn btn-immortal sub-header" @click="showPanel = true">Connect</button>
|
||||
@@ -100,7 +94,7 @@
|
||||
</Transition>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="btn btn-immortal btn--disabled">Nothing to claim</div>
|
||||
<div class="btn btn-immortal btn--disabled sub-header">Nothing to claim</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
@@ -117,6 +111,8 @@ import { useRouter } from "vue-router";
|
||||
import StakeMenu from "@/components/StakeMenu.vue";
|
||||
import { waitForTransaction } from "@wagmi/core";
|
||||
import LoadingComponent from "@/components/LoadingComponent.vue";
|
||||
import TokenNamePrice from "@/components/TokenNamePrice.vue";
|
||||
import TokenLogo from "@/components/TokenLogo.vue";
|
||||
|
||||
const clanRewards = ref(0);
|
||||
const rewards = ref(0);
|
||||
@@ -200,9 +196,8 @@ const stateClaimedComp = computed(() => {
|
||||
gap: 8px
|
||||
@media (min-width: 992px)
|
||||
gap: 32px
|
||||
div
|
||||
flex: 1 1 50%
|
||||
.rewards-wrapper
|
||||
// div
|
||||
// flex: 1 1 50%
|
||||
margin-bottom: 16px
|
||||
.rewards-divider
|
||||
text-align: center
|
||||
@@ -217,6 +212,8 @@ const stateClaimedComp = computed(() => {
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
text-align: left
|
||||
box-sizing: content-box
|
||||
height: 56px
|
||||
.rewards-left
|
||||
display: flex
|
||||
flex-direction: column
|
||||
|
||||
@@ -1,20 +1,31 @@
|
||||
<template>
|
||||
<div class="token-input">
|
||||
<div class="sarcrifice-from-input">
|
||||
<input @input="emit('update:modelValue', $event.target.value)" :value="props.modelValue" :placeholder="0" />
|
||||
<div class="sacrifice-logo" v-if="props.logo">
|
||||
<img :src="props.logo" alt="vampir" />
|
||||
<div class="left-side">
|
||||
<input
|
||||
@input="emit('update:modelValue', $event.target.value)"
|
||||
:value="props.modelValue"
|
||||
:placeholder="0"
|
||||
/>
|
||||
<div class="value-adder">
|
||||
<slot class="value-adder" name="message"></slot>
|
||||
<slot name="message-end"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-side">
|
||||
<token-logo :img="props.logo" :alt="'vampir'"></token-logo>
|
||||
|
||||
<div class="value-adder">
|
||||
<slot class="value-adder" name="message"></slot>
|
||||
<slot name="message-end"></slot>
|
||||
<!-- <div class="sacrifice-logo" v-if="props.logo">
|
||||
<img :src="props.logo" alt="vampir" />
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import TokenLogo from "@/components/TokenLogo.vue";
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: [String, Number],
|
||||
logo: String,
|
||||
@@ -27,38 +38,46 @@ const emit = defineEmits(["update:modelValue"]);
|
||||
.sarcrifice-from-input
|
||||
display: flex
|
||||
margin-bottom: 8px
|
||||
@media (min-width: 992px)
|
||||
height: 60px
|
||||
input
|
||||
width: 100%
|
||||
height: 45px
|
||||
font-size: 24px
|
||||
border-radius: 16px
|
||||
padding: 0 16px
|
||||
@media (min-width: 992px)
|
||||
font-size: 24px
|
||||
height: auto
|
||||
.sacrifice-logo
|
||||
margin-left: 16px
|
||||
img
|
||||
width: 45px
|
||||
height: 45px
|
||||
border-radius: 50%
|
||||
pointer-events: none
|
||||
@media (min-width: 992px)
|
||||
height: 100%
|
||||
width: auto
|
||||
.value-adder
|
||||
display: flex
|
||||
gap: 8px
|
||||
.stake-adder-step
|
||||
padding: 4px 16px
|
||||
color: var(--black)
|
||||
font-size: 14px
|
||||
border-width: 1px
|
||||
border-color: transparent
|
||||
border-style: solid
|
||||
&:hover,&:active, &:focus
|
||||
background-color: var(--grey-light)
|
||||
cursor: pointer
|
||||
.left-side
|
||||
display: flex
|
||||
flex-direction: column
|
||||
gap: 12px
|
||||
flex: 1 1 auto
|
||||
input
|
||||
width: 100%
|
||||
height: 45px
|
||||
font-size: 24px
|
||||
border-radius: 16px
|
||||
padding: 0 16px
|
||||
@media (min-width: 992px)
|
||||
font-size: 24px
|
||||
.value-adder
|
||||
display: flex
|
||||
gap: 8px
|
||||
.stake-adder-step
|
||||
padding: 4px 16px
|
||||
color: var(--black)
|
||||
font-size: 14px
|
||||
border-width: 1px
|
||||
border-color: transparent
|
||||
border-style: solid
|
||||
&:hover,&:active, &:focus
|
||||
background-color: var(--grey-light)
|
||||
cursor: pointer
|
||||
.right-side
|
||||
display: flex
|
||||
flex-direction: column
|
||||
height: 45px
|
||||
.sacrifice-logo
|
||||
margin-left: 16px
|
||||
height: 45px
|
||||
img
|
||||
width: 45px
|
||||
height: 45px
|
||||
border-radius: 50%
|
||||
pointer-events: none
|
||||
@media (min-width: 992px)
|
||||
height: 100%
|
||||
width: auto
|
||||
</style>
|
||||
|
||||
@@ -13,12 +13,13 @@ const props = defineProps({
|
||||
|
||||
<style lang="sass">
|
||||
.token-logo
|
||||
height: 100%
|
||||
img
|
||||
width: 45px
|
||||
height: 45px
|
||||
border-radius: 50%
|
||||
pointer-events: none
|
||||
@media (min-width: 992px)
|
||||
width: 65px
|
||||
height: 65px
|
||||
width: auto
|
||||
height: 100%
|
||||
</style>
|
||||
|
||||
@@ -16,5 +16,6 @@ const props = defineProps({
|
||||
.token-price-wrapper
|
||||
display: flex
|
||||
flex-direction: column
|
||||
gap: 4px
|
||||
gap: 6px
|
||||
text-align: left
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user