diff --git a/src/features/workspace/components/projectCard/index.scss b/src/features/workspace/components/projectCard/index.scss index ae218ea..63e9134 100644 --- a/src/features/workspace/components/projectCard/index.scss +++ b/src/features/workspace/components/projectCard/index.scss @@ -1,4 +1,5 @@ .projectcard { + position: relative; border-radius: 1em; background-color: var(--home-page-card-bg); max-width: 554px; @@ -98,3 +99,50 @@ border: 1px solid white; border-radius: 50%; } + +.hide { + display: none; +} +.workspace-popup { + position: absolute; + right: 50px; + top: 50px; + box-sizing: border-box; + + /* Auto layout */ + + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 18px 33px; + gap: 10px; + + position: absolute; + width: 111px; + height: 110px; + + background: rgba(26, 26, 57, 0.5); + border: 1px solid #402aa4; + backdrop-filter: blur(2px); + /* Note: backdrop-filter has minimal browser support */ + + border-radius: 12px; +} + +.workspace-popup-btn { + position: absolute; + right: 20px; + top: 20px; +} +.workspace-popup-btn img { + color: white; +} +@keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} diff --git a/src/features/workspace/components/projectCard/index.tsx b/src/features/workspace/components/projectCard/index.tsx index 0741289..bfefb04 100644 --- a/src/features/workspace/components/projectCard/index.tsx +++ b/src/features/workspace/components/projectCard/index.tsx @@ -32,6 +32,7 @@ const ProjectCard: React.FC = ({ githubData, }) => { const token = localStorage.getItem('token'); + const [showPopUp, setShowPopUp] = useState(false); const userContext = useContext(UserContext); const [pin, setPin] = useState(status.archeive); const [archive, setArchive] = useState(status.bookmark); @@ -137,13 +138,31 @@ const ProjectCard: React.FC = ({

{projectName}

{project_data ? project_data.description : <>}

+ {(userContext?.userOrgs?.userOrgs[orgName].role === 'admin' || userContext?.userOrgs?.userOrgs[orgName].role === 'manager') && ( -
- - - -
+ <> +
setShowPopUp(showPopUp ? false : true)} + > + +
+
+
+ {pin ? 'Unpin' : 'Pin'} +
+
+ {archive ? 'Unarchive' : 'Archive'} +
+
+ Delete +
+
+ )}