diff --git a/client/modules/IDE/components/SketchListRowBase.jsx b/client/modules/IDE/components/SketchListRowBase.jsx index e1c4c80f13..f66e11495d 100644 --- a/client/modules/IDE/components/SketchListRowBase.jsx +++ b/client/modules/IDE/components/SketchListRowBase.jsx @@ -96,6 +96,14 @@ const SketchListRowBase = ({ [changeVisibility] ); + const isPublic = + typeof sketch.visibility === 'string' && + sketch.visibility.toLowerCase() === 'public'; + const toggleVisibilityFromMenu = () => { + const toggle = isPublic ? 'Private' : 'Public'; + handleVisibilityChange(sketch.id, sketch.name, toggle); + }; + const userIsOwner = user.username === username; let url = `/${username}/sketches/${sketch.id}`; @@ -148,6 +156,14 @@ const SketchListRowBase = ({ {t('SketchList.DropdownAddToCollection')} + + {isPublic + ? t('SketchList.MakePrivate', 'Make Private') + : t('SketchList.MakePublic', 'Make Public')} + {/* {t('SketchList.DropdownShare')} */}