forked from github/plane
fix: bot activity and comment log name (#463)
* fix: github bot activity log details * fix: bot comment details * fix: updated bot logs * refactor: bot name logic
This commit is contained in:
parent
0fb9a14f15
commit
5f796e732a
@ -54,11 +54,14 @@ export const LinksList: React.FC<Props> = ({ links, handleDeleteLink, userAuth }
|
||||
<LinkIcon className="h-3.5 w-3.5" />
|
||||
</div>
|
||||
<div>
|
||||
<h5 className="w-4/5">{link.title}</h5>
|
||||
<h5 className="w-4/5 break-all">{link.title}</h5>
|
||||
<p className="mt-0.5 text-gray-500">
|
||||
Added {timeAgo(link.created_at)}
|
||||
<br />
|
||||
by {link.created_by_detail.email}
|
||||
by{" "}
|
||||
{link.created_by_detail.is_bot
|
||||
? link.created_by_detail.first_name + " Bot"
|
||||
: link.created_by_detail.email}
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
|
@ -160,7 +160,7 @@ export const IssueActivitySection: React.FC<Props> = () => {
|
||||
{activity.actor_detail.avatar && activity.actor_detail.avatar !== "" ? (
|
||||
<Image
|
||||
src={activity.actor_detail.avatar}
|
||||
alt={activity.actor_detail.name}
|
||||
alt={activity.actor_detail.first_name}
|
||||
height={30}
|
||||
width={30}
|
||||
className="rounded-full"
|
||||
@ -179,7 +179,10 @@ export const IssueActivitySection: React.FC<Props> = () => {
|
||||
<div className={`${activity.field ? "ml-1.5" : ""} w-full text-xs`}>
|
||||
<p>
|
||||
<span className="font-medium">
|
||||
{activity.actor_detail.first_name} {activity.actor_detail.last_name}
|
||||
{activity.actor_detail.first_name}
|
||||
{activity.actor_detail.is_bot
|
||||
? " Bot"
|
||||
: " " + activity.actor_detail.last_name}
|
||||
</span>
|
||||
<span>
|
||||
{" "}
|
||||
|
@ -55,7 +55,7 @@ export const CommentCard: React.FC<Props> = ({ comment, onSubmit, handleCommentD
|
||||
{comment.actor_detail.avatar && comment.actor_detail.avatar !== "" ? (
|
||||
<Image
|
||||
src={comment.actor_detail.avatar}
|
||||
alt={comment.actor_detail.name}
|
||||
alt={comment.actor_detail.first_name}
|
||||
height={30}
|
||||
width={30}
|
||||
className="rounded-full"
|
||||
@ -71,7 +71,8 @@ export const CommentCard: React.FC<Props> = ({ comment, onSubmit, handleCommentD
|
||||
<div className="w-full space-y-1">
|
||||
<p className="flex items-center gap-2 text-xs text-gray-500">
|
||||
<span>
|
||||
{comment.actor_detail.first_name} {comment.actor_detail.last_name}
|
||||
{comment.actor_detail.first_name}
|
||||
{comment.actor_detail.is_bot ? "Bot" : " " + comment.actor_detail.last_name}
|
||||
</span>
|
||||
<span>{timeAgo(comment.created_at)}</span>
|
||||
</p>
|
||||
|
4
apps/app/types/issues.d.ts
vendored
4
apps/app/types/issues.d.ts
vendored
@ -137,7 +137,7 @@ export interface BlockeIssueDetail {
|
||||
export interface IIssueComment {
|
||||
id: string;
|
||||
actor: string;
|
||||
actor_detail: IUser;
|
||||
actor_detail: IUserLite;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
comment: string;
|
||||
@ -187,7 +187,7 @@ export interface IIssueLabels {
|
||||
|
||||
export interface IIssueActivity {
|
||||
id: string;
|
||||
actor_detail: IUser;
|
||||
actor_detail: IUserLite;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
verb: string;
|
||||
|
1
apps/app/types/users.d.ts
vendored
1
apps/app/types/users.d.ts
vendored
@ -33,6 +33,7 @@ export interface IUserLite {
|
||||
email: string;
|
||||
avatar: string;
|
||||
created_at: Date;
|
||||
is_bot: boolean;
|
||||
}
|
||||
|
||||
export interface IUserActivity {
|
||||
|
Loading…
Reference in New Issue
Block a user