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

Ceremony fixes #2994

Merged
merged 3 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion ceremony/src/lib/components/Install.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Props = {
let { contributor }: Props = $props()

let command =
"docker pull ghcr.io/unionlabs/union/mpc-client:latest && docker run -p 4919:4919 -it ghcr.io/unionlabs/union/mpc-client:latest"
"mkdir -p ceremony && docker pull ghcr.io/unionlabs/union/mpc-client:latest && docker run -v $(pwd)/ceremony:/ceremony -w /ceremony -p 4919:4919 --rm -it ghcr.io/unionlabs/union/mpc-client:latest"

const copy = () => {
navigator.clipboard.writeText(command)
Expand Down
2 changes: 1 addition & 1 deletion ceremony/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ watch(
<Toaster position="bottom-right" toastOptions={{ class: 'rounded-none border border-black',}}/>
<Navbar/>

<main>
<main class="w-full h-full overflow-y-scroll">
{@render children()}
</main>
10 changes: 8 additions & 2 deletions ceremony/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import Button from "$lib/components/Button.svelte"
import Text from "$lib/components/typography/Text.svelte"
import { supabase } from "$lib/supabase/client.ts"
import { page } from "$app/stores"
import H4 from "$lib/components/typography/H4.svelte"
import { type ContributorState, getContributorState } from "$lib/stores/state.svelte.ts"
import { goto } from "$app/navigation"

let accepted = $state(false)
const contributor: ContributorState = getContributorState()

type AuthProviders = "github" | "google"
const providers: Array<AuthProviders> = ["github", "google"]
Expand All @@ -24,6 +26,10 @@ async function diveIn(provider: AuthProviders) {
console.error("Error signing up with GitHub:", error.message)
}
}

$effect(() => {
if (contributor.loggedIn) goto("0____0")
})
</script>

{#snippet Dive(provider: AuthProviders)}
Expand All @@ -33,7 +39,7 @@ async function diveIn(provider: AuthProviders) {
{/snippet}


<section class="w-full h-svh px-6 lg:px-8 flex flex-col items-center justify-center gap-8">
<section class="w-full h-svh px-6 lg:px-8 flex flex-col items-center justify-center gap-8 mt-[80px] md:mt-0">
<div class="text-5xl font-supermolot font-bold">
<Blink/>
</div>
Expand Down
26 changes: 11 additions & 15 deletions ceremony/src/routes/contributions/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import { getContributions } from "$lib/supabase"
import Spinner from "$lib/components/Spinner.svelte"
import Text from "$lib/components/typography/Text.svelte"
import Blink from "$lib/components/Blink.svelte"
import H4 from "$lib/components/typography/H4.svelte"

let intervalId: NodeJS.Timeout | number
let contributions = $state()
Expand All @@ -27,33 +25,31 @@ function getFirstLetter(str: string): string | undefined {
</script>

{#if contributions}
<div class="flex flex-col-reverse items-center h-svh overflow-y-auto pb-24 pt-36 w-full">
<div class="flex flex-col items-center pb-24 pt-36 w-full overflow-y-scroll">
<div class="w-full h-48 bg-gradient-to-b via-black from-black to-transparent absolute top-0"></div>
<div class="flex flex-col items-center max-w-sm">
<div class="text-white flex gap-2 items-center border-white border px-3 py-2">
<Spinner class="size-5 text-union-accent-500"/>
<span>Next contribution...</span>
</div>
<div class="h-8 w-[2px] bg-white"></div>
{#each contributions as contribution, index }
{#if index !== 0}
<div class="h-8 w-[2px] bg-white"></div>
{/if}
<a href="/contributions/{contribution.public_key_hash}"
class="text-white flex gap-1 items-center border-white border px-3 py-2 w-full">
class="text-white flex gap-2 items-center border-white border p-2 w-full">
{#if contribution.avatar_url}
<img class="size-7" src={contribution.avatar_url} alt="">
{:else}
<div class="flex size-7 bg-union-accent-500 items-center justify-center text-black">{getFirstLetter(contribution.user_name)}</div>
{/if}
<Text class="uppercase max-w-48 truncate">{contribution.user_name}</Text>
</a>
{#if index !== contributions.length - 1}
<div class="h-8 w-[2px] bg-white"></div>
{/if}
{/each}
<div class="h-8 w-[2px] bg-white"></div>
<div class="text-white flex gap-2 items-center border-white border px-3 py-2 mb-16">
<Spinner class="size-5 text-union-accent-500"/>
<span>Next contribution...</span>
</div>
<H4>
<Blink/>
</H4>
</div>
</div>

{:else}
<Spinner class="size-5 text-union-accent-500"/>
{/if}
11 changes: 6 additions & 5 deletions ceremony/src/routes/contributions/[hash]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ const imagePath = "https://ceremony.union.build/images/ceremony.png"

<svelte:head>
<title>Union Ceremony</title>
<meta name="description" content=""/>
<meta name="description" content="Ceremony to generate trustworthy cryptographic keys for securing the Union zero-knowledge system."/>

<meta property="og:title" content="Union Ceremony"/>
<meta property="og:description" content=""/>
<meta property="og:title" content="Union Ceremony "/>
<meta property="og:description" content="Ceremony to generate trustworthy cryptographic keys for securing the Union zero-knowledge system."/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="https://ceremony.union.build"/>
<meta property="og:site_name" content="Union Ceremony"/>
Expand All @@ -50,15 +50,16 @@ const imagePath = "https://ceremony.union.build/images/ceremony.png"
<meta property="og:image:height" content="675"/>
<meta property="og:image:alt" content="Union Ceremony event banner"/>

<meta name="twitter:title" content=""/>
<meta name="twitter:description" content=""/>
<meta name="twitter:title" content="Ceremony to generate trustworthy cryptographic keys for securing the Union zero-knowledge system."/>
<meta name="twitter:description" content="Ceremony to generate trustworthy cryptographic keys for securing the Union zero-knowledge system."/>
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:site" content="@union_build"/>
<meta name="twitter:creator" content="@union_build"/>
<meta name="twitter:image" content={imagePath}/>
<meta name="twitter:image:alt" content="Union Ceremony event banner"/>
</svelte:head>


<div class="w-full flex justify-center mt-[80px] pb-16">
{#await getUserContribution(hash)}
<Spinner class="size-5 text-union-accent-500"/>
Expand Down