Skip to content

Commit e15eb8a

Browse files
committed
chore: added get started button to home page
1 parent 272d1f2 commit e15eb8a

6 files changed

Lines changed: 178 additions & 41 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ Thumbs.db
2222
# Vite
2323
vite.config.js.timestamp-*
2424
vite.config.ts.timestamp-*
25-
.wrangler
25+
.wrangler
26+
27+
project.inlang/

src/locales/en.po

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgstr ""
33
"Project-Id-Version: \n"
44
"Report-Msgid-Bugs-To: \n"
55
"POT-Creation-Date: 2025-10-21T07:48:36.657Z\n"
6-
"PO-Revision-Date: 2025-11-15T23:29:18.536Z\n"
6+
"PO-Revision-Date: 2025-11-24T03:32:56.312Z\n"
77
"Last-Translator: \n"
88
"Language: en\n"
99
"Language-Team: \n"
@@ -1062,9 +1062,8 @@ msgstr "Vote"
10621062
msgid "{0}/USD"
10631063
msgstr "{0}/USD"
10641064

1065-
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
1066-
msgid "EOS rebrands to Vaulta"
1067-
msgstr "EOS rebrands to Vaulta"
1065+
#~ msgid "EOS rebrands to Vaulta"
1066+
#~ msgstr "EOS rebrands to Vaulta"
10681067

10691068
#: src/routes/[[locale]]/[network]/(explorer)/account/[name]/staked/+page.svelte
10701069
#: src/routes/[[locale]]/[network]/(homepage)/components/stakedhex.svelte
@@ -4294,17 +4293,13 @@ msgstr "<0>Unicove -</0> The {0} web wallet and block explorer"
42944293

42954294
#. placeholder {0}: network.chain.name
42964295
#. placeholder {0}: networkName
4297-
#. placeholder {0}: networkName
42984296
#: src/routes/+layout.server.ts
42994297
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
4300-
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
43014298
msgid "Stake, Send, Manage Tokens, and Explore {0} – all with ease"
43024299
msgstr "Stake, Send, Manage Tokens, and Explore {0} – all with ease"
43034300

4304-
#. placeholder {0}: networkName
4305-
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
4306-
msgid "<0>Unicove -</0> The {0} web wallet and block explorer."
4307-
msgstr "<0>Unicove -</0> The {0} web wallet and block explorer."
4301+
#~ msgid "<0>Unicove -</0> The {0} web wallet and block explorer."
4302+
#~ msgstr "<0>Unicove -</0> The {0} web wallet and block explorer."
43084303

43094304
#. placeholder {0}: productName
43104305
#: src/routes/[[locale]]/[network]/(homepage)/components/carousel.svelte
@@ -5732,3 +5727,25 @@ msgstr "MetaMask Wallet Plugin"
57325727

57335728
#~ msgid "Controls"
57345729
#~ msgstr "Controls"
5730+
5731+
#: src/routes/[[locale]]/[network]/(homepage)/components/get-started.svelte
5732+
msgid "Get Started - Create Account"
5733+
msgstr "Get Started - Create Account"
5734+
5735+
#~ msgid "Unicove Your Gateway To The Jungle 4 Network."
5736+
#~ msgstr "Unicove Your Gateway To The Jungle 4 Network."
5737+
5738+
#~ msgid "Create your account in minutes. Stake, swap, and manage your digital assets with complete control."
5739+
#~ msgstr "Create your account in minutes. Stake, swap, and manage your digital assets with complete control."
5740+
5741+
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
5742+
msgid ""
5743+
"Create your account in minutes. Stake, swap, and manage your digital assets with complete\n"
5744+
"control."
5745+
msgstr ""
5746+
"Create your account in minutes. Stake, swap, and manage your digital assets with complete\n"
5747+
"control."
5748+
5749+
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
5750+
msgid "Unicove Your Gateway To The Vaulta Network."
5751+
msgstr "Unicove Your Gateway To The Vaulta Network."

src/locales/ko.po

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgstr ""
33
"Project-Id-Version: \n"
44
"Report-Msgid-Bugs-To: \n"
55
"POT-Creation-Date: 2025-10-21T07:48:36.663Z\n"
6-
"PO-Revision-Date: 2025-11-15T23:29:18.569Z\n"
6+
"PO-Revision-Date: 2025-11-24T03:31:50.006Z\n"
77
"Last-Translator: \n"
88
"Language: ko\n"
99
"Language-Team: \n"
@@ -4204,17 +4204,13 @@ msgstr "<0>Unicove -</0> {0} 웹 지갑 및 블록 탐색기"
42044204

42054205
#. placeholder {0}: network.chain.name
42064206
#. placeholder {0}: networkName
4207-
#. placeholder {0}: networkName
42084207
#: src/routes/+layout.server.ts
42094208
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
4210-
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
42114209
msgid "Stake, Send, Manage Tokens, and Explore {0} – all with ease"
42124210
msgstr "손쉽게 {0} 네트워크에서 스테이킹, 전송, 토큰 관리 및 탐색을 모두 즐기세요!"
42134211

4214-
#. placeholder {0}: networkName
4215-
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
4216-
msgid "<0>Unicove -</0> The {0} web wallet and block explorer."
4217-
msgstr "<0>Unicove -</0> {0} 웹 지갑 및 블록 탐색기"
4212+
#~ msgid "<0>Unicove -</0> The {0} web wallet and block explorer."
4213+
#~ msgstr "<0>Unicove -</0> {0} 웹 지갑 및 블록 탐색기"
42184214

42194215
#. placeholder {0}: productName
42204216
#: src/routes/[[locale]]/[network]/(homepage)/components/carousel.svelte
@@ -5596,3 +5592,24 @@ msgstr ""
55965592

55975593
#~ msgid "Controls"
55985594
#~ msgstr ""
5595+
5596+
#: src/routes/[[locale]]/[network]/(homepage)/components/get-started.svelte
5597+
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
5598+
msgid "Get Started - Create Account"
5599+
msgstr ""
5600+
5601+
#~ msgid "Unicove Your Gateway To The Jungle 4 Network."
5602+
#~ msgstr ""
5603+
5604+
#~ msgid "Create your account in minutes. Stake, swap, and manage your digital assets with complete control."
5605+
#~ msgstr ""
5606+
5607+
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
5608+
msgid ""
5609+
"Create your account in minutes. Stake, swap, and manage your digital assets with complete\n"
5610+
"control."
5611+
msgstr ""
5612+
5613+
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
5614+
msgid "Unicove Your Gateway To The Vaulta Network."
5615+
msgstr ""

src/locales/zh.po

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ msgstr ""
33
"Project-Id-Version: \n"
44
"Report-Msgid-Bugs-To: \n"
55
"POT-Creation-Date: 2025-10-21T07:48:36.665Z\n"
6-
"PO-Revision-Date: 2025-11-15T23:29:18.572Z\n"
6+
"PO-Revision-Date: 2025-11-24T03:31:50.038Z\n"
77
"Last-Translator: \n"
88
"Language: zh\n"
99
"Language-Team: \n"
@@ -4204,17 +4204,13 @@ msgstr "<0>Unicove -</0> {0} 网页钱包与区块浏览器"
42044204

42054205
#. placeholder {0}: network.chain.name
42064206
#. placeholder {0}: networkName
4207-
#. placeholder {0}: networkName
42084207
#: src/routes/+layout.server.ts
42094208
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
4210-
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
42114209
msgid "Stake, Send, Manage Tokens, and Explore {0} – all with ease"
42124210
msgstr "轻松质押,发送,管理代币和探索{0}网络"
42134211

4214-
#. placeholder {0}: networkName
4215-
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
4216-
msgid "<0>Unicove -</0> The {0} web wallet and block explorer."
4217-
msgstr "<0>Unicove -</0> {0} 网页钱包与区块浏览器"
4212+
#~ msgid "<0>Unicove -</0> The {0} web wallet and block explorer."
4213+
#~ msgstr "<0>Unicove -</0> {0} 网页钱包与区块浏览器"
42184214

42194215
#. placeholder {0}: productName
42204216
#: src/routes/[[locale]]/[network]/(homepage)/components/carousel.svelte
@@ -5596,3 +5592,24 @@ msgstr ""
55965592

55975593
#~ msgid "Controls"
55985594
#~ msgstr ""
5595+
5596+
#: src/routes/[[locale]]/[network]/(homepage)/components/get-started.svelte
5597+
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
5598+
msgid "Get Started - Create Account"
5599+
msgstr ""
5600+
5601+
#~ msgid "Unicove Your Gateway To The Jungle 4 Network."
5602+
#~ msgstr ""
5603+
5604+
#~ msgid "Create your account in minutes. Stake, swap, and manage your digital assets with complete control."
5605+
#~ msgstr ""
5606+
5607+
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
5608+
msgid ""
5609+
"Create your account in minutes. Stake, swap, and manage your digital assets with complete\n"
5610+
"control."
5611+
msgstr ""
5612+
5613+
#: src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte
5614+
msgid "Unicove Your Gateway To The Vaulta Network."
5615+
msgstr ""
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<script lang="ts">
2+
import { getContext } from 'svelte';
3+
import { goto } from '$app/navigation';
4+
import type { UnicoveContext } from '$lib/state/client.svelte';
5+
import type { LoginOptions } from '@wharfkit/session';
6+
import { Button } from 'unicove-components';
7+
8+
const context = getContext<UnicoveContext>('state');
9+
const urlPath = $derived(context.urlPath);
10+
11+
let webAuthenticatorAvailable = $state(false);
12+
const TARGET_PLUGIN_ID = 'web-authenticator';
13+
14+
console.log(
15+
'[GetStarted] Component initialized for network:',
16+
context.network?.config?.name ?? context.network?.chain?.name ?? 'unknown'
17+
);
18+
19+
function checkAvailability() {
20+
const sessionKit = context.wharf.sessionKit;
21+
if (!sessionKit) {
22+
console.log('[GetStarted] sessionKit not available yet');
23+
webAuthenticatorAvailable = false;
24+
return false;
25+
}
26+
27+
const walletPlugins = sessionKit.walletPlugins;
28+
const summary = walletPlugins.map((w) => ({
29+
id: w.id,
30+
name: w.metadata.name,
31+
description: w.metadata.description
32+
}));
33+
console.log('[GetStarted] All wallet plugins:', summary);
34+
35+
const hasWebAuth = walletPlugins.some((wallet) => wallet.id === TARGET_PLUGIN_ID);
36+
console.log('[GetStarted] Web authenticator present:', hasWebAuth);
37+
webAuthenticatorAvailable = hasWebAuth;
38+
return hasWebAuth;
39+
}
40+
41+
$effect(() => {
42+
if (checkAvailability()) {
43+
return;
44+
}
45+
46+
const interval = setInterval(() => {
47+
if (checkAvailability()) {
48+
clearInterval(interval);
49+
}
50+
}, 250);
51+
52+
return () => {
53+
clearInterval(interval);
54+
};
55+
});
56+
57+
async function handleGetStarted() {
58+
if (!context.wharf.sessionKit) {
59+
return;
60+
}
61+
62+
const webAuthenticatorPlugin = context.wharf.sessionKit.walletPlugins.find(
63+
(wallet) => wallet.id === TARGET_PLUGIN_ID
64+
);
65+
66+
if (!webAuthenticatorPlugin) {
67+
console.error('Web Authenticator plugin not found');
68+
return;
69+
}
70+
71+
const options: LoginOptions = {
72+
walletPlugin: webAuthenticatorPlugin.id,
73+
chain: context.network.chain.id
74+
};
75+
76+
try {
77+
const session = await context.wharf.login(options);
78+
goto(urlPath(`/account/${session.actor}`));
79+
} catch (error) {
80+
console.error('Failed to login with web authenticator:', error);
81+
}
82+
}
83+
</script>
84+
85+
{#if webAuthenticatorAvailable}
86+
<Button variant="primary" class="w-fit" onclick={handleGetStarted}
87+
>Get Started - Create Account</Button
88+
>
89+
{/if}

src/routes/[[locale]]/[network]/(homepage)/components/hero.svelte

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import waxDark from '$lib/assets/hero/wax/dark.png?enhanced';
1212
import UnicoveOutline from '$lib/assets/unicove-outline.svg';
1313
14-
import { Button } from 'unicove-components';
1514
import { browser } from '$app/environment';
15+
import GetStarted from './get-started.svelte';
1616
1717
interface Props {
1818
networkName: string;
@@ -23,7 +23,7 @@
2323
2424
let darkMode = $state(browser && localStorage.getItem('color-scheme') === 'dark');
2525
26-
const logo = {
26+
const logo: Record<string, string> = {
2727
vaulta: vaultaLogo,
2828
telos: telos,
2929
jungle4: jungle4,
@@ -181,11 +181,11 @@
181181
{#snippet vaulta()}
182182
<section
183183
id="hero"
184-
class="@container col-span-full grid h-[70svh] max-h-156 place-content-center sm:pt-12 md:pt-0"
184+
class="@container col-span-full grid gap-y-14 pt-6 sm:pt-12 md:grid-cols-2 md:items-center md:pt-0"
185185
>
186-
<Stack class="relative grid justify-items-center gap-5 text-center">
186+
<div class="row-start-1 flex justify-center md:col-start-1">
187187
<svg
188-
class="z-50 mb-2 h-auto w-64"
188+
class="z-50 h-auto w-64"
189189
width="81"
190190
height="33"
191191
viewBox="0 0 81 33"
@@ -197,28 +197,23 @@
197197
fill="currentColor"
198198
/>
199199
</svg>
200+
</div>
200201

202+
<Stack class="z-10 grid gap-5 text-center md:col-start-2 md:row-start-1 md:text-left">
201203
<h1
202204
class="font-sans-hero max-w-128 text-3xl leading-tight font-bold text-balance lg:text-4xl lg:leading-tight"
203205
>
204-
<span class="">Unicove -</span>
205-
The {networkName} web wallet and block explorer.
206+
Unicove Your Gateway To The Vaulta Network.
206207
</h1>
207208
<p
208209
class="text-muted mb-2 max-w-md rounded-lg text-xl leading-tight text-pretty lg:text-xl lg:leading-tight"
209210
>
210-
Stake, Send, Manage Tokens, and Explore {networkName} – all with ease
211+
Create your account in minutes. Stake, swap, and manage your digital assets with complete
212+
control.
211213
</p>
212214

213215
<div class="grid gap-4">
214-
<!-- <div class="grid gap-4 @2xl:grid-cols-2"> -->
215-
<!-- <Button variant="primary">Create your Vaulta account</Button> -->
216-
<Button
217-
class="text-primary bg-surface-container-lowest/20 backdrop-blur"
218-
href="https://www.vaulta.com/resources/opening-the-gateway-to-web3-banking"
219-
>
220-
EOS rebrands to Vaulta
221-
</Button>
216+
<GetStarted />
222217
</div>
223218
</Stack>
224219
</section>

0 commit comments

Comments
 (0)