Skip to content

Commit 6aa0fa1

Browse files
committed
fix: animation
1 parent be4eef2 commit 6aa0fa1

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/components/faucet/FaucetDetail.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
ref="DOMpopup"
66
class="popup fixed flex flex-col items-center rounded w-[90vw] max-w-[36rem] bg-grey-300 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[1000] justify-center text-grey-50 before:absolute before:top-0 before:bottom-0 before:left-0 before:right-0 before:rounded before:bg-500 before:z-min after:absolute after:top-px after:left-px after:bottom-px after:right-px after:bg-grey-500 after:rounded after:z-min"
77
>
8-
<div ref="DOMFaucetRequest" class="py-12 px-20 w-full" v-if="store.isOpen">
8+
<div ref="DOMFaucetRequest" class="py-12 px-20 w-full" v-if="store.isVisible">
99
<FaucetContentForm :name="store.selectedFaucet.name ?? 'Faucet'" :options="store.faucetAmount" v-show="store.contentStep === 0" class="js-faucetform opacity-100" :error="error" @requestFaucet="requestFaucet" />
1010
<div>
1111
<div ref="gnoRequestLogo" v-show="store.contentStep >= 1" class="opacity-0">

src/components/ui/Recaptcha.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ import { onMounted } from 'vue'
88
type Props = {
99
captchakey: string
1010
}
11-
const props = defineProps<Props>()
11+
defineProps<Props>()
1212
13-
console.log(props.captchakey)
14-
onMounted(() => console.log(props.captchakey))
1513
const emit = defineEmits(['validation'])
1614
1715
const handleError = (res: string) => {

src/stores/faucetDetail.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const useFaucetDetail = defineStore('faucetDetail', {
1414
title: null as HTMLElement | null,
1515
},
1616
isOpen: false,
17+
isVisible: false,
1718
contentStep: 0,
1819
status: 'null' as RequestStatus,
1920
selectedFaucet: {} as Faucet,
@@ -50,6 +51,7 @@ export const useFaucetDetail = defineStore('faucetDetail', {
5051

5152
popupToggle() {
5253
this.isOpen = !this.isOpen
54+
if (this.isOpen) this.isVisible = true
5355

5456
this.titleToggle()
5557

@@ -75,7 +77,10 @@ export const useFaucetDetail = defineStore('faucetDetail', {
7577
duration: 0.6,
7678
delay: this.isOpen ? 0.4 : 0,
7779
onComplete: () => {
78-
if (!this.isOpen) this.contentStep = 0
80+
if (!this.isOpen) {
81+
this.contentStep = 0
82+
this.isVisible = false
83+
}
7984
this.status = 'null'
8085
},
8186
})

0 commit comments

Comments
 (0)