From 41e38712b362fdc8906c9bb28da09f8cd09095ba Mon Sep 17 00:00:00 2001 From: Ivan Date: Tue, 19 Nov 2024 15:41:38 -0800 Subject: [PATCH] Kernel-Images upload instructions --- .../src/components/listing/ListingOnshape.tsx | 75 ++++++++++++++++--- 1 file changed, 64 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/listing/ListingOnshape.tsx b/frontend/src/components/listing/ListingOnshape.tsx index 820a3a1f..06a34b7e 100644 --- a/frontend/src/components/listing/ListingOnshape.tsx +++ b/frontend/src/components/listing/ListingOnshape.tsx @@ -298,6 +298,7 @@ const ListingOnshape = (props: Props) => { const [permUrl, setPermUrl] = useState(onshapeUrl); const [updateOnshape, setUpdateOnshape] = useState(false); const [showInstructions, setShowInstructions] = useState(false); + const [showKernelInstructions, setShowKernelInstructions] = useState(false); const handleCopy = async () => { try { @@ -369,6 +370,10 @@ const ListingOnshape = (props: Props) => { setShowInstructions(!showInstructions); }; + const toggleKernelInstructions = () => { + setShowKernelInstructions(!showKernelInstructions); + }; + const renderUrdfInstructions = (listingId: string) => (

@@ -393,19 +398,56 @@ const ListingOnshape = (props: Props) => {

); + const renderKernelInstructions = (listingId: string) => ( +
+

+ Kernel Image Upload Instructions +

+
    +
  1. + Install the K-Scale CLI: + +
  2. +
  3. + Upload your kernel image: + +
  4. +
+
+ ); + const renderContent = () => { if (isEditing) { return (
{edit && ( - {}} - onSave={handleSave} - onToggleInstructions={toggleInstructions} - showInstructions={showInstructions} - /> +
+ + + +
)}
); @@ -418,10 +460,20 @@ const ListingOnshape = (props: Props) => { Add Onshape URL {edit && ( - + <> + + + )} ); @@ -473,6 +525,7 @@ const ListingOnshape = (props: Props) => {
{renderContent()} {showInstructions && renderUrdfInstructions(listingId)} + {showKernelInstructions && renderKernelInstructions(listingId)}
)}