account create button

This commit is contained in:
CoolElectronics 2023-08-19 19:41:17 -04:00
parent 9474a595c2
commit 5e7cb49361
No known key found for this signature in database
GPG key ID: F63593D168636C50
2 changed files with 39 additions and 19 deletions

View file

@ -12,6 +12,7 @@
Card, Card,
CircularProgressIndeterminate, CircularProgressIndeterminate,
Dialog, Dialog,
RadioAnim3,
SegmentedButtonContainer, SegmentedButtonContainer,
SegmentedButtonItem, SegmentedButtonItem,
StyleFromScheme, StyleFromScheme,
@ -34,6 +35,7 @@
Idle, Idle,
Connecting, Connecting,
Connected, Connected,
AccountCreation,
} }
let state = ReadyState.Idle; let state = ReadyState.Idle;
@ -165,6 +167,8 @@
{#if state == ReadyState.Connected} {#if state == ReadyState.Connected}
<Proxy /> <Proxy />
{:else if state == ReadyState.AccountCreation}
<AccountCreationScreen />
{:else if state == ReadyState.Connecting} {:else if state == ReadyState.Connecting}
<div class="h-full w-full flex justify-center items-center"> <div class="h-full w-full flex justify-center items-center">
<Card type="outlined"> <Card type="outlined">
@ -248,20 +252,27 @@
<h2 class="text-4xl">Select a Tracker</h2> <h2 class="text-4xl">Select a Tracker</h2>
<h2 class="text-1xl">Trackers allow you to connect to Adrift</h2> <h2 class="text-1xl">Trackers allow you to connect to Adrift</h2>
<div class="mt-5"> <div class="mt-5">
<SegmentedButtonContainer> {#each Object.keys(TrackerList) as tracker}
{#each Object.keys(TrackerList) as tracker} <label>
<input <div class="flex items-center">
type="radio" <svelte:component this={RadioAnim3}>
id={tracker} <input
name="tabs" type="radio"
value={tracker} id={tracker}
bind:group={chosenTracker} name="tabs"
/> value={tracker}
<SegmentedButtonItem input={tracker} bind:group={chosenTracker}
>{tracker}</SegmentedButtonItem />
> </svelte:component>
{/each} <p class="m-3 text-xl">
</SegmentedButtonContainer> {tracker}
</p>
</div>
<p>
{TrackerList[tracker].description}
</p>
</label>
{/each}
</div> </div>
<div class="flex-1" /> <div class="flex-1" />
<div class="mt-5 flex"> <div class="mt-5 flex">
@ -290,7 +301,13 @@
> >
</Dialog> </Dialog>
<Dialog headline="Log in to Connect" bind:open={showLogin}> <Dialog headline="Log in to connect" bind:open={showLogin}>
<button
class="text-primary my-3"
on:click={() => (state = ReadyState.AccountCreation)}
>New here? Create an account</button
>
<br />
<TextField name="email" bind:value={email} /> <TextField name="email" bind:value={email} />
<TextField <TextField
name="password" name="password"
@ -298,7 +315,7 @@
extraOptions={{ type: "password" }} extraOptions={{ type: "password" }}
/> />
<div class="flex"> <div class="flex mt-5">
<Button type="outlined" on:click={() => (showLogin = false)} <Button type="outlined" on:click={() => (showLogin = false)}
>Cancel</Button >Cancel</Button
> >
@ -321,7 +338,8 @@
<a class="text-1xl" href="https://discord.gg/bAgNyGpXSx" <a class="text-1xl" href="https://discord.gg/bAgNyGpXSx"
>discord</a >discord</a
> >
<a class="text-1xl" href="https://discord.gg/bAgNyGpXSx">github</a <a class="text-1xl" href="https://github.com/MercuryWorkshop"
>github</a
> >
</div> </div>
<div /> <div />

View file

@ -9,7 +9,8 @@ let trackers = {
appId: "1:175846512414:web:5c6e06d231ab58e9029b0f", appId: "1:175846512414:web:5c6e06d231ab58e9029b0f",
measurementId: "G-L0P2EF6Q72", measurementId: "G-L0P2EF6Q72",
}, },
tracker: "wss://lb1.mercurywork.shop" tracker: "wss://lb1.mercurywork.shop",
description: "the official central tracker",
}, },
"rafftracker": { "rafftracker": {
firebase: { firebase: {
@ -22,7 +23,8 @@ let trackers = {
appId: "1:994948039014:web:f96970aa4f626e969dc8a7", appId: "1:994948039014:web:f96970aa4f626e969dc8a7",
measurementId: "G-PD96ZKX31D" measurementId: "G-PD96ZKX31D"
}, },
tracker: "wss://rafftracker.mercurywork.shop" tracker: "wss://rafftracker.mercurywork.shop",
description: "a second official backup tracker",
} }
}; };
export default trackers; export default trackers;