feat(core): adjust history modal styles (#11675)

- add avatar/name info to each history snapshot item
- add avatar to audio transcription job owner

fix AF-2483

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/4a2b88c2-311a-470e-a8a9-113931cdf17e.png)
This commit is contained in:
pengx17
2025-04-15 07:16:52 +00:00
parent e02b159bf4
commit 7b2ae7f573
7 changed files with 137 additions and 103 deletions

View File

@@ -2,6 +2,8 @@ import { style } from '@vanilla-extract/css';
export const publicUserLabel = style({
fontSize: 'inherit',
display: 'flex',
alignItems: 'center',
});
export const publicUserLabelLoading = style([
@@ -18,3 +20,7 @@ export const publicUserLabelRemoved = style([
textDecoration: 'line-through',
},
]);
export const publicUserLabelAvatar = style({
marginRight: '0.5em',
});

View File

@@ -1,3 +1,4 @@
import { Avatar } from '@affine/component';
import { useCurrentServerService } from '@affine/core/components/providers/current-server-scope';
import { useI18n } from '@affine/i18n';
import { useLiveData } from '@toeverything/infra';
@@ -34,5 +35,15 @@ export const PublicUserLabel = ({ id }: { id: string }) => {
);
}
return <span className={styles.publicUserLabel}>{user?.name}</span>;
return (
<span className={styles.publicUserLabel}>
<Avatar
url={user?.avatar}
name={user?.name ?? ''}
size={20}
className={styles.publicUserLabelAvatar}
/>
{user?.name}
</span>
);
};