Skip to content

Commit

Permalink
feat(ceremony): enable countdown (#2954)
Browse files Browse the repository at this point in the history
  • Loading branch information
cor authored Sep 15, 2024
2 parents e3c87a9 + 1fa5016 commit 4999fe1
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 24 deletions.
2 changes: 1 addition & 1 deletion ceremony/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en" class="scroll-smooth touch-none bg-union-background-primary">
<head>
<meta charset="utf-8"/>
<link rel="icon" href="%sveltekit.assets%/favicon.png"/>
<link rel="icon" href="%sveltekit.assets%/favicon.svg"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Union Ceremony</title>
%sveltekit.head%
Expand Down
2 changes: 1 addition & 1 deletion ceremony/src/lib/components/Counter/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $effect(() => {
})
</script>

<div class="p-8 bg-gradient-to-t from-transparent via-black/70 to-transparent backdrop-blur w-full flex items-center justify-center flex-col min-h-48">
<div class="pointer-events-none p-8 bg-gradient-to-t from-transparent via-black/70 to-transparent backdrop-blur w-full flex items-center justify-center flex-col min-h-48">
<div class="flex flex-col md:flex-row justify-center items-center gap-8">
{@render pair(hours, 'hours')}
{@render pair(minutes, 'minutes')}
Expand Down
1 change: 0 additions & 1 deletion ceremony/src/lib/components/Join.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ function joinWaitlist() {
<Button
loading={codeLoading}
type="button"
onclick={handleCode}
disabled={code.length === 0}
>
ENTER
Expand Down
4 changes: 2 additions & 2 deletions ceremony/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ $effect(() => {

<Toaster position="bottom-right" toastOptions={{ class: 'rounded-none border border-black',}}/>

<Navbar/>
<!--<Navbar/>-->
<canvas
id="canvas3d"
class=" w-full h-auto inset-0 absolute -z-10 canvas-fade"
class=" w-full h-auto inset-0 absolute z-0 canvas-fade"
class:loaded={!loading}
></canvas>

Expand Down
20 changes: 10 additions & 10 deletions ceremony/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ $effect.pre(() => {
if (userId) contributor.setUserId(userId)
})
const targetTimestamp = 1726609600
const targetTimestamp = 1726812000
</script>

<!--Fix jump between state on load-->
{#if contributor.loggedIn}
{#if !contributor.allowanceState}
<Spinner class="text-union-accent-500 size-6"/>
{:else if contributor.allowanceState === "invited"}
<Ceremony {contributor}/>
{:else if contributor.allowanceState === "waitingList"}
<H1>You're on the list</H1>
{:else if contributor.allowanceState === "join"}
<Join {contributor}/>
{/if}
<!--{#if !contributor.allowanceState}-->
<!-- <Spinner class="text-union-accent-500 size-6"/>-->
<!--{:else if contributor.allowanceState === "invited"}-->
<!-- <Ceremony {contributor}/>-->
<!--{:else if contributor.allowanceState === "waitingList"}-->
<!-- <H1>You're on the list</H1>-->
<!--{:else if contributor.allowanceState === "join"}-->
<!-- <Join {contributor}/>-->
<!--{/if}-->
{:else}

<Counter {targetTimestamp}/>
Expand Down
8 changes: 5 additions & 3 deletions ceremony/src/routes/auth/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import Link from "$lib/components/typography/Link.svelte"
import Spinner from "$lib/components/Spinner.svelte"
import { page } from "$app/stores"
import { auth } from "$lib/utils/auth.ts"
import { toast } from "svelte-sonner"
let loading = false
async function login() {
loading = true
await auth(`${$page.url.origin}/`)
function login() {
toast.info("Disabled")
// loading = true
// await auth(`${$page.url.origin}/`)
}
</script>

Expand Down
8 changes: 5 additions & 3 deletions ceremony/src/routes/auth/register/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ import Link from "$lib/components/typography/Link.svelte"
import Spinner from "$lib/components/Spinner.svelte"
import { page } from "$app/stores"
import { auth } from "$lib/utils/auth.ts"
import { toast } from "svelte-sonner"
let loading = false
async function register() {
loading = true
await auth(`${$page.url.origin}/`)
function register() {
toast.info("Disabled")
// loading = true
// await auth(`${$page.url.origin}/`)
}
</script>

Expand Down
3 changes: 0 additions & 3 deletions ceremony/static/favicon.png

This file was deleted.

13 changes: 13 additions & 0 deletions ceremony/static/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4999fe1

Please sign in to comment.