Skip to content

Commit

Permalink
[projects] Add 'New Workspace' context menu option to all Team Projec…
Browse files Browse the repository at this point in the history
…ts cards
  • Loading branch information
jankeromnes committed Oct 6, 2021
1 parent c2b1614 commit f74bb72
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions components/dashboard/src/projects/Projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,24 @@ export default function () {
{projects.filter(filter).map(p => (<div key={`project-${p.id}`} className="h-52">
<div className="h-42 border border-gray-100 dark:border-gray-800 rounded-t-xl">
<div className="h-32 p-6">
<div className="flex text-xl font-semibold text-gray-700 dark:text-gray-200 font-medium">
<div className="flex text-gray-700 dark:text-gray-200 font-medium">
<Link to={`/${teamOrUserSlug}/${p.name}`}>
{p.name}
<span className="text-xl font-semibold">{p.name}</span>
</Link>
<span className="flex-grow" />
<div className="justify-end">
<ContextMenu menuEntries={[{
title: "Remove Project",
customFontStyle: 'text-red-600 dark:text-red-400 hover:text-red-800 dark:hover:text-red-300',
onClick: () => onRemoveProject(p)
}]} />
<ContextMenu menuEntries={[
{
title: "New Workspace",
href: `/#${p.cloneUrl}`,
separator: true,
},
{
title: "Remove Project",
customFontStyle: 'text-red-600 dark:text-red-400 hover:text-red-800 dark:hover:text-red-300',
onClick: () => onRemoveProject(p)
},
]} />
</div>
</div>
<a href={p.cloneUrl.replace(/\.git$/, '')}>
Expand Down

0 comments on commit f74bb72

Please sign in to comment.