mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
feat: add email avatar
This commit is contained in:
@@ -57,7 +57,7 @@ export const GeneralPage = ({
|
||||
meta => meta.id === workspace.id
|
||||
);
|
||||
const nextWorkSpaceId =
|
||||
currentWorkspaceIndex > workspacesMeta.length - 1
|
||||
currentWorkspaceIndex === workspacesMeta.length - 1
|
||||
? workspacesMeta[currentWorkspaceIndex - 1]?.id
|
||||
: workspacesMeta[currentWorkspaceIndex + 1]?.id;
|
||||
const handleClickDelete = () => {
|
||||
|
||||
+5
-3
@@ -109,9 +109,11 @@ export const SelectorPopperContent = ({
|
||||
key={workspace.id}
|
||||
id={workspace.id}
|
||||
icon={
|
||||
workspaces[workspace.id]?.meta.avatar
|
||||
? 'api/blob/' + workspaces[workspace.id]?.meta.avatar
|
||||
: ''
|
||||
(workspaces[workspace.id]?.meta.avatar &&
|
||||
`/api/blob/${workspaces[workspace.id]?.meta.avatar}`) ||
|
||||
(workspace.type === WorkspaceType.Private
|
||||
? user.avatar_url
|
||||
: `loading...`)
|
||||
}
|
||||
onClick={handleClickSettingWorkspace}
|
||||
name={
|
||||
|
||||
+10
-4
@@ -24,12 +24,18 @@ export const WorkspaceSelector = () => {
|
||||
<Avatar
|
||||
alt="Affine"
|
||||
src={
|
||||
currentWorkspace?.meta.avatar
|
||||
? `api/blob/${currentWorkspace?.meta.avatar}`
|
||||
: ''
|
||||
(currentWorkspace?.meta.avatar &&
|
||||
`/api/blob/${currentWorkspace?.meta.avatar}`) ||
|
||||
(workspaceMeta?.type === WorkspaceType.Private && user
|
||||
? user.avatar_url
|
||||
: '')
|
||||
}
|
||||
>
|
||||
<AffineIcon />
|
||||
{workspaceMeta?.type === WorkspaceType.Private && user ? (
|
||||
user?.name[0]
|
||||
) : (
|
||||
<AffineIcon />
|
||||
)}
|
||||
</Avatar>
|
||||
<WorkspaceName>
|
||||
{currentWorkspace?.meta.name ||
|
||||
|
||||
Reference in New Issue
Block a user