From 10b3285fdaa91e7be9ad734b1cc91f499d0598ed Mon Sep 17 00:00:00 2001 From: Stellarthoughts <49097167+Stellarthoughts@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:55:29 +0700 Subject: [PATCH 1/4] delete: env --- web/.env | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 web/.env diff --git a/web/.env b/web/.env deleted file mode 100644 index e7a95dc6..00000000 --- a/web/.env +++ /dev/null @@ -1,4 +0,0 @@ -# BRANDING - -VITE_LOGO_PATH=/favicon.png -VITE_BACKGROUND_PATH=/background.jpg \ No newline at end of file From a1cb7078a7a324a3bd6602afb240330a6ecb21d6 Mon Sep 17 00:00:00 2001 From: Stellarthoughts <49097167+Stellarthoughts@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:55:36 +0700 Subject: [PATCH 2/4] ignore: env --- web/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/.gitignore b/web/.gitignore index c3a7567d..9dff5cd8 100644 --- a/web/.gitignore +++ b/web/.gitignore @@ -22,3 +22,5 @@ dist-ssr *.njsproj *.sln *.sw? + +.env \ No newline at end of file From 2b21ff15ddc7b797ce79666a96cc598789cd1965 Mon Sep 17 00:00:00 2001 From: Stellarthoughts <49097167+Stellarthoughts@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:57:07 +0700 Subject: [PATCH 3/4] add: env favicon --- web/.env.example | 1 + web/index.html | 3 +-- web/src/App.svelte | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/web/.env.example b/web/.env.example index fbef5b6f..ee10ce94 100644 --- a/web/.env.example +++ b/web/.env.example @@ -1,4 +1,5 @@ # BRANDING +VITE_FAVICON_PATH=/favicon.png VITE_LOGO_PATH=/gpt-logo-white-transparent.svg VITE_BACKGROUND_PATH=/gpt-background.jpg \ No newline at end of file diff --git a/web/index.html b/web/index.html index 6711bda5..11895ae4 100644 --- a/web/index.html +++ b/web/index.html @@ -1,8 +1,7 @@ - + - Vite + Svelte diff --git a/web/src/App.svelte b/web/src/App.svelte index 625d5542..00c0cad5 100644 --- a/web/src/App.svelte +++ b/web/src/App.svelte @@ -2,6 +2,8 @@ import 'animate.css'; import 'bulma/css/bulma.css'; import Faucet from './Faucet.svelte'; + + const faviconPath = import.meta.env.VITE_FAVICON_PATH @@ -9,6 +11,7 @@ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" /> + From 5f4c14a254adc4f12f7a6b6186da5c3f5109b4b7 Mon Sep 17 00:00:00 2001 From: Stellarthoughts <49097167+Stellarthoughts@users.noreply.github.com> Date: Fri, 15 Mar 2024 16:48:40 +0700 Subject: [PATCH 4/4] add: symbol env --- web/.env.example | 6 +++++- web/src/Faucet.svelte | 4 +++- web/src/env/env.ts | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/web/.env.example b/web/.env.example index ee10ce94..f8b23678 100644 --- a/web/.env.example +++ b/web/.env.example @@ -2,4 +2,8 @@ VITE_FAVICON_PATH=/favicon.png VITE_LOGO_PATH=/gpt-logo-white-transparent.svg -VITE_BACKGROUND_PATH=/gpt-background.jpg \ No newline at end of file +VITE_BACKGROUND_PATH=/gpt-background.jpg + +# OTHER + +VITE_SYMBOL=ETH \ No newline at end of file diff --git a/web/src/Faucet.svelte b/web/src/Faucet.svelte index 8933c230..c3be4e22 100644 --- a/web/src/Faucet.svelte +++ b/web/src/Faucet.svelte @@ -4,12 +4,14 @@ import { CloudflareProvider } from '@ethersproject/providers'; import { setDefaults as setToast, toast } from 'bulma-toast'; + const symbol = import.meta.env.VITE_SYMBOL + let input = null; let faucetInfo = { account: '0x0000000000000000000000000000000000000000', network: 'testnet', payout: 1, - symbol: 'ETH', + symbol: symbol, hcaptcha_sitekey: '', }; diff --git a/web/src/env/env.ts b/web/src/env/env.ts index 134351f6..a26d77cf 100644 --- a/web/src/env/env.ts +++ b/web/src/env/env.ts @@ -3,6 +3,8 @@ interface ImportMetaEnv { readonly VITE_LOGO_PATH: string; readonly VITE_BACKGROUND_PATH: string; + readonly VITE_FAVICON_PATH: string; + readonly VITE_SYMBOL: string; } interface ImportMeta {