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