From 95285d30dd554fb297716a05c4193b06f9c7dcf3 Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Mon, 26 Feb 2024 23:50:42 -0500 Subject: [PATCH 1/3] private repo + repo --- .../projects/create/ProjectRepoCard.tsx | 9 +++++--- .../shared/CustomIcon/GithubIcon.tsx | 21 +++++++++++++++++++ .../components/shared/CustomIcon/LockIcon.tsx | 21 +++++++++++++++++++ .../src/components/shared/CustomIcon/index.ts | 2 ++ 4 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 packages/frontend/src/components/shared/CustomIcon/GithubIcon.tsx create mode 100644 packages/frontend/src/components/shared/CustomIcon/LockIcon.tsx diff --git a/packages/frontend/src/components/projects/create/ProjectRepoCard.tsx b/packages/frontend/src/components/projects/create/ProjectRepoCard.tsx index c3e88b9a..fbcf50b4 100644 --- a/packages/frontend/src/components/projects/create/ProjectRepoCard.tsx +++ b/packages/frontend/src/components/projects/create/ProjectRepoCard.tsx @@ -7,6 +7,7 @@ import { Chip, IconButton, Spinner } from '@material-tailwind/react'; import { relativeTimeISO } from '../../../utils/time'; import { GitRepositoryDetails } from '../../../types'; import { useGQLClient } from '../../../context/GQLClientContext'; +import { GithubIcon, LockIcon } from 'components/shared/CustomIcon'; interface ProjectRepoCardProps { repository: GitRepositoryDetails; @@ -47,16 +48,18 @@ const ProjectRepoCard: React.FC = ({ repository }) => { className="group flex items-center gap-4 text-gray-500 text-xs hover:bg-gray-100 p-2 cursor-pointer" onClick={createProject} > -
^
+
+ +
{repository.full_name} {repository.visibility === 'private' && ( } /> )}
diff --git a/packages/frontend/src/components/shared/CustomIcon/GithubIcon.tsx b/packages/frontend/src/components/shared/CustomIcon/GithubIcon.tsx new file mode 100644 index 00000000..4a0f59ab --- /dev/null +++ b/packages/frontend/src/components/shared/CustomIcon/GithubIcon.tsx @@ -0,0 +1,21 @@ +import React from 'react'; +import { CustomIcon, CustomIconProps } from './CustomIcon'; + +export const GithubIcon: React.FC = (props) => { + return ( + + + + ); +}; diff --git a/packages/frontend/src/components/shared/CustomIcon/LockIcon.tsx b/packages/frontend/src/components/shared/CustomIcon/LockIcon.tsx new file mode 100644 index 00000000..e3a588df --- /dev/null +++ b/packages/frontend/src/components/shared/CustomIcon/LockIcon.tsx @@ -0,0 +1,21 @@ +import React from 'react'; +import { CustomIcon, CustomIconProps } from './CustomIcon'; + +export const LockIcon: React.FC = (props) => { + return ( + + + + ); +}; diff --git a/packages/frontend/src/components/shared/CustomIcon/index.ts b/packages/frontend/src/components/shared/CustomIcon/index.ts index d5a65355..7cc17471 100644 --- a/packages/frontend/src/components/shared/CustomIcon/index.ts +++ b/packages/frontend/src/components/shared/CustomIcon/index.ts @@ -22,3 +22,5 @@ export * from './EllipseIcon'; export * from './EllipsesIcon'; export * from './SnowballIcon'; export * from './NotificationBellIcon'; +export * from './GithubIcon'; +export * from './LockIcon'; From 6c380940934507a5176fce0d9ce6ad8a2bd3bdd5 Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Mon, 26 Feb 2024 23:56:20 -0500 Subject: [PATCH 2/3] github icon in search repo --- .../src/components/projects/create/RepositoryList.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/components/projects/create/RepositoryList.tsx b/packages/frontend/src/components/projects/create/RepositoryList.tsx index 8b29967e..6963949a 100644 --- a/packages/frontend/src/components/projects/create/RepositoryList.tsx +++ b/packages/frontend/src/components/projects/create/RepositoryList.tsx @@ -9,6 +9,7 @@ import SearchBar from '../../SearchBar'; import ProjectRepoCard from './ProjectRepoCard'; import { GitOrgDetails, GitRepositoryDetails } from '../../../types'; import AsyncSelect from '../../shared/AsyncSelect'; +import { GithubIcon } from 'components/shared/CustomIcon'; const DEFAULT_SEARCHED_REPO = ''; const REPOS_PER_PAGE = 5; @@ -116,7 +117,9 @@ const RepositoryList = ({ octokit }: RepositoryListProps) => { > {accounts.map((account) => ( ))} From 8ce531274d207cc1066242717796cf61676e7737 Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Tue, 27 Feb 2024 00:00:52 -0500 Subject: [PATCH 3/3] center items in nav bar of git repos --- .../src/components/projects/create/RepositoryList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/projects/create/RepositoryList.tsx b/packages/frontend/src/components/projects/create/RepositoryList.tsx index 6963949a..f09e61d6 100644 --- a/packages/frontend/src/components/projects/create/RepositoryList.tsx +++ b/packages/frontend/src/components/projects/create/RepositoryList.tsx @@ -109,7 +109,7 @@ const RepositoryList = ({ octokit }: RepositoryListProps) => { return (
-
+
{ ))}
-
+
setSearchedRepo(event.target.value)}