From 4bdfdf20a97e848d17a17c3d93c9f957c874ebc4 Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 11 Oct 2024 18:21:30 +0200 Subject: [PATCH] fix(ceremony): change and move command --- ceremony/src/lib/components/Terminal/Install/Linux.svelte | 8 +++----- ceremony/src/lib/components/Terminal/Install/MacOS.svelte | 8 +++----- ceremony/src/lib/constants/index.ts | 2 ++ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ceremony/src/lib/components/Terminal/Install/Linux.svelte b/ceremony/src/lib/components/Terminal/Install/Linux.svelte index aedcbbd1cc..9fbd8cf6a7 100644 --- a/ceremony/src/lib/components/Terminal/Install/Linux.svelte +++ b/ceremony/src/lib/components/Terminal/Install/Linux.svelte @@ -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 @@ -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" }]) @@ -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 }, @@ -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 diff --git a/ceremony/src/lib/components/Terminal/Install/MacOS.svelte b/ceremony/src/lib/components/Terminal/Install/MacOS.svelte index ce8abc8389..f3d978c1cd 100644 --- a/ceremony/src/lib/components/Terminal/Install/MacOS.svelte +++ b/ceremony/src/lib/components/Terminal/Install/MacOS.svelte @@ -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 @@ -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" }]) @@ -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." @@ -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 diff --git a/ceremony/src/lib/constants/index.ts b/ceremony/src/lib/constants/index.ts index 175bb7af05..770f35e7aa 100644 --- a/ceremony/src/lib/constants/index.ts +++ b/ceremony/src/lib/constants/index.ts @@ -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"