diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 60cece8..0ba4c12 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -3,7 +3,7 @@ name: Deploy Miden Assembly Playground on: push: branches: - - main + - dominik_fix_build_again jobs: build: diff --git a/playground/public/miden_tx_demo_prepare.mp4 b/playground/public/miden_tx_demo_prepare.mp4 index 54be4f6..4855b13 100644 Binary files a/playground/public/miden_tx_demo_prepare.mp4 and b/playground/public/miden_tx_demo_prepare.mp4 differ diff --git a/playground/public/miden_tx_demo_prepared.png b/playground/public/miden_tx_demo_prepared.png new file mode 100644 index 0000000..82f322d Binary files /dev/null and b/playground/public/miden_tx_demo_prepared.png differ diff --git a/playground/public/miden_tx_demo_prove.mp4 b/playground/public/miden_tx_demo_prove.mp4 index 0755640..182278f 100644 Binary files a/playground/public/miden_tx_demo_prove.mp4 and b/playground/public/miden_tx_demo_prove.mp4 differ diff --git a/playground/public/miden_tx_demo_proven.png b/playground/public/miden_tx_demo_proven.png new file mode 100644 index 0000000..97a0e24 Binary files /dev/null and b/playground/public/miden_tx_demo_proven.png differ diff --git a/playground/src/index.css b/playground/src/index.css index 49de4df..8f1d44f 100644 --- a/playground/src/index.css +++ b/playground/src/index.css @@ -5,6 +5,7 @@ body { margin: 0; + background-color: #f5f5f5; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; diff --git a/playground/src/pages/CodingEnvironment.tsx b/playground/src/pages/CodingEnvironment.tsx index bd896ed..1986cfd 100644 --- a/playground/src/pages/CodingEnvironment.tsx +++ b/playground/src/pages/CodingEnvironment.tsx @@ -13,9 +13,6 @@ import init, { run_program, prove_program, verify_program, - prepare_transaction, - prove_transaction, - verify_transaction, } from "miden-wasm"; import toast, { Toaster } from "react-hot-toast"; import { @@ -27,7 +24,7 @@ import { emptyOutput, exampleCode, exampleInput } from "../utils/constants"; export default function CodingEnvironment(): JSX.Element { - const [isProcessing, setIsProcessing] = useState(false); + const [isProcessing, setIsProcessing] = React.useState(false); /** * This sets the inputs to the default values. @@ -271,4 +268,4 @@ export default function CodingEnvironment(): JSX.Element { ); -} \ No newline at end of file +} diff --git a/playground/src/pages/TxProof.tsx b/playground/src/pages/TxProof.tsx index b5283f0..158dd27 100644 --- a/playground/src/pages/TxProof.tsx +++ b/playground/src/pages/TxProof.tsx @@ -1,4 +1,4 @@ -import useState from "react"; +import React from "react"; import ActionButton from "../components/ActionButton"; import toast, { Toaster } from "react-hot-toast"; import init, { @@ -9,11 +9,11 @@ import init, { export default function TxProofPage(): JSX.Element { - const [isProcessing, setIsProcessing] = useState(false); - const [showPrepVideo, setShowPrepVideo] = useState(false); - const [showProveVideo, setShowProveVideo] = useState(false); - const [prepared, setPrepared] = useState(false); - const [proven, setProven] = useState(false); + const [isProcessing, setIsProcessing] = React.useState(false); + const [showPrepVideo, setShowPrepVideo] = React.useState(false); + const [showProveVideo, setShowProveVideo] = React.useState(false); + const [prepared, setPrepared] = React.useState(false); + const [proven, setProven] = React.useState(false); /** * This prepares the transaction. @@ -28,7 +28,7 @@ export default function TxProofPage(): JSX.Element { const start = Date.now(); const preparedTransaction = prepare_transaction(); console.log(preparedTransaction); - toast.success(`Preparation successful in ${Date.now() - start} ms`); + toast.success(`Preparation successful in ${Date.now() - start} ms`, {duration: 4000}); } catch (error) { toast.error(`Something is wrong`); } @@ -52,7 +52,7 @@ export default function TxProofPage(): JSX.Element { const start = Date.now(); const provenTransaction = prove_transaction(); console.log(provenTransaction); - toast.success(`Proven successful in ${Date.now() - start} ms`); + toast.success(`Proven successful in ${Date.now() - start} ms`, {duration: 4000}); } catch (error) { toast.error(`Something is wrong`); } @@ -97,18 +97,28 @@ export default function TxProofPage(): JSX.Element { disabled={isProcessing || !proven || !prepared || showPrepVideo} fixedWidth={true} /> - -
+
{showPrepVideo && !showProveVideo && ( -
-
); }