From 6417a61393896b0b7f00728490980d0f75eb5ef1 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 19 Sep 2024 16:14:38 +0200 Subject: [PATCH] feat(ceremony): save progress --- .../src/lib/components/Contribution.svelte | 85 ++++++++++++++ .../src/lib/components/Contributions.svelte | 48 ++++++++ ceremony/src/lib/layout/Navbar/index.svelte | 4 + ceremony/src/lib/supabase/queries.ts | 1 + .../src/routes/contributions/+page.svelte | 109 +----------------- ceremony/static/images/ceremony.png | 3 + 6 files changed, 146 insertions(+), 104 deletions(-) create mode 100644 ceremony/src/lib/components/Contribution.svelte create mode 100644 ceremony/src/lib/components/Contributions.svelte create mode 100644 ceremony/static/images/ceremony.png diff --git a/ceremony/src/lib/components/Contribution.svelte b/ceremony/src/lib/components/Contribution.svelte new file mode 100644 index 0000000000..65c2fcc3c5 --- /dev/null +++ b/ceremony/src/lib/components/Contribution.svelte @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + +{#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 new file mode 100644 index 0000000000..ef688e5f3a --- /dev/null +++ b/ceremony/src/lib/components/Contributions.svelte @@ -0,0 +1,48 @@ + +{#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/layout/Navbar/index.svelte b/ceremony/src/lib/layout/Navbar/index.svelte index 19dd503b55..d38d1f9ab2 100644 --- a/ceremony/src/lib/layout/Navbar/index.svelte +++ b/ceremony/src/lib/layout/Navbar/index.svelte @@ -54,10 +54,12 @@ let loggedIn = $derived(!!user.session?.user.id)