mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
feat: default icon
This commit is contained in:
+2
-1
@@ -1,5 +1,6 @@
|
||||
import { useModal } from '@/providers/global-modal-provider';
|
||||
import { styled } from '@/styles';
|
||||
import { AffineIcon } from '../../icons/icons';
|
||||
import {
|
||||
WorkspaceItemAvatar,
|
||||
LoginItemWrapper,
|
||||
@@ -11,7 +12,7 @@ export const LoginItem = () => {
|
||||
return (
|
||||
<LoginItemWrapper onClick={() => triggerLoginModal()}>
|
||||
<WorkspaceItemAvatar alt="AFFiNE" src={''}>
|
||||
A
|
||||
<AffineIcon />
|
||||
</WorkspaceItemAvatar>
|
||||
<WorkspaceItemContent>
|
||||
<Name title="AFFiNE">AFFiNE</Name>
|
||||
|
||||
+4
-2
@@ -4,7 +4,7 @@ import { SelectorPopperContent } from './SelectorPopperContent';
|
||||
import { useState } from 'react';
|
||||
import { useAppState } from '@/providers/app-state-provider';
|
||||
import { WorkspaceType } from '@pathfinder/data-services';
|
||||
|
||||
import { AffineIcon } from '../icons/icons';
|
||||
export const WorkspaceSelector = () => {
|
||||
const [isShow, setIsShow] = useState(false);
|
||||
const { currentWorkspace, workspacesMeta, currentWorkspaceId, user } =
|
||||
@@ -21,7 +21,9 @@ export const WorkspaceSelector = () => {
|
||||
onVisibleChange={setIsShow}
|
||||
>
|
||||
<SelectorWrapper data-testid="current-workspace">
|
||||
<Avatar alt="Affine" src={currentWorkspace?.meta.avatar || ''} />
|
||||
<Avatar alt="Affine" src={currentWorkspace?.meta.avatar || ''}>
|
||||
<AffineIcon />
|
||||
</Avatar>
|
||||
<WorkspaceName>
|
||||
{currentWorkspace?.meta.name ||
|
||||
(workspaceMeta?.type === WorkspaceType.Private && user
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
export const AffineIcon = () => {
|
||||
return (
|
||||
<svg
|
||||
width="40"
|
||||
height="40"
|
||||
viewBox="0 0 40 40"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<rect
|
||||
x="0.5"
|
||||
y="0.5"
|
||||
width="39"
|
||||
height="39"
|
||||
rx="19.5"
|
||||
stroke="#6880FF"
|
||||
fill="#FFF"
|
||||
/>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M18.6303 8.79688L11.2559 29.8393H15.5752L20.2661 15.2858L24.959 29.8393H29.2637L21.8881 8.79688H18.6303Z"
|
||||
fill="#6880FF"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user