diff --git a/packages/frontend/src/components/projects/project/deployments/DeploymentDialogBodyCard.tsx b/packages/frontend/src/components/projects/project/deployments/DeploymentDialogBodyCard.tsx index a8b40b8b..64b6956d 100644 --- a/packages/frontend/src/components/projects/project/deployments/DeploymentDialogBodyCard.tsx +++ b/packages/frontend/src/components/projects/project/deployments/DeploymentDialogBodyCard.tsx @@ -1,17 +1,23 @@ import React from 'react'; import { Deployment } from 'gql-client'; -import { Typography, Chip, Card } from '@material-tailwind/react'; -import { color } from '@material-tailwind/react/types/components/chip'; -import { relativeTimeMs } from '../../../../utils/time'; +import { relativeTimeMs } from 'utils/time'; import { SHORT_COMMIT_HASH_LENGTH } from '../../../../constants'; -import { formatAddress } from '../../../../utils/format'; +import { + BranchStrokeIcon, + ClockOutlineIcon, + CommitIcon, +} from 'components/shared/CustomIcon'; +import { Avatar } from 'components/shared/Avatar'; +import { getInitials } from 'utils/geInitials'; +import { OverflownText } from 'components/shared/OverflownText'; +import { Tag, TagProps } from 'components/shared/Tag'; interface DeploymentDialogBodyCardProps { deployment: Deployment; chip?: { value: string; - color?: color; + type?: TagProps['type']; }; } @@ -19,31 +25,54 @@ const DeploymentDialogBodyCard = ({ chip, deployment, }: DeploymentDialogBodyCardProps) => { + const commit = + deployment.commitHash.substring(0, SHORT_COMMIT_HASH_LENGTH) + + ' ' + + deployment.commitMessage; + return ( - +
{chip && ( - + + {chip.value} + )} - {deployment.url && ( - +
+ {/* Title */} +

{deployment.url} - - )} - - ^ {deployment.branch} ^{' '} - {deployment.commitHash.substring(0, SHORT_COMMIT_HASH_LENGTH)}{' '} - {deployment.commitMessage} - - - ^ {relativeTimeMs(deployment.createdAt)} ^{' '} - {formatAddress(deployment.createdBy.name ?? '')} - - +

+ {/* Branch & commit */} +
+
+ +

{deployment.branch}

+
+
+ +

+ {commit} +

+
+
+
+
+ +

+ {relativeTimeMs(deployment.createdAt)} +

+ +

+ {deployment.createdBy.name ?? 'Unknown'} +

+
+
); };