Skip to content

Commit

Permalink
fix(ceremony): change and move command (#3097)
Browse files Browse the repository at this point in the history
  • Loading branch information
Swepool authored Oct 11, 2024
2 parents 9cf2726 + 4bdfdf2 commit 26ece34
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
8 changes: 3 additions & 5 deletions ceremony/src/lib/components/Terminal/Install/Linux.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { sleep } from "$lib/utils/utils.ts"
import Buttons from "$lib/components/Terminal/Install/Buttons.svelte"
import { axiom } from "$lib/utils/axiom.ts"
import { user } from "$lib/state/session.svelte.ts"
import { COMMAND } from "$lib/constants"
type Props = {
change: () => void
Expand All @@ -15,9 +16,6 @@ let { change }: Props = $props()
let showButtons = $state(true)
let command =
"mkdir -p ceremony && docker pull ghcr.io/unionlabs/union/mpc-client:multi && docker run -v $(pwd)/ceremony:/ceremony -w /ceremony -p 4919:4919 --rm -it ghcr.io/unionlabs/union/mpc-client:multi"
onMount(() => {
terminal.setStep(3)
axiom.ingest("monitor", [{ user: user.session?.user.id, type: "mount_linux" }])
Expand All @@ -26,7 +24,7 @@ onMount(() => {
text: "You must have docker installed and running in order to contribute. Once you have docker running, copy the following command in your terminal:"
},
{ text: "---", duplicate: true },
{ text: command, duplicate: true },
{ text: COMMAND, duplicate: true },
{ text: "---", duplicate: true },
{ text: "Once the MPC client is running you can return to this page.", duplicate: true },
{ text: "---", duplicate: true },
Expand All @@ -46,7 +44,7 @@ const copy = async () => {
showButtons = false
terminal.updateHistory({ text: "Copying command...", duplicate: true })
await sleep(500)
await navigator.clipboard.writeText(command)
await navigator.clipboard.writeText(COMMAND)
terminal.updateHistory({ text: "Command copied!", duplicate: true })
await sleep(500)
showButtons = true
Expand Down
8 changes: 3 additions & 5 deletions ceremony/src/lib/components/Terminal/Install/MacOS.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { sleep } from "$lib/utils/utils.ts"
import Buttons from "$lib/components/Terminal/Install/Buttons.svelte"
import { axiom } from "$lib/utils/axiom.ts"
import { user } from "$lib/state/session.svelte.ts"
import { COMMAND } from "$lib/constants"
type Props = {
change: () => void
Expand All @@ -15,9 +16,6 @@ let { change }: Props = $props()
let showButtons = $state(true)
let command =
"mkdir -p ceremony && docker pull ghcr.io/unionlabs/union/mpc-client:v1.0 && docker run -v $(pwd)/ceremony:/ceremony -w /ceremony -p 4919:4919 --rm -it ghcr.io/unionlabs/union/mpc-client:v1.0"
onMount(() => {
terminal.setStep(3)
axiom.ingest("monitor", [{ user: user.session?.user.id, type: "mount_macos" }])
Expand All @@ -38,7 +36,7 @@ onMount(() => {
text: "5. Paste the following command in Terminal to start the MPC client:"
},
{ text: "---", duplicate: true },
{ text: command },
{ text: COMMAND },
{ text: "---", duplicate: true },
{
text: "Once the MPC client is running you can return to this page."
Expand All @@ -59,7 +57,7 @@ const copy = async () => {
showButtons = false
terminal.updateHistory({ text: "Copying command...", duplicate: true })
await sleep(500)
await navigator.clipboard.writeText(command)
await navigator.clipboard.writeText(COMMAND)
terminal.updateHistory({ text: "Command copied!", duplicate: true })
await sleep(500)
showButtons = true
Expand Down
2 changes: 2 additions & 0 deletions ceremony/src/lib/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export const AXIOM_KEY = "xaat-c2ba1f52-0af4-4814-81d1-996c285912c8"
export const COMMAND =
"mkdir -p ceremony && docker pull ghcr.io/unionlabs/union/mpc-client:v1.1 && docker run -v $(pwd)/ceremony:/ceremony -w /ceremony -p 4919:4919 --rm -it ghcr.io/unionlabs/union/mpc-client:v1.1"

0 comments on commit 26ece34

Please sign in to comment.