Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/replace font remove dropdown #30

Merged
merged 5 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions client/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@tailwind components;

:root {
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
font-family: Poppins, Helvetica, Arial, sans-serif;
shannonwells marked this conversation as resolved.
Show resolved Hide resolved
font-size: 16px;
line-height: 24px;
font-weight: 400;
Expand Down Expand Up @@ -105,7 +105,7 @@ button:focus-visible {
.submit-btn {
@apply btn w-full mt-6 rounded-3xl text-white;
background-color: #282837;
font-family: "Inter", sans-serif;
font-family: "Poppins", sans-serif;
font-weight: 500;
text-transform: none;
}
Expand All @@ -119,7 +119,7 @@ button:focus-visible {
}

.card-title {
font-family: "Unbounded", sans-serif;
font-family: "Poppins", sans-serif;
@apply text-white text-4xl;
font-weight: 700;
}
Expand Down
5 changes: 4 additions & 1 deletion client/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/x-icon" href="%sveltekit.assets%/favicon-192.png" />
<meta name="viewport" content="width=device-width" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
</head>

Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/components/Card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}

h1 {
font-family: "Unbounded", sans-serif;
font-family: "Poppins", sans-serif;
@apply text-white text-4xl;
font-weight: 700;
}
Expand Down
4 changes: 2 additions & 2 deletions client/src/lib/components/ChainDropdown.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
}

.inter {
font-family: "Inter", sans-serif;
font-family: "Poppins", sans-serif;
}

.form-background {
Expand All @@ -100,7 +100,7 @@
.custom-chain-switch {
@apply text-left hover:underline hover:cursor-pointer;
color: #c4affa;
font-family: "Inter", sans-serif;
font-family: "Poppins", sans-serif;
font-weight: 400;
font-size: 14px;
margin-top: 8px;
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/components/Faucet.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div class="flex items-center justify-center mt-16 mb-4 md:my-16">
<Card>
{#if !$operation}
<Form network={parachain ?? -1} networkData={network} />
<Form />
{:else}
<div in:fly={{ y: 30, duration: 500 }}>
{#if $operation.success}
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/components/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<style lang="postcss">
footer {
font-family: "Inter", sans-serif;
font-family: "Poppins", sans-serif;
}

.questions {
Expand Down
12 changes: 4 additions & 8 deletions client/src/lib/components/Form.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import type { NetworkData } from "$lib/utils/networkData";
import { Frequency } from "$lib/utils/networkData"
import { operation, testnet } from "$lib/utils/stores";
import { request as faucetRequest } from "../utils";
import CaptchaV2 from "./CaptchaV2.svelte";
Expand All @@ -8,8 +9,8 @@
import {validateAddress} from "@polkadot/util-crypto";

let address: string = "";
export let network: number = -1;
export let networkData: NetworkData;
let network: number = -1;
let networkData: NetworkData = Frequency;
let token: string = "";
let formValid: boolean;
$: formValid = !!address && !!token && !!network;
Expand Down Expand Up @@ -50,11 +51,6 @@
</script>

<form on:submit|preventDefault={onSubmit} class="w-full">
<div class="grid md:grid-cols-2 md:gap-x-4">
<NetworkDropdown currentNetwork={networkData} />
<NetworkInput bind:network />
</div>

<div class="inputs-container">
<label class="label" for="address">
<span class="form-label">{$testnet.networkName} Address</span>
Expand Down Expand Up @@ -89,7 +85,7 @@
}

form {
font-family: "Inter", sans-serif;
font-family: "Poppins", sans-serif;
}

.form-background {
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/components/screens/Error.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<style lang="postcss">
.message {
@apply text-lg mb-4;
font-family: "Inter", sans-serif;
font-family: "Poppins", sans-serif;
font-weight: 400;
font-size: 16px;
color: rgba(255, 255, 255, 0.7);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
}

h1 {
font-family: "Unbounded", sans-serif;
font-family: "Poppins", sans-serif;
@apply text-white text-4xl;
font-weight: 700;
}

.content {
@apply mt-2 md:mt-8 w-full text-left;
font-family: "Inter", sans-serif;
font-family: "Poppins", sans-serif;
font-size: 16px;
font-weight: 400;

Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/components/screens/Success.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<style lang="postcss">
.message {
@apply text-lg mb-4;
font-family: "Inter", sans-serif;
font-family: "Poppins", sans-serif;
font-weight: 400;
font-size: 16px;
color: rgba(255, 255, 255, 0.7);
Expand Down
13 changes: 0 additions & 13 deletions client/tests/faucet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,6 @@ export class FaucetTests {
await expect(captcha).toBeVisible();
});

test("page loads with default value in parachain field", async ({ page }) => {
await page.goto(this.url);
const { network } = await getFormElements(page);
await expect(network).toHaveValue("-1");
});

test("page with get parameter loads with value in parachain field", async ({ page }) => {
const parachainId = "1234";
await page.goto(`${this.url}?parachain=${parachainId}`);
const { network } = await getFormElements(page);
await expect(network).toHaveValue(parachainId);
});

test("page has captcha", async ({ page }) => {
await page.goto(this.url);
const { captcha } = await getFormElements(page, true);
Expand Down