improve list component css

This commit is contained in:
RcleydsonR 2022-12-14 20:13:59 -03:00
parent c9c19adac6
commit 37f7a05197
3 changed files with 24 additions and 26 deletions

View File

@ -2,7 +2,7 @@
import CustomButton from "@/components/CustomButton.vue"; import CustomButton from "@/components/CustomButton.vue";
import blockchain from "../utils/blockchain"; import blockchain from "../utils/blockchain";
// props and store references // props
const props = defineProps({ const props = defineProps({
lastWalletReleaseTransactions: Array, lastWalletReleaseTransactions: Array,
tokenAmount: Number, tokenAmount: Number,
@ -49,31 +49,27 @@ const openEtherscanUrl = (url: string) => {
@buttonClicked="() => {}" @buttonClicked="() => {}"
/> />
</div> </div>
</div>
<div class="blur-container-row">
<button <button
type="button" type="button"
class="border-amber-500 border-2 rounded default-button text-white p-2 px-50 w-full" class="border-amber-500 border-2 rounded default-button text-white p-2 px-50 min-w-[198px]"
@click="() => {}" @click="() => {}"
> >
Fazer nova transação Fazer nova transação
</button> </button>
<button
type="button"
class="border-amber-500 border-2 rounded default-button text-white p-2"
@click="() => {}"
>
Desconectar
</button>
</div> </div>
<div class="text-container mt-10"> <div class="text-container mt-16">
<span class="text font-extrabold text-3xl max-w-[50rem]" <span class="text font-extrabold text-3xl max-w-[50rem]"
>Últimas transações >Últimas transações
</span> </span>
</div> </div>
<div class="blur-container"> <div class="blur-container min-w-[80%] gap-8">
<div class="flex flex-row justify-between w-full px-8">
<span class="text-xs text-gray-50 font-medium">Valor</span>
<span class="text-xs text-gray-50 font-medium">Tipo de transação</span>
<span class="text-xs text-gray-50 font-medium">Checar transação</span>
</div>
<div <div
class="flex flex-row justify-between w-full bg-white p-5 rounded-lg" class="flex flex-row justify-between w-full bg-white px-6 py-4 rounded-lg"
v-for="release in lastWalletReleaseTransactions" v-for="release in lastWalletReleaseTransactions"
:key="release?.blockNumber" :key="release?.blockNumber"
> >
@ -95,14 +91,17 @@ const openEtherscanUrl = (url: string) => {
<img alt="Redirect image" src="@/assets/redirect.svg" /> <img alt="Redirect image" src="@/assets/redirect.svg" />
</div> </div>
</div> </div>
<button <div class="flex justify-center w-full right-6 mt-2">
type="button" <button
class="text-white mt-2" type="button"
@click="() => {}" class="text-white"
v-if="lastWalletReleaseTransactions?.length != 0" @click="() => {}"
> v-if="lastWalletReleaseTransactions?.length != 0"
Carregar mais >
</button> Carregar mais
</button>
</div>
<p class="font-bold" v-if="lastWalletReleaseTransactions?.length == 0"> <p class="font-bold" v-if="lastWalletReleaseTransactions?.length == 0">
Não nenhuma transação anterior Não nenhuma transação anterior
</p> </p>
@ -131,7 +130,7 @@ p {
} }
.blur-container { .blur-container {
@apply flex flex-col justify-center items-center px-8 py-6 gap-2 rounded-lg shadow-md shadow-gray-600 backdrop-blur-md mt-8 w-1/3; @apply flex flex-col justify-center items-center px-8 py-6 gap-4 rounded-lg shadow-md shadow-gray-600 backdrop-blur-md mt-10 w-auto;
} }
.last-release-info { .last-release-info {

View File

@ -21,7 +21,7 @@ const updateWalletStatus = async () => {
const walletAddress = await provider.send("eth_requestAccounts", []); const walletAddress = await provider.send("eth_requestAccounts", []);
const balance = await contract.balanceOf(walletAddress[0]); const balance = await contract.balanceOf(walletAddress[0]);
+etherStore.setBalance(formatBigNumber(balance)); etherStore.setBalance(formatBigNumber(balance));
etherStore.setWalletAddress(ethers.utils.getAddress(walletAddress[0])); etherStore.setWalletAddress(ethers.utils.getAddress(walletAddress[0]));
}; };

View File

@ -81,9 +81,8 @@ const releaseTransaction = async ({ e2eId }: any) => {
walletAddress.value.toLowerCase() walletAddress.value.toLowerCase()
); );
await blockchain.updateWalletStatus();
loadingRelease.value = false; loadingRelease.value = false;
blockchain.updateWalletStatus();
} }
}; };
</script> </script>