Skip to content

Commit

Permalink
fix(ceremony): fix numbers in step (#3061)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swepool authored Oct 2, 2024
2 parents 23b97ae + db65eab commit b80170d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ceremony/src/lib/components/Terminal/Code.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function handleKeyDown(event: KeyboardEvent) {
}
onMount(() => {
terminal.setStep(5)
terminal.setStep(7)
if (inputElement) {
inputElement.focus()
}
Expand Down
4 changes: 2 additions & 2 deletions ceremony/src/lib/components/Terminal/Join.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let selected = $state(false)
let code = $state(false)
onMount(() => {
terminal.setStep(4)
terminal.setStep(6)
terminal.updateHistory({ text: "Access the ceremony", replace: true })
terminal.updateHistory({
text: "We officially support Linux and macOS on Chrome, Firefox, or Brave browsers.",
Expand All @@ -34,8 +34,8 @@ onMount(() => {
replace: true,
type: "warning"
})
terminal.setStep(2)
})
onDestroy(() => {
terminal.clearHistory()
})
Expand Down
2 changes: 1 addition & 1 deletion ceremony/src/lib/components/Terminal/Missed.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { user } from "$lib/state/session.svelte.ts"
const { terminal } = getState()
onMount(() => {
terminal.setStep(9)
terminal.setStep(0)
terminal.updateHistory({ text: "Too bad, you missed your slot.", replace: true })
axiom.ingest("monitor", [{ user: user.session?.user.id, type: "missed" }])
})
Expand Down
6 changes: 3 additions & 3 deletions ceremony/src/lib/components/Terminal/Queue.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let waitingTime = $state<number>(0)
let averages = $state<TimeResult>()
onMount(async () => {
terminal.setStep(6)
terminal.setStep(8)
terminal.updateHistory({ text: "You are in queue" })
axiom.ingest("monitor", [{ user: user.session?.user.id, type: "mount_queue" }])
averages = await getAverageTimes()
Expand All @@ -26,8 +26,8 @@ onDestroy(() => {
})
$effect(() => {
if (averages && contributor.queueState.count) {
waitingTime = (contributor.queueState.count * averages.totalMs) / 1000 / 60
if (averages && contributor.queueState.position) {
waitingTime = (contributor.queueState.position * averages.totalMs) / 1000 / 60
}
})
</script>
Expand Down
2 changes: 1 addition & 1 deletion ceremony/src/lib/components/Terminal/Waitlist.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { user } from "$lib/state/session.svelte.ts"
const { terminal } = getState()
onMount(async () => {
terminal.setStep(5)
terminal.setStep(7)
terminal.updateHistory({ text: "You're on the waitlist" })
terminal.updateHistory({
text: `When the ceremony opens to the public, you will get priority in the queue.`
Expand Down
4 changes: 2 additions & 2 deletions ceremony/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ onMount(() => {
<Queue/>

{:else if contributor.state === 'contribute'}
{terminal.setStep(7)}
{terminal.setStep(9)}
{terminal.updateHistory({text: "Starting contribution...", replace: true})}

{:else if contributor.state === "contributing"}
{terminal.setStep(8)}
{terminal.setStep(9)}
{terminal.updateHistory({text: "Contributing...", replace: true})}

{:else}
Expand Down

0 comments on commit b80170d

Please sign in to comment.