diff --git a/ceremony/src/lib/components/Blink.svelte b/ceremony/src/lib/components/Blink.svelte
index b3202b4057..07fbb95079 100644
--- a/ceremony/src/lib/components/Blink.svelte
+++ b/ceremony/src/lib/components/Blink.svelte
@@ -2,15 +2,16 @@
type Props = {
loading?: boolean
sleep?: boolean
+ love?: boolean
}
-let { loading = false, sleep = false }: Props = $props()
+let { loading = false, sleep = false, love = false }: Props = $props()
-let eye = $state(sleep ? "-" : "0")
+let eye = $state(sleep ? "-" : love ? "♡" : "0")
let blinkInterval: number | NodeJS.Timeout
function blinkEye() {
- if (!sleep) {
+ if (!(sleep || love)) {
eye = "-"
setTimeout(() => {
eye = "0"
@@ -20,7 +21,7 @@ function blinkEye() {
function startRandomBlinking() {
blinkInterval = setInterval(() => {
- if (!sleep && Math.random() < 0.05) {
+ if (!(sleep || love) && Math.random() < 0.05) {
blinkEye()
}
}, 200)
@@ -30,6 +31,9 @@ $effect(() => {
if (sleep) {
eye = "×"
clearInterval(blinkInterval)
+ } else if (love) {
+ eye = "♡"
+ clearInterval(blinkInterval)
} else {
eye = "0"
startRandomBlinking()
@@ -73,31 +77,11 @@ $effect(() => {
}
}
- .wobble span:nth-child(1) {
- animation-delay: 0s;
- }
-
- .wobble span:nth-child(2) {
- animation-delay: 0.1s;
- }
-
- .wobble span:nth-child(3) {
- animation-delay: 0.2s;
- }
-
- .wobble span:nth-child(4) {
- animation-delay: 0.3s;
- }
-
- .wobble span:nth-child(5) {
- animation-delay: 0.4s;
- }
-
- .wobble span:nth-child(6) {
- animation-delay: 0.5s;
- }
-
- .wobble span:nth-child(7) {
- animation-delay: 0.6s;
- }
+ .wobble span:nth-child(1) { animation-delay: 0s; }
+ .wobble span:nth-child(2) { animation-delay: 0.1s; }
+ .wobble span:nth-child(3) { animation-delay: 0.2s; }
+ .wobble span:nth-child(4) { animation-delay: 0.3s; }
+ .wobble span:nth-child(5) { animation-delay: 0.4s; }
+ .wobble span:nth-child(6) { animation-delay: 0.5s; }
+ .wobble span:nth-child(7) { animation-delay: 0.6s; }
\ No newline at end of file
diff --git a/ceremony/src/lib/components/Button.svelte b/ceremony/src/lib/components/Button.svelte
index be4517e179..bed50467d4 100644
--- a/ceremony/src/lib/components/Button.svelte
+++ b/ceremony/src/lib/components/Button.svelte
@@ -20,12 +20,13 @@ let {
}: Props = $props()
const styles = {
- primary: "bg-union-accent-500 text-black hover:text-black",
- secondary: "bg-transparent text-white border-2 border-white hover:bg-neutral-800"
+ primary: "bg-union-accent-500 text-black hover:text-black disabled:bg-neutral-500",
+ secondary:
+ "bg-transparent text-white border-2 border-white hover:bg-neutral-800 disabled:bg-neutral-500"
}
const getClass = (type: "primary" | "secondary") => styles[type] || styles.primary
let combinedClasses = $derived(
- `flex items-center w-fit gap-2 px-4 py-2 font-bold uppercase justify-center ${getClass(variant)} ${className}`
+ `flex items-center w-fit gap-2 px-4 py-2 font-bold uppercase justify-center transition ${getClass(variant)} ${className}`
)
diff --git a/ceremony/src/lib/components/Ceremony.svelte b/ceremony/src/lib/components/Ceremony.svelte
index 5e643f5082..d50b84bc76 100644
--- a/ceremony/src/lib/components/Ceremony.svelte
+++ b/ceremony/src/lib/components/Ceremony.svelte
@@ -8,6 +8,8 @@ import Queue from "$lib/components/Queue.svelte"
import Install from "$lib/components/Install.svelte"
import Thanks from "$lib/components/Thanks.svelte"
import { user } from "$lib/stores/user.svelte.ts"
+import Blink from "$lib/components/Blink.svelte"
+import Warning from "$lib/components/Warning.svelte"
type Props = {
contributor: ContributorState
@@ -28,11 +30,13 @@ $effect(() => {
if (contributor.clientState !== "offline") {
generate()
}
-})
-window.addEventListener("beforeunload", (e: BeforeUnloadEvent) => {
- e.preventDefault()
- e.returnValue = ""
+ if (contributor.state === "contributing" || contributor.state === "inQueue") {
+ window.addEventListener("beforeunload", (e: BeforeUnloadEvent) => {
+ e.preventDefault()
+ e.returnValue = ""
+ })
+ }
})
@@ -40,22 +44,43 @@ window.addEventListener("beforeunload", (e: BeforeUnloadEvent) => {
{#if !contributor.userWallet}
+
+