Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit03b5012

Browse files
feat: update default audit log avatar (cherry-pick#16774) (#16805)
Cherry-picked feat: update default audit log avatar (#16774)After update:![image](https://github.com/user-attachments/assets/2ac6707f-2a56-45ec-a88f-651826776744)Co-authored-by: Bruno Quaresma <bruno@coder.com>
1 parenta5eb06e commit03b5012

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

‎site/src/components/Avatar/Avatar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ const avatarVariants = cva(
5757
exporttypeAvatarProps=AvatarPrimitive.AvatarProps&
5858
VariantProps<typeofavatarVariants>&{
5959
src?:string;
60-
6160
fallback?:string;
6261
};
6362

‎site/src/pages/AuditPage/AuditLogRow/AuditLogRow.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { DropdownArrow } from "components/DropdownArrow/DropdownArrow";
1010
import{Pill}from"components/Pill/Pill";
1111
import{Stack}from"components/Stack/Stack";
1212
import{TimelineEntry}from"components/Timeline/TimelineEntry";
13+
import{NetworkIcon}from"lucide-react";
1314
import{typeFC,useState}from"react";
1415
import{LinkasRouterLink}from"react-router-dom";
1516
importtype{ThemeRole}from"theme/roles";
@@ -101,10 +102,20 @@ export const AuditLogRow: FC<AuditLogRowProps> = ({
101102
css={styles.auditLogHeaderInfo}
102103
>
103104
<Stackdirection="row"alignItems="center"css={styles.fullWidth}>
104-
<Avatar
105-
fallback={auditLog.user?.username??"?"}
106-
src={auditLog.user?.avatar_url}
107-
/>
105+
{/*
106+
* Session logs don't have an associated user to the log,
107+
* so when it happens we display a default icon to represent non user actions
108+
*/}
109+
{auditLog.user ?(
110+
<Avatar
111+
fallback={auditLog.user.username}
112+
src={auditLog.user.avatar_url}
113+
/>
114+
) :(
115+
<Avatar>
116+
<NetworkIconclassName="h-full w-full p-1"/>
117+
</Avatar>
118+
)}
108119

109120
<Stack
110121
alignItems="baseline"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp