comments + contract update +
smaller design issues
This commit is contained in:
+9
-132
@@ -68,157 +68,34 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- <div class="cycle-wrapper">
|
||||
<div class="cycle-inner">
|
||||
<div class="cycle-headline">Cycles</div>
|
||||
<div class="cycle-header">
|
||||
<div class="cycle-header-left">Cycle</div>
|
||||
<div class="cycle-header-right">Reward</div>
|
||||
</div>
|
||||
<div class="cycle-rounds">
|
||||
<div class="cycle-round" v-for="(round, index) in rounds" :key="index">
|
||||
<template v-if="round">
|
||||
<div class="cycle-round-inner">
|
||||
<div class="cycle-round-number">{{ round.round }}</div>
|
||||
<div class="cycle-round-badget" v-if="roundsStore.currentRound === round.round">
|
||||
active
|
||||
</div>
|
||||
<div class="cycle-round-reward" v-if="roundsStore.currentRound === round.round">
|
||||
todo
|
||||
</div>
|
||||
<div class="cycle-round-reward" v-else>
|
||||
{{ Number(round.rewards_total / BigInt(Math.pow(10, 18))) }} $BDL
|
||||
</div>
|
||||
<div class="cycle-round-more" @click="openRound(index)">
|
||||
<font-awesome-icon
|
||||
v-if="openCycleElement && index === activeRound"
|
||||
icon="chevron-up"
|
||||
/>
|
||||
<font-awesome-icon v-else icon="chevron-down" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="cycle-round-detail" v-if="openCycleElement && index === activeRound">
|
||||
<div class="cycle-round-detail-inner">
|
||||
<div class="sacrifice-reward-wrapper">
|
||||
<div class="sacrifice-reward-inner">
|
||||
<div class="sacrifice-reward-header">
|
||||
<div class="sacrifice-reward-header-name">Sacrifice Reward</div>
|
||||
<div class="sacrifice-reward-header-amount">+2,000 $BDL</div>
|
||||
</div>
|
||||
<table class="sacrifice-coins">
|
||||
<tr class="sacrifice-coin">
|
||||
<td>2b PEPE</td>
|
||||
<td class="arrow"><font-awesome-icon icon="arrow-right" /></td>
|
||||
<td>1,500 $BDL</td>
|
||||
</tr>
|
||||
<tr class="sacrifice-coin">
|
||||
<td>10m SHIB</td>
|
||||
<td class="arrow"><font-awesome-icon icon="arrow-right" /></td>
|
||||
<td class="bloodline">500 $BDL</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sacrifice-reward-wrapper">
|
||||
<div class="sacrifice-reward-inner">
|
||||
<div class="sacrifice-reward-header">
|
||||
<div class="sacrifice-reward-header-name">Staking Bonus</div>
|
||||
<div class="sacrifice-reward-header-amount">+1,000 $BDL</div>
|
||||
</div>
|
||||
<table class="sacrifice-coins">
|
||||
<tr class="sacrifice-coin">
|
||||
<td>Staked</td>
|
||||
<td class="arrow"></td>
|
||||
<td class="bloodline">1,000 $BDL</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sacrifice-reward-wrapper">
|
||||
<div class="sacrifice-reward-inner">
|
||||
<div class="sacrifice-reward-header">
|
||||
<div class="sacrifice-reward-header-name">Competition Bonus</div>
|
||||
<div class="sacrifice-reward-header-amount">+200 $BDL</div>
|
||||
</div>
|
||||
<table class="sacrifice-coins">
|
||||
<tr class="sacrifice-coin">
|
||||
<td><img src="/assets/img/winner.png" alt="" /></td>
|
||||
<td><img src="/assets/img/token/pepevamp.png" alt="" /></td>
|
||||
<td>$PEPE</td>
|
||||
<td class="arrow"></td>
|
||||
<td class="bloodline">1,000 $BDL</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, computed, inject } from "vue";
|
||||
import { useRoundsStore } from "@/stores/rounds";
|
||||
import { useCycleStore } from "@/stores/cycles";
|
||||
import { useWalletStoreV2 } from "@/stores/walletV2";
|
||||
|
||||
import { getblocky, getAddressShortName } from "@/helper/helper.js";
|
||||
import CardComponent from "@/components/CardComponent.vue";
|
||||
import StakeComponentV1 from "@/components/StakeComponentV1.vue";
|
||||
import ClaimComponent from "@/components/ClaimComponent.vue";
|
||||
|
||||
import { useMemeburnerStore } from "@/stores/memeburner";
|
||||
import { useRewardLockerStore } from "@/stores/rewardlocker";
|
||||
|
||||
const roundsStore = useRoundsStore();
|
||||
const cycleStore = useCycleStore();
|
||||
const walletStore = useWalletStoreV2();
|
||||
const rewardLockerStore = useRewardLockerStore();
|
||||
const memeBurnerStore = useMemeburnerStore();
|
||||
const isMobile = inject("isMobile");
|
||||
const showPanel = inject("showPanel");
|
||||
|
||||
const activeRound = ref(null);
|
||||
const openCycleElement = ref(false);
|
||||
function openRound(index) {
|
||||
if (activeRound.value === index && openCycleElement.value) {
|
||||
openCycleElement.value = false;
|
||||
} else {
|
||||
openCycleElement.value = true;
|
||||
}
|
||||
activeRound.value = index;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
// await memeBurnerStore.init();
|
||||
// await rewardLockerStore.init();
|
||||
|
||||
console.log("loadRounds");
|
||||
if (!roundsStore.currentRound) {
|
||||
roundsStore.currentRound = parseInt(await memeBurnerStore.getCurrentRound());
|
||||
console.log("roundsStore.currentRound", roundsStore.currentRound);
|
||||
roundsStore.activeRound = roundsStore.currentRound;
|
||||
//todo check that code, probably old stuff
|
||||
if (!cycleStore.currentCycle) {
|
||||
cycleStore.currentCycle = parseInt(await memeBurnerStore.getCurrentCycle());
|
||||
console.log("cycleStore.currentCycle", cycleStore.currentCycle);
|
||||
cycleStore.activeCycle = cycleStore.currentCycle;
|
||||
}
|
||||
//brauche ich das?
|
||||
// await roundsStore.loadRewardsRounds();
|
||||
console.log("roundsStore.rounds", roundsStore.rounds);
|
||||
});
|
||||
|
||||
const rounds = computed(() => {
|
||||
var tetst = roundsStore.rounds
|
||||
.filter((round) => {
|
||||
if (round.round) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.reverse();
|
||||
return tetst;
|
||||
console.log("cycleStore.cycles", cycleStore.cycles);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -364,7 +241,7 @@ const rounds = computed(() => {
|
||||
justify-content: space-between
|
||||
padding: 8px 16px
|
||||
font-size: 18px
|
||||
.cycle-rounds
|
||||
.cycle-cycles
|
||||
gap: 8px
|
||||
display: flex
|
||||
flex-direction: column
|
||||
|
||||
Reference in New Issue
Block a user