diff --git a/src/components/ListingComponent/BalanceCard.vue b/src/components/ListingComponent/BalanceCard.vue index a3be4b1..20823fd 100644 --- a/src/components/ListingComponent/BalanceCard.vue +++ b/src/components/ListingComponent/BalanceCard.vue @@ -4,6 +4,8 @@ import { ref, watch, onMounted, computed } from "vue"; import { debounce } from "@/utils/debounce"; import { decimalCount } from "@/utils/decimalCount"; import { useFloating, arrow, offset, flip, shift } from "@floating-ui/vue"; +import IconButton from "../ui/IconButton.vue"; +import withdrawIcon from "@/assets/withdraw.svg?url"; const props = defineProps<{ validDeposits: ValidDeposit[]; @@ -16,8 +18,6 @@ const emit = defineEmits<{ }>(); const withdrawAmount = ref(""); -const withdrawButtonOpacity = ref(0.6); -const withdrawButtonCursor = ref("not-allowed"); const isCollapsibleOpen = ref(false); const validDecimals = ref(true); const validWithdrawAmount = ref(true); @@ -77,26 +77,6 @@ const cancelWithdraw = () => { enableConfirmButton.value = false; }; -watch(enableConfirmButton, (): void => { - if (!enableConfirmButton.value) { - withdrawButtonOpacity.value = 0.7; - withdrawButtonCursor.value = "not-allowed"; - } else { - withdrawButtonOpacity.value = 1; - withdrawButtonCursor.value = "pointer"; - } -}); - -watch(withdrawAmount, (): void => { - if (!withdrawAmount.value || !enableConfirmButton.value) { - withdrawButtonOpacity.value = 0.7; - withdrawButtonCursor.value = "not-allowed"; - } else { - withdrawButtonOpacity.value = 1; - withdrawButtonCursor.value = "pointer"; - } -}); - onMounted(() => { useFloating(reference, floating, { placement: "right", @@ -150,17 +130,14 @@ onMounted(() => {
-
- Withdraw image - Sacar -
+ />
@@ -191,22 +168,20 @@ onMounted(() => { >

Cancelar

-
- Withdraw image - Sacar -
+ />
@@ -217,19 +192,10 @@ p { @apply text-gray-900; } -.last-release-info { - @apply font-medium text-xs sm:text-sm text-gray-900 justify-self-center; -} - .tooltip { @apply bg-white text-gray-900 font-medium text-xs md:text-base px-3 py-2 rounded border-2 border-emerald-500 left-5 top-[-3rem]; } -.withdraw-button { - opacity: v-bind(withdrawButtonOpacity); - cursor: v-bind(withdrawButtonCursor); -} - input[type="number"] { appearance: textfield; -moz-appearance: textfield; diff --git a/src/components/ListingComponent/ListingComponent.vue b/src/components/ListingComponent/ListingComponent.vue index 530aa34..14405da 100644 --- a/src/components/ListingComponent/ListingComponent.vue +++ b/src/components/ListingComponent/ListingComponent.vue @@ -97,14 +97,14 @@ showInitialItems(); > - - ({{ itemsToShow.length }} de {{ props.walletTransactions.length }} - transações ) + + {{ itemsToShow.length }} de {{ props.walletTransactions.length }} + transações diff --git a/src/components/ListingComponent/TransactionCard.vue b/src/components/ListingComponent/TransactionCard.vue index 8c661dd..e96f1c2 100644 --- a/src/components/ListingComponent/TransactionCard.vue +++ b/src/components/ListingComponent/TransactionCard.vue @@ -2,6 +2,7 @@ import type { WalletTransaction } from "@/model/WalletTransaction"; import { NetworkEnum, TokenEnum } from "@/model/NetworkEnum"; import { computed } from "vue"; +import StatusBadge, { type StatusType } from "../ui/StatusBadge.vue"; const props = defineProps<{ transaction: WalletTransaction; @@ -30,20 +31,20 @@ const explorerName = computed(() => { return props.networkName === NetworkEnum.sepolia ? "Etherscan" : "Polygonscan"; }); -const statusInfo = computed(() => { +const statusType = computed((): StatusType => { if (eventName.value === "Reserva") { switch (props.transaction.lockStatus) { case 1: - return { text: "Em Aberto", color: "bg-amber-300" }; + return "open"; case 2: - return { text: "Expirado", color: "bg-[#94A3B8]" }; + return "expired"; case 3: - return { text: "Finalizado", color: "bg-emerald-300" }; + return "completed"; default: - return { text: "Finalizado", color: "bg-emerald-300" }; + return "completed"; } } - return { text: "Finalizado", color: "bg-emerald-300" }; + return "completed"; }); const showExplorerLink = computed(() => { @@ -71,8 +72,8 @@ const handleExplorerClick = () => {
-
- {{ statusInfo.text }} +
+
{ @apply flex justify-between items-center; } -.status-text { - @apply text-xs sm:text-base font-medium text-gray-900 rounded-lg text-center mb-2 px-2 py-1 mt-4; -} - .last-release-info { @apply font-medium text-xs sm:text-sm text-gray-900 justify-self-center; } diff --git a/src/components/ui/AmountInput.vue b/src/components/ui/AmountInput.vue new file mode 100644 index 0000000..75fa77e --- /dev/null +++ b/src/components/ui/AmountInput.vue @@ -0,0 +1,208 @@ + + + + + + diff --git a/src/components/ui/BankSelector.vue b/src/components/ui/BankSelector.vue new file mode 100644 index 0000000..08ea88e --- /dev/null +++ b/src/components/ui/BankSelector.vue @@ -0,0 +1,137 @@ + + + + + + diff --git a/src/components/ui/CustomButton.vue b/src/components/ui/CustomButton.vue index 1994747..cea772e 100644 --- a/src/components/ui/CustomButton.vue +++ b/src/components/ui/CustomButton.vue @@ -1,26 +1,161 @@ diff --git a/src/components/ui/Dropdown.vue b/src/components/ui/Dropdown.vue new file mode 100644 index 0000000..04c690e --- /dev/null +++ b/src/components/ui/Dropdown.vue @@ -0,0 +1,248 @@ + + + + + + diff --git a/src/components/ui/ErrorMessage.vue b/src/components/ui/ErrorMessage.vue new file mode 100644 index 0000000..19129b2 --- /dev/null +++ b/src/components/ui/ErrorMessage.vue @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/components/ui/FormCard.vue b/src/components/ui/FormCard.vue new file mode 100644 index 0000000..4cfd1af --- /dev/null +++ b/src/components/ui/FormCard.vue @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/components/ui/IconButton.vue b/src/components/ui/IconButton.vue new file mode 100644 index 0000000..7dd9b9f --- /dev/null +++ b/src/components/ui/IconButton.vue @@ -0,0 +1,147 @@ + + + + + + diff --git a/src/components/ui/InfoTooltip.vue b/src/components/ui/InfoTooltip.vue new file mode 100644 index 0000000..cf918b9 --- /dev/null +++ b/src/components/ui/InfoTooltip.vue @@ -0,0 +1,91 @@ + + + + + + diff --git a/src/components/ui/LoadingState.vue b/src/components/ui/LoadingState.vue new file mode 100644 index 0000000..97363f7 --- /dev/null +++ b/src/components/ui/LoadingState.vue @@ -0,0 +1,60 @@ + + + + + + diff --git a/src/components/ui/NetworkBadges.vue b/src/components/ui/NetworkBadges.vue new file mode 100644 index 0000000..76b8379 --- /dev/null +++ b/src/components/ui/NetworkBadges.vue @@ -0,0 +1,72 @@ + + + + + + diff --git a/src/components/ui/NetworkSelector.vue b/src/components/ui/NetworkSelector.vue new file mode 100644 index 0000000..59f0e0a --- /dev/null +++ b/src/components/ui/NetworkSelector.vue @@ -0,0 +1,52 @@ + + + + diff --git a/src/components/ui/PageHeader.vue b/src/components/ui/PageHeader.vue new file mode 100644 index 0000000..c47f42d --- /dev/null +++ b/src/components/ui/PageHeader.vue @@ -0,0 +1,66 @@ + + + + + + diff --git a/src/components/ui/StatusBadge.vue b/src/components/ui/StatusBadge.vue new file mode 100644 index 0000000..19d4b2b --- /dev/null +++ b/src/components/ui/StatusBadge.vue @@ -0,0 +1,50 @@ + + + + + + diff --git a/src/components/ui/TokenSelector.vue b/src/components/ui/TokenSelector.vue new file mode 100644 index 0000000..610172f --- /dev/null +++ b/src/components/ui/TokenSelector.vue @@ -0,0 +1,48 @@ + + + + diff --git a/src/components/ui/WalletConnectButton.vue b/src/components/ui/WalletConnectButton.vue new file mode 100644 index 0000000..dfa318d --- /dev/null +++ b/src/components/ui/WalletConnectButton.vue @@ -0,0 +1,152 @@ + + + + + +