diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 128bdb3138..371cb999d0 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -26,4 +26,4 @@ jobs: - name: Lint commit messages uses: wagoid/commitlint-github-action@v5 with: - failOnWarnings: true + failOnWarnings: false diff --git a/ceremony/.gitattributes b/ceremony/.gitattributes new file mode 100644 index 0000000000..00c3449ec4 --- /dev/null +++ b/ceremony/.gitattributes @@ -0,0 +1,14 @@ +.webp filter=lfs diff=lfs merge=lfs -text +.avif filter=lfs diff=lfs merge=lfs -text +.gif filter=lfs diff=lfs merge=lfs -text +*.otf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.woff2 filter=lfs diff=lfs merge=lfs -text +*.woff filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.psd filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.splinecode filter=lfs diff=lfs merge=lfs -text diff --git a/ceremony/ceremony.nix b/ceremony/ceremony.nix index 3178cce22c..a45508ac92 100644 --- a/ceremony/ceremony.nix +++ b/ceremony/ceremony.nix @@ -19,7 +19,7 @@ _: { { packages = { ceremony = unstablePkgs.buildNpmPackage { - npmDepsHash = "sha256-CEZJ8lBuOrOf65oInkexsrXOaU+rJeUpQ2SGmlTgYbI="; + npmDepsHash = "sha256-H8IOpVmeV1rTpTJKHz3ku0KyzD+R65sLFMnkf4RXRzg="; src = ./.; sourceRoot = "ceremony"; npmFlags = [ "--legacy-peer-deps" ]; diff --git a/ceremony/package-lock.json b/ceremony/package-lock.json index 410005af2b..d9eef7f59e 100644 --- a/ceremony/package-lock.json +++ b/ceremony/package-lock.json @@ -14,7 +14,8 @@ "@tanstack/svelte-query": "^5.54.1", "neverthrow": "^7.1.0", "runed": "^0.15.2", - "svelte-sonner": "^0.3.27" + "svelte-sonner": "^0.3.27", + "tailwind-merge": "^2.5.2" }, "devDependencies": { "@sveltejs/adapter-static": "^3.0.4", @@ -3014,6 +3015,16 @@ "svelte": "^3.0.0 || ^4.0.0 || ^5.0.0-next.1" } }, + "node_modules/tailwind-merge": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.2.tgz", + "integrity": "sha512-kjEBm+pvD+6eAwzJL2Bi+02/9LFLal1Gs61+QB7HvTfQQ0aXwC5LGT8PEt1gS0CWKktKe6ysPTAy3cBC5MeiIg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, "node_modules/tailwindcss": { "version": "3.4.10", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.10.tgz", diff --git a/ceremony/package.json b/ceremony/package.json index 7c01d425b5..93bccf81c0 100644 --- a/ceremony/package.json +++ b/ceremony/package.json @@ -32,6 +32,7 @@ "@tanstack/svelte-query": "^5.54.1", "neverthrow": "^7.1.0", "runed": "^0.15.2", - "svelte-sonner": "^0.3.27" + "svelte-sonner": "^0.3.27", + "tailwind-merge": "^2.5.2" } } diff --git a/ceremony/src/lib/client/index.ts b/ceremony/src/lib/client/index.ts index dbb3249ca7..d61172bffe 100644 --- a/ceremony/src/lib/client/index.ts +++ b/ceremony/src/lib/client/index.ts @@ -1,7 +1,8 @@ import { get, post } from "$lib/client/http.ts" import { getQueuePayloadId } from "$lib/supabase/queries.ts" -import type { ClientState, ContributeBody } from "$lib/client/types.ts" +import type { ContributeBody } from "$lib/client/types.ts" import { supabase } from "$lib/supabase/client.ts" +import type { ClientState } from "$lib/state/contributor.svelte.ts" export const start = async (): Promise => { const { data: session, error: sessionError } = await supabase.auth.refreshSession() diff --git a/ceremony/src/lib/client/types.ts b/ceremony/src/lib/client/types.ts index 520964c661..bb6c440d91 100644 --- a/ceremony/src/lib/client/types.ts +++ b/ceremony/src/lib/client/types.ts @@ -1,4 +1,4 @@ -export type ClientState = +export type ClientStatus = | "idle" | "initializing" | "downloadStarted" diff --git a/ceremony/src/lib/components/Badge.svelte b/ceremony/src/lib/components/Badge.svelte deleted file mode 100644 index 7a1fd29497..0000000000 --- a/ceremony/src/lib/components/Badge.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - -
- {@render children()} -
\ No newline at end of file diff --git a/ceremony/src/lib/components/Blink.svelte b/ceremony/src/lib/components/Blink.svelte index 07fbb95079..e5ddf48cc7 100644 --- a/ceremony/src/lib/components/Blink.svelte +++ b/ceremony/src/lib/components/Blink.svelte @@ -21,7 +21,7 @@ function blinkEye() { function startRandomBlinking() { blinkInterval = setInterval(() => { - if (!(sleep || love) && Math.random() < 0.05) { + if (!(sleep || love) && Math.random() < 0.08) { blinkEye() } }, 200) @@ -45,7 +45,7 @@ $effect(() => { }) - + {eye}_______{eye} diff --git a/ceremony/src/lib/components/Button.svelte b/ceremony/src/lib/components/Button.svelte deleted file mode 100644 index bed50467d4..0000000000 --- a/ceremony/src/lib/components/Button.svelte +++ /dev/null @@ -1,47 +0,0 @@ - - -{#if href} - - {@render children()} - {#if loading} - - {/if} - -{:else} - -{/if} \ No newline at end of file diff --git a/ceremony/src/lib/components/Ceremony.svelte b/ceremony/src/lib/components/Ceremony.svelte deleted file mode 100644 index 82223efa56..0000000000 --- a/ceremony/src/lib/components/Ceremony.svelte +++ /dev/null @@ -1,88 +0,0 @@ - - -
- - {#if !contributor.userWallet} - - - {:else if contributor.state === 'contributed'} - - - {:else if contributor.state === 'verifying'} -

- -

-

Verifying your contribution...

- - - {:else if contributor.clientState === 'offline'} - - - {:else if !contributor.downloadedSecret} - - - {:else if contributor.state === "inQueue"} - - - {:else if contributor.state === 'contribute'} -

- -

-

Starting contribution...

- - - {:else if contributor.state === 'contributing'} -

- -

-

Contributing...

- - - {:else} -

Not able to contribute at this time

- - {/if} - -
- -
\ No newline at end of file diff --git a/ceremony/src/lib/components/Circles.svelte b/ceremony/src/lib/components/Circles.svelte new file mode 100644 index 0000000000..d5e70eb5b6 --- /dev/null +++ b/ceremony/src/lib/components/Circles.svelte @@ -0,0 +1,68 @@ +
+
+ + + + + + +
+
+ + \ No newline at end of file diff --git a/ceremony/src/lib/components/Code.svelte b/ceremony/src/lib/components/Code.svelte deleted file mode 100644 index b0421785d5..0000000000 --- a/ceremony/src/lib/components/Code.svelte +++ /dev/null @@ -1,93 +0,0 @@ - - -
- {#each words as word, index} - handleKeyDown(e, index)} - class="bg-transparent border-b border-white w-20 text-center text-union-accent-500 outline-none focus:ring-0 focus:border-union-accent-500" - style="--tw-ring-color: transparent;" - /> - {#if index !== words.length - 1} -

-

- {/if} - {/each} -
- - - diff --git a/ceremony/src/lib/components/Contribution.svelte b/ceremony/src/lib/components/Contribution.svelte deleted file mode 100644 index 65c2fcc3c5..0000000000 --- a/ceremony/src/lib/components/Contribution.svelte +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - -{#await getUserContribution(hash)} - -{:then contribution} - {#if contribution} -
-
-

Contributor: {contribution.user_name}

-
- -
-
-

Public key

-
{decodeHexString(contribution.public_key)}
- -
- -
-

Signature

-
{decodeHexString(contribution.signature)}
- -
-
-
- {/if} -{/await} \ No newline at end of file diff --git a/ceremony/src/lib/components/Contributions.svelte b/ceremony/src/lib/components/Contributions.svelte deleted file mode 100644 index bc23543ad1..0000000000 --- a/ceremony/src/lib/components/Contributions.svelte +++ /dev/null @@ -1,46 +0,0 @@ - -{#if contributions} - -
-
-
-
-
- {#each contributions as contribution, index } - - - {(index + 1) * 10}M -
- - {contribution.user_name} -
-
- {#if index !== contributions.length - 1} -
- {/if} - {/each} -
-
-{:else} - -{/if} \ No newline at end of file diff --git a/ceremony/src/lib/components/Counter/index.svelte b/ceremony/src/lib/components/Counter/index.svelte deleted file mode 100644 index 931f7b0f0a..0000000000 --- a/ceremony/src/lib/components/Counter/index.svelte +++ /dev/null @@ -1,68 +0,0 @@ - - -
-

Ceremony set to begin

-

2024-09-20 | 10:00 AM (CEST)

-
- {@render pair(hours, 'h')} - {@render pair(minutes, 'm')} - {@render pair(seconds, 's')} -
-
-s - -{#snippet pair(time: string, timeType: string)} -
- {#each time.split('') as digit, index (index + time)} -
-
{digit}
-
- {/each} -
{timeType}
-
-{/snippet} \ No newline at end of file diff --git a/ceremony/src/lib/components/Counter/numbers/eight.svelte b/ceremony/src/lib/components/Counter/numbers/eight.svelte deleted file mode 100644 index ed3001c792..0000000000 --- a/ceremony/src/lib/components/Counter/numbers/eight.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ceremony/src/lib/components/Counter/numbers/five.svelte b/ceremony/src/lib/components/Counter/numbers/five.svelte deleted file mode 100644 index a2f871c3b0..0000000000 --- a/ceremony/src/lib/components/Counter/numbers/five.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ceremony/src/lib/components/Counter/numbers/four.svelte b/ceremony/src/lib/components/Counter/numbers/four.svelte deleted file mode 100644 index 7b37a2a133..0000000000 --- a/ceremony/src/lib/components/Counter/numbers/four.svelte +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ceremony/src/lib/components/Counter/numbers/nine.svelte b/ceremony/src/lib/components/Counter/numbers/nine.svelte deleted file mode 100644 index 220bedb8c3..0000000000 --- a/ceremony/src/lib/components/Counter/numbers/nine.svelte +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ceremony/src/lib/components/Counter/numbers/one.svelte b/ceremony/src/lib/components/Counter/numbers/one.svelte deleted file mode 100644 index c6d3c1a452..0000000000 --- a/ceremony/src/lib/components/Counter/numbers/one.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ceremony/src/lib/components/Counter/numbers/seven.svelte b/ceremony/src/lib/components/Counter/numbers/seven.svelte deleted file mode 100644 index a752500cde..0000000000 --- a/ceremony/src/lib/components/Counter/numbers/seven.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ceremony/src/lib/components/Counter/numbers/six.svelte b/ceremony/src/lib/components/Counter/numbers/six.svelte deleted file mode 100644 index 2531052ddf..0000000000 --- a/ceremony/src/lib/components/Counter/numbers/six.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ceremony/src/lib/components/Counter/numbers/three.svelte b/ceremony/src/lib/components/Counter/numbers/three.svelte deleted file mode 100644 index bc086b99b6..0000000000 --- a/ceremony/src/lib/components/Counter/numbers/three.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ceremony/src/lib/components/Counter/numbers/two.svelte b/ceremony/src/lib/components/Counter/numbers/two.svelte deleted file mode 100644 index ce802d0871..0000000000 --- a/ceremony/src/lib/components/Counter/numbers/two.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ceremony/src/lib/components/Counter/numbers/zero.svelte b/ceremony/src/lib/components/Counter/numbers/zero.svelte deleted file mode 100644 index c07ecef452..0000000000 --- a/ceremony/src/lib/components/Counter/numbers/zero.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ceremony/src/lib/components/Download.svelte b/ceremony/src/lib/components/Download.svelte deleted file mode 100644 index f6cd27f568..0000000000 --- a/ceremony/src/lib/components/Download.svelte +++ /dev/null @@ -1,49 +0,0 @@ - - -{#if !download} -

Generate your PGP secret

- - The MPC client automatically uses this secret to sign your contribution.
- Your secret is locally generated through the MPC client. -
- -{:else} -

Store your PGP secret

- - Please store your secret somewhere safe, such as in your password manager. -
There's no need to open the file and remember to never share a secret. -
This secret key is the only way to prove that you have contributed. -
-
- - -
-{/if} \ No newline at end of file diff --git a/ceremony/src/lib/components/Install.svelte b/ceremony/src/lib/components/Install.svelte deleted file mode 100644 index 74a0c8a313..0000000000 --- a/ceremony/src/lib/components/Install.svelte +++ /dev/null @@ -1,92 +0,0 @@ - - -{#if contributor} -
- -

Run the MPC client

- - You must have docker installed in order to contribute.
On linux, install docker through your package manager, and skip to step 5. -
- On macOS, we highly recommend - OrbStack - because Docker Desktop is too slow. -
- - If you use Docker Desktop it is extremely likely that you will lose your contribution slot. - -
- - 1. Install OrbStack - - - 2. Open OrbStack from the Applications/ folder - - - 3. Click allow on the OrbStack popups - - - 4. Open Terminal from the Applications/Utilities/ folder - - - 5. Paste the following command in Terminal to start the MPC client: - -
- -
- - Once the MPC client is running you can return to this page. - - - If the MPC client is running but you still see this page, ensure that you are using either Chrome, FireFox or Brave. -
- For Brave, disable the shields in the address bar. -
- {#if isSafari()} -
- Safari is not supported -
- {/if} -
-{/if} diff --git a/ceremony/src/lib/components/Join.svelte b/ceremony/src/lib/components/Join.svelte deleted file mode 100644 index e4c347d54f..0000000000 --- a/ceremony/src/lib/components/Join.svelte +++ /dev/null @@ -1,61 +0,0 @@ - - -
- -

Join the ceremony

- Have an invite? Enter your code below. -
- - - Or -

Don't have an invite?

- You can join the waitlist now to get priority access when the ceremony opens. - -
diff --git a/ceremony/src/lib/components/Live.svelte b/ceremony/src/lib/components/Live.svelte deleted file mode 100644 index 9d80e2c1a6..0000000000 --- a/ceremony/src/lib/components/Live.svelte +++ /dev/null @@ -1,34 +0,0 @@ - - -
- {#each live as item (item.created_at)} -
{JSON.stringify(item)}
- {/each} -
\ No newline at end of file diff --git a/ceremony/src/lib/components/Queue.svelte b/ceremony/src/lib/components/Queue.svelte deleted file mode 100644 index 6740d88375..0000000000 --- a/ceremony/src/lib/components/Queue.svelte +++ /dev/null @@ -1,39 +0,0 @@ - - -

- -

-
-

You are {contributor.queueState.position}{getNumberSuffix(contributor.queueState.position)} in queue

- - -
-

Queue length: {contributor.queueState.count}

-

Waiting time: {contributor.queueState.estimatedTime} minutes - (est.). -

-
- -
\ No newline at end of file diff --git a/ceremony/src/lib/components/Reward.svelte b/ceremony/src/lib/components/Reward.svelte deleted file mode 100644 index 807b40515c..0000000000 --- a/ceremony/src/lib/components/Reward.svelte +++ /dev/null @@ -1,50 +0,0 @@ - - -
-

Add an address

- You may receive rewards for successful contributions. - You can enter your union or any cosmos address. - (addressValidState = result)} {contributor} /> - Or -

I don't want rewards

- You can contribute without adding an address. - -
\ No newline at end of file diff --git a/ceremony/src/lib/components/SwimLoad.svelte b/ceremony/src/lib/components/SwimLoad.svelte deleted file mode 100644 index 24c358a796..0000000000 --- a/ceremony/src/lib/components/SwimLoad.svelte +++ /dev/null @@ -1,43 +0,0 @@ - - -{#if current && max} -
-
- - - - -
-
- Start - Finish -
-
-{/if} - - - diff --git a/ceremony/src/lib/components/Terminal/Activity.svelte b/ceremony/src/lib/components/Terminal/Activity.svelte new file mode 100644 index 0000000000..09fbcee2c5 --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Activity.svelte @@ -0,0 +1,45 @@ + + +{#if activity.data} + {#each activity.data as item, i (item)} + {@const type = item.message.type} + {@const user = item.message.user} + + {formatTimestamp(item.created_at)} - + {#if type === "join_waitlist"} + {user} joined the waitlist + {:else if type === "redeem"} + {user} have redeemed a code + {:else if type === "join_queue"} + {user} joined the queue + {:else if type === "contribution_started"} + {user} have started their contribution + {:else if type === "contribution_submitted"} + {user} has submitted their contribution + {:else if type === "contribution_verified"} + {user} contribution just verified + {/if} + + + {/each} +{/if} \ No newline at end of file diff --git a/ceremony/src/lib/components/Terminal/Authenticate.svelte b/ceremony/src/lib/components/Terminal/Authenticate.svelte new file mode 100644 index 0000000000..61843e52ae --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Authenticate.svelte @@ -0,0 +1,86 @@ + + +{#if !redirecting} + + {#each providers as provider, index} + + {/each} +
+ By logging in, I acknowledge that my name, email address, and optional wallet address will be part of the publicly viewable MPC ceremony data. I agree that this data will never be deleted as it is encoded in my contribution. + +{/if} \ No newline at end of file diff --git a/ceremony/src/lib/components/Terminal/Button.svelte b/ceremony/src/lib/components/Terminal/Button.svelte new file mode 100644 index 0000000000..56ae3f3347 --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Button.svelte @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git a/ceremony/src/lib/components/Terminal/Ceremony.svelte b/ceremony/src/lib/components/Terminal/Ceremony.svelte new file mode 100644 index 0000000000..049fb5ce1f --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Ceremony.svelte @@ -0,0 +1,52 @@ + + +{#if !contributor.userWallet} + {terminal.setStep(4)} + + +{:else if contributor.state === "contributed"} + {terminal.setStep(10)} + + +{:else if !contributor.downloadedSecret && contributor.clientState === "idle"} + {terminal.setStep(6)} + + +{:else if contributor.state === "verifying"} + {terminal.setStep(9)} + {terminal.updateHistory("Verifying your contribution...", {replace: true})} + +{:else if contributor.clientState === "offline" || contributor.clientState === undefined} + {terminal.setStep(5)} + + +{:else if contributor.state === "inQueue"} + {terminal.setStep(7)} + + +{:else if contributor.state === 'contribute'} + {terminal.setStep(8)} + {terminal.updateHistory("Starting contribution...", {replace: true})} + +{:else if contributor.state === "contributing"} + {terminal.setStep(9)} + {terminal.updateHistory("Contributing...", {replace: true})} + +{:else} + Not able to contribute at this time +{/if} diff --git a/ceremony/src/lib/components/Terminal/Code.svelte b/ceremony/src/lib/components/Terminal/Code.svelte new file mode 100644 index 0000000000..cd0be1716c --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Code.svelte @@ -0,0 +1,55 @@ + + +{#if showInput} +
+
+ Enter code: +
+ +
+{/if} + +{#if showConfirm} + +{/if} diff --git a/ceremony/src/lib/components/Terminal/Confirm.svelte b/ceremony/src/lib/components/Terminal/Confirm.svelte new file mode 100644 index 0000000000..5d3ef8002b --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Confirm.svelte @@ -0,0 +1,95 @@ + + +IF YOU ENTER THE QUEUE THEN YOU MUST HAVE YOUR BROWSER AND TERMINAL OPEN WHEN IT IS YOUR + TURN. + YOU CANNOT LEAVE THE QUEUE, AND WHEN IT IS YOUR TURN YOU NEED TO CONTRIBUTE + +
+ + + + diff --git a/ceremony/src/lib/components/Terminal/Contributors.svelte b/ceremony/src/lib/components/Terminal/Contributors.svelte new file mode 100644 index 0000000000..b008a7febd --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Contributors.svelte @@ -0,0 +1,63 @@ + + + {#each contributions.data as contributor, index} + + {/each} \ No newline at end of file diff --git a/ceremony/src/lib/components/Terminal/Install/Linux.svelte b/ceremony/src/lib/components/Terminal/Install/Linux.svelte new file mode 100644 index 0000000000..0ef7006e1b --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Install/Linux.svelte @@ -0,0 +1,107 @@ + + +{#if showButtons} + + + +{/if} diff --git a/ceremony/src/lib/components/Terminal/Install/MacOS.svelte b/ceremony/src/lib/components/Terminal/Install/MacOS.svelte new file mode 100644 index 0000000000..84eb72a02b --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Install/MacOS.svelte @@ -0,0 +1,118 @@ + + +{#if showButtons} + + + +{/if} diff --git a/ceremony/src/lib/components/Terminal/Install/SelectOS.svelte b/ceremony/src/lib/components/Terminal/Install/SelectOS.svelte new file mode 100644 index 0000000000..87da3cf84b --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Install/SelectOS.svelte @@ -0,0 +1,58 @@ + + + +{#if showButtons} + {#each selections as os, index} + + {/each} +{/if} diff --git a/ceremony/src/lib/components/Terminal/Install/index.svelte b/ceremony/src/lib/components/Terminal/Install/index.svelte new file mode 100644 index 0000000000..9774d11d43 --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Install/index.svelte @@ -0,0 +1,42 @@ + + +{#if !selectedOs} + +{:else if selectedOs === "macOS"} + +{:else if selectedOs === "Linux"} + +{/if} + diff --git a/ceremony/src/lib/components/Terminal/Join.svelte b/ceremony/src/lib/components/Terminal/Join.svelte new file mode 100644 index 0000000000..804afd1298 --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Join.svelte @@ -0,0 +1,114 @@ + + +{terminal.updateHistory("Access the ceremony")} + +{#if !selected} + {#if code } + + {:else } + {#each buttons as button, index} + + {/each} + {/if} + +{/if} + + diff --git a/ceremony/src/lib/components/Terminal/LoadingBar.svelte b/ceremony/src/lib/components/Terminal/LoadingBar.svelte new file mode 100644 index 0000000000..e238c317a3 --- /dev/null +++ b/ceremony/src/lib/components/Terminal/LoadingBar.svelte @@ -0,0 +1,34 @@ + + +{queueBar} - {percentageText} \ No newline at end of file diff --git a/ceremony/src/lib/components/Terminal/Print.svelte b/ceremony/src/lib/components/Terminal/Print.svelte new file mode 100644 index 0000000000..5804926f37 --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Print.svelte @@ -0,0 +1,5 @@ + + +

{@render children()}

\ No newline at end of file diff --git a/ceremony/src/lib/components/Terminal/Queue.svelte b/ceremony/src/lib/components/Terminal/Queue.svelte new file mode 100644 index 0000000000..30a2e9c336 --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Queue.svelte @@ -0,0 +1,27 @@ + + +Your position: {contributor.queueState.position ?? 1} +Queue length: {contributor.queueState.count ?? 2} +Estimated waiting time: {contributor.queueState.estimatedTime} minutes +
+ +
+Your MPC Client is connected. +Do not close this tab or your Terminal. +Ensure you have a reliable internet connection and that your computer does not go to sleep. + diff --git a/ceremony/src/lib/components/Terminal/Reward.svelte b/ceremony/src/lib/components/Terminal/Reward.svelte new file mode 100644 index 0000000000..2b69f52861 --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Reward.svelte @@ -0,0 +1,32 @@ + + +{#if showInput} +
+
+ Enter address: +
+ +
+{/if} \ No newline at end of file diff --git a/ceremony/src/lib/components/Terminal/Secret.svelte b/ceremony/src/lib/components/Terminal/Secret.svelte new file mode 100644 index 0000000000..6e0a94280e --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Secret.svelte @@ -0,0 +1,106 @@ + + +{#if !generating} + {#if !generated} + + {:else} + + + {/if} +{/if} diff --git a/ceremony/src/lib/components/Terminal/TaskBar.svelte b/ceremony/src/lib/components/Terminal/TaskBar.svelte new file mode 100644 index 0000000000..cab9e22da1 --- /dev/null +++ b/ceremony/src/lib/components/Terminal/TaskBar.svelte @@ -0,0 +1,26 @@ + + +
+
+
+ [{progressBar}] +
+ {terminal.currentStep}/{terminal.maxStep} COMPLETED +
+ + {#if contributor.clientState !== "offline" && contributor.clientState !== undefined} +
+
+ CONNECTED +
+ {/if} +
\ No newline at end of file diff --git a/ceremony/src/lib/components/Terminal/Thanks.svelte b/ceremony/src/lib/components/Terminal/Thanks.svelte new file mode 100644 index 0000000000..e280ccda53 --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Thanks.svelte @@ -0,0 +1,99 @@ + + +{#if showButtons} + {#each buttons as btn, index} + + {/each} +{/if} \ No newline at end of file diff --git a/ceremony/src/lib/components/Terminal/Timer.svelte b/ceremony/src/lib/components/Terminal/Timer.svelte new file mode 100644 index 0000000000..a350ed7b86 --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Timer.svelte @@ -0,0 +1,64 @@ + + +{#if contributor.loggedIn} + +{/if} diff --git a/ceremony/src/lib/components/Terminal/Waitlist.svelte b/ceremony/src/lib/components/Terminal/Waitlist.svelte new file mode 100644 index 0000000000..8270db1166 --- /dev/null +++ b/ceremony/src/lib/components/Terminal/Waitlist.svelte @@ -0,0 +1,24 @@ + + + diff --git a/ceremony/src/lib/components/Terminal/index.svelte b/ceremony/src/lib/components/Terminal/index.svelte new file mode 100644 index 0000000000..9ed05010a9 --- /dev/null +++ b/ceremony/src/lib/components/Terminal/index.svelte @@ -0,0 +1,128 @@ + + + +
+ + +
+
+ + + + + + + + + + + {#if terminal.hash !== undefined} + + {/if} +
+ {#if user.session?.user} + + {/if} +
+ + +
+
+ {#if terminal.tab === 1} +
+ {#each terminal.history as text} + {text} + {/each} +
+
+ {@render children()} + {:else if terminal.tab === 2} + + {:else if terminal.tab === 3} + + {:else if terminal.tab === 4 && terminal.hash} + {@render children()} + {/if} +
+
+ + + +
+ + + diff --git a/ceremony/src/lib/components/Thanks.svelte b/ceremony/src/lib/components/Thanks.svelte deleted file mode 100644 index e3ae2717e8..0000000000 --- a/ceremony/src/lib/components/Thanks.svelte +++ /dev/null @@ -1,23 +0,0 @@ - -
-

-

Thank you!

- Your contribution is complete. Thank you for securing the Union network.
Tweet your cryptographic attestation for extra transparency:
- - - View contributions - -
\ No newline at end of file diff --git a/ceremony/src/lib/components/Tweet.svelte b/ceremony/src/lib/components/Tweet.svelte deleted file mode 100644 index 18533afa47..0000000000 --- a/ceremony/src/lib/components/Tweet.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - - \ No newline at end of file diff --git a/ceremony/src/lib/components/Waitlist.svelte b/ceremony/src/lib/components/Waitlist.svelte deleted file mode 100644 index 378cf582d1..0000000000 --- a/ceremony/src/lib/components/Waitlist.svelte +++ /dev/null @@ -1,23 +0,0 @@ - - -

You're on the waitlist

-When the ceremony opens to the public, you will be {contributor.waitListPosition}{getNumberSuffix(contributor.waitListPosition)} in the public queue. -You will receive an email 12-18 hours before the public phase begins. -

Received an invite?

-You can skip the waitlist and join now. -
- - \ No newline at end of file diff --git a/ceremony/src/lib/components/Warning.svelte b/ceremony/src/lib/components/Warning.svelte deleted file mode 100644 index fae0dc7a2d..0000000000 --- a/ceremony/src/lib/components/Warning.svelte +++ /dev/null @@ -1,21 +0,0 @@ - - -
- {#if stupid} - Your MPC Client is connected. - Do not close this tab or your Terminal. - {/if} - Ensure you have a reliable internet connection
and that your computer does - not go to sleep. -
-
\ No newline at end of file diff --git a/ceremony/src/lib/components/address/AddressForm.svelte b/ceremony/src/lib/components/address/AddressForm.svelte index cc744564a8..2856195bf9 100644 --- a/ceremony/src/lib/components/address/AddressForm.svelte +++ b/ceremony/src/lib/components/address/AddressForm.svelte @@ -1,97 +1,112 @@ -
+ -
diff --git a/ceremony/src/lib/components/address/index.ts b/ceremony/src/lib/components/address/index.ts index 9603cf679d..837d28ee9b 100644 --- a/ceremony/src/lib/components/address/index.ts +++ b/ceremony/src/lib/components/address/index.ts @@ -1,5 +1,5 @@ import AddressForm from "./AddressForm.svelte" -export type ValidState = "PENDING" | "VALID" | "INVALID" +export type ValidState = "PENDING" | "VALID" | "INVALID" | "SKIPPED" | undefined export { AddressForm } diff --git a/ceremony/src/lib/components/typography/H1.svelte b/ceremony/src/lib/components/typography/H1.svelte deleted file mode 100644 index 67ef60ffcd..0000000000 --- a/ceremony/src/lib/components/typography/H1.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - -

- {@render children()} -

diff --git a/ceremony/src/lib/components/typography/H2.svelte b/ceremony/src/lib/components/typography/H2.svelte deleted file mode 100644 index 68edddf547..0000000000 --- a/ceremony/src/lib/components/typography/H2.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - -

- {@render children()} -

diff --git a/ceremony/src/lib/components/typography/H3.svelte b/ceremony/src/lib/components/typography/H3.svelte deleted file mode 100644 index 174bf012a7..0000000000 --- a/ceremony/src/lib/components/typography/H3.svelte +++ /dev/null @@ -1,6 +0,0 @@ - -

- {@render children()} -

diff --git a/ceremony/src/lib/components/typography/H4.svelte b/ceremony/src/lib/components/typography/H4.svelte deleted file mode 100644 index c9bc1165a2..0000000000 --- a/ceremony/src/lib/components/typography/H4.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - -

- {@render children()} -

diff --git a/ceremony/src/lib/components/typography/H5.svelte b/ceremony/src/lib/components/typography/H5.svelte deleted file mode 100644 index f998ecbe96..0000000000 --- a/ceremony/src/lib/components/typography/H5.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - -
- {@render children()} -
diff --git a/ceremony/src/lib/components/typography/H6.svelte b/ceremony/src/lib/components/typography/H6.svelte deleted file mode 100644 index 04431af3bd..0000000000 --- a/ceremony/src/lib/components/typography/H6.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - -
- {@render children()} -
diff --git a/ceremony/src/lib/components/typography/Link.svelte b/ceremony/src/lib/components/typography/Link.svelte deleted file mode 100644 index de0ef67884..0000000000 --- a/ceremony/src/lib/components/typography/Link.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - - - {@render children()} - \ No newline at end of file diff --git a/ceremony/src/lib/components/typography/Text.svelte b/ceremony/src/lib/components/typography/Text.svelte deleted file mode 100644 index 5315bdb170..0000000000 --- a/ceremony/src/lib/components/typography/Text.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - -

- {@render children()} -

diff --git a/ceremony/src/lib/layout/Navbar/index.svelte b/ceremony/src/lib/layout/Navbar/index.svelte index bc1046dcf0..657f2c7709 100644 --- a/ceremony/src/lib/layout/Navbar/index.svelte +++ b/ceremony/src/lib/layout/Navbar/index.svelte @@ -1,10 +1,10 @@ - - +{#if showBootSequence} + +{:else} + +
+ + {@render children()} + + +
+{/if} -
- {@render children()} -
\ No newline at end of file + diff --git a/ceremony/src/routes/+layout.ts b/ceremony/src/routes/+layout.ts index 2eb647d441..1d17ade893 100644 --- a/ceremony/src/routes/+layout.ts +++ b/ceremony/src/routes/+layout.ts @@ -1,5 +1,5 @@ -import { checkAuth, type SessionError } from "$lib/utils/auth.ts" -import type { LayoutLoad } from "./$types.ts" +import { checkAuth, type SessionError } from "$lib/state/session.svelte.ts" +import type { LayoutLoad } from "../../.svelte-kit/types/src/routes/$types.ts" import { redirect } from "@sveltejs/kit" export const ssr = false @@ -11,7 +11,7 @@ export const load: LayoutLoad = async ({ url }) => { if (pathname) { const segments = pathname.split("/").filter(Boolean) - if (segments[0] === "0____0") { + if (segments[0] === "terminal") { const authCheck = await checkAuth() return authCheck.match( () => { diff --git a/ceremony/src/routes/+page.svelte b/ceremony/src/routes/+page.svelte index 5131e0ae0e..be2065a484 100644 --- a/ceremony/src/routes/+page.svelte +++ b/ceremony/src/routes/+page.svelte @@ -1,68 +1,31 @@ -{#snippet Dive(provider: AuthProviders)} - -{/snippet} - - -
-
- -
-

Welcome to the Union Ceremony

-
- Participation is currently invite only. - If you don’t have an invitation, please join the waitlist. -
-
-
-
- {#each providers as provider} - {@render Dive(provider)} - {/each} -
-
-
-
- -
-
- I acknowledge that my name, email address, and optional wallet address will be part of the publicly viewable MPC ceremony data. I agree that this data will never be deleted as it is encoded in my contribution. -
-
-
-
\ No newline at end of file +{#if user.loading} + loading... +{:else} + {#if user.session} + {#if contributor.currentUserState === "hasRedeemed" || contributor.currentUserState === "inQueue"} + + {:else if contributor.currentUserState === "inWaitlist"} + + {:else if contributor.currentUserState === "join"} + + {/if} + {:else if user.session === null && terminal.tab === 1} + + {/if} +{/if} diff --git a/ceremony/src/routes/0____0/+page.svelte b/ceremony/src/routes/0____0/+page.svelte deleted file mode 100644 index a7236a634f..0000000000 --- a/ceremony/src/routes/0____0/+page.svelte +++ /dev/null @@ -1,23 +0,0 @@ - - -
- {#if contributor.loggedIn} - {#if !contributor.currentUserState} - - {:else if contributor.currentUserState === "hasRedeemed" || contributor.currentUserState === "inQueue"} - - {:else if contributor.currentUserState === "inWaitlist"} - - {:else if contributor.currentUserState === "join"} - - {/if} - {/if} -
\ No newline at end of file diff --git a/ceremony/src/routes/contributions/+page.svelte b/ceremony/src/routes/contributions/+page.svelte deleted file mode 100644 index d3fb7dc473..0000000000 --- a/ceremony/src/routes/contributions/+page.svelte +++ /dev/null @@ -1,59 +0,0 @@ - - -{#if contributions} -
-
-
-
- - Next contribution... -
- {@render ContributionConnector()} - {#each contributions as contribution, index } - {@render ContributionBox(contribution)} - {@render ContributionConnector()} - {/each} - {@render ContributionBox({ user_name: "Genesis", payload_id: "00000000-0000-0000-0000-000000000000"})} -
-
- -{:else} - -{/if} - - -{#snippet ContributionBox(contribution: unknown)} - -
{getFirstLetter(contribution.user_name)}
- {contribution.payload_id} -
-{/snippet} - -{#snippet ContributionConnector()} -
-{/snippet} diff --git a/ceremony/src/routes/contributions/[hash]/+page.svelte b/ceremony/src/routes/contributions/[hash]/+page.svelte index 6a31a4286e..6b645ac1db 100644 --- a/ceremony/src/routes/contributions/[hash]/+page.svelte +++ b/ceremony/src/routes/contributions/[hash]/+page.svelte @@ -1,13 +1,54 @@