Merge branch 'feat/filesystem_and_search' of https://github.com/toeverything/AFFiNE into feat/filesystem_and_search

This commit is contained in:
tzhangchi
2022-12-23 18:09:18 +08:00
3 changed files with 33 additions and 3 deletions
@@ -1,5 +1,6 @@
import { useModal } from '@/providers/global-modal-provider';
import { styled } from '@/styles';
import { AffineIcon } from '../../icons/icons';
import {
WorkspaceItemAvatar,
LoginItemWrapper,
@@ -14,7 +15,7 @@ export const LoginItem = () => {
data-testid="open-login-modal"
>
<WorkspaceItemAvatar alt="AFFiNE" src={''}>
A
<AffineIcon />
</WorkspaceItemAvatar>
<WorkspaceItemContent>
<Name title="AFFiNE">AFFiNE</Name>
@@ -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>
);
};