Skip to content

Commit 676fa6d

Browse files
Add portal loop entry (#7)
1 parent 9b01919 commit 676fa6d

File tree

7 files changed

+25
-66
lines changed

7 files changed

+25
-66
lines changed

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ onMounted(() => {
4545
<main class="js-main flex flex-col justify-between min-h-screen">
4646
<Header />
4747
<section class="px-4 md:px-14 lg:px-20 mx-auto max-w-[110rem] w-full grid grid-cols-12">
48-
<h1 class="col-span-12 lg:col-span-5 font-termina text-600 md:text-700 text-center md:text-left" ref="DOMTitle">Welcome to Faucet Hub</h1>
48+
<h1 class="col-span-12 lg:col-span-5 font-termina text-600 md:text-700 text-center md:text-left" ref="DOMTitle">Welcome to the Faucet Hub</h1>
4949
<FaucetsList />
5050
</section>
5151

src/components/faucet/FaucetAvailability.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const props = defineProps<Props>()
1212
:class="props.available ? 'bg-green-900 before:bg-green-200' : 'bg-red-900 before:bg-red-200'"
1313
>
1414
<span :class="props.available ? 'text-green-200' : 'text-red-200'">{{
15-
props.available ? 'Enough faucet' : 'Empty. Try Later'
16-
}}</span>
15+
props.available ? 'Available' : 'Unavailable'
16+
}}</span>
1717
</div>
1818
</template>

src/components/faucet/FaucetCard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<Card :tracker="tracker">
3-
<FaucetAvailability :available="faucet.availability" class="self-end" />
3+
<FaucetAvailability :available="true" class="self-end" />
44
<div class="mt-28">
5-
<span class="mb-2 text-grey-100 text-50 uppercase">{{ faucet.network }}</span>
5+
<span class="mb-2 text-grey-100 text-50 uppercase">{{ faucet.chain_id }}</span>
66
<h2 class="text-500 text-grey-50">{{ faucet.name }}</h2>
77
</div>
88
</Card>

src/components/faucet/FaucetsList.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<template>
22
<div ref="projectCarouselEL" class="col-span-12 my-20">
33
<Carousel name="Carousel">
4-
<li v-for="(faucet, idx) in faucets" :key="idx" class="js-card p-4 flex-none w-full" role="group" aria-roledescription="slide">
4+
<li v-for="(faucet, idx) in faucets" :key="idx" class="js-card p-4 flex-none w-full" role="group"
5+
aria-roledescription="slide">
56
<div ref="cards" class="translate-x-12 opacity-0 h-full" @click.prevent="openFaucet(faucet)">
6-
<FaucetCard :data-ref="motions[idx].value.id" :motion="width >= 768 ? motions[idx] : undefined" :data-index="idx" :faucet="faucet" :is-loading="isLoading" />
7+
<FaucetCard :data-ref="motions[idx].value.id" :motion="width >= 768 ? motions[idx] : undefined"
8+
:data-index="idx" :faucet="faucet" :is-loading="isLoading" />
79
</div>
810
</li>
911
</Carousel>

src/components/faucet/content/FaucetContentForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<Recaptcha @validation="captchaValidation" />
88
<div>
99
<div class="flex gap-4">
10+
<Button text="Request drip" class="w-full" type="submit" />
1011
<Button text="Cancel" variant="outline" @click.prevent="() => closePopup()" class="w-full" />
11-
<Button text="Request Faucet" class="w-full" type="submit" />
1212
</div>
1313
<div v-if="error" class="text-center text-red-200 mt-6">{{ errorDetail[error] }}</div>
1414
</div>

src/data/faucets.json

Lines changed: 9 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,15 @@
11
{
22
"faucets": [
33
{
4-
"name": "Very long network name 1",
5-
"availability": true,
6-
"network": "network name",
7-
"token": "$GNOT",
8-
"amounts": [5, 10, 20]
9-
},
10-
{
11-
"name": "Very long network name 2",
12-
"availability": false,
13-
"network": "network name",
14-
"token": "$GNOT"
15-
},
16-
{
17-
"name": "Very long network name 3",
18-
"availability": true,
19-
"network": "network name",
20-
"token": "$GNOT",
21-
"amounts": [5, 10, 15]
22-
},
23-
{
24-
"name": "Very long network name 4",
25-
"availability": true,
26-
"network": "network name",
27-
"token": "$GNOT",
28-
"amounts": [5, 10, 15]
29-
},
30-
{
31-
"name": "Very long network name 1",
32-
"availability": true,
33-
"network": "network name",
34-
"token": "$GNOT",
35-
"amounts": [5, 10, 15]
36-
},
37-
{
38-
"name": "Very long network name 2",
39-
"availability": false,
40-
"network": "network name",
41-
"token": "$GNOT",
42-
"amounts": [5, 10, 15]
43-
},
44-
{
45-
"name": "Very long network name 3",
46-
"availability": true,
47-
"network": "network name",
48-
"token": "$GNOT",
49-
"amounts": [5, 10, 15]
50-
},
51-
{
52-
"name": "Very long network name 4",
53-
"availability": true,
54-
"network": "network name",
55-
"token": "$GNOT"
4+
"name": "Gno Portal Loop",
5+
"chain_id": "portal-loop",
6+
"amounts": [
7+
1,
8+
5,
9+
10
10+
],
11+
"url": "https://rpc.gno.land:443",
12+
"recaptcha": "6Lc245EpAAAAAJHI6WezI7VSsy6NiKTq1I7OLlUy"
5613
}
5714
]
5815
}

src/types/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ export type Status = 'FAIL' | 'EMPTY' | 'INVALID_ADDRESS' | 'BUSY_FAUCET' | unde
44
export type Code = 'success' | 'error'
55

66
export interface Faucet {
7-
name: string
8-
availability: boolean
9-
network: string
10-
token: string
11-
amounts?: number[]
12-
}
7+
name: string; // name of the testnet
8+
chain_id: string; // name of the testnet
9+
amounts: number[]; // faucet serve amounts (UI)
10+
url: string; // the faucet URL
11+
recaptcha: string; // the recaptcha site key, if any
12+
}

0 commit comments

Comments
 (0)