mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-24 05:07:06 +08:00
Merge branch 'feat/filesystem_and_search' of https://github.com/toeverything/AFFiNE into feat/filesystem_and_search
This commit is contained in:
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
import { useModal } from '@/providers/global-modal-provider';
|
import { useModal } from '@/providers/global-modal-provider';
|
||||||
import { styled } from '@/styles';
|
import { styled } from '@/styles';
|
||||||
|
import { AffineIcon } from '../../icons/icons';
|
||||||
import {
|
import {
|
||||||
WorkspaceItemAvatar,
|
WorkspaceItemAvatar,
|
||||||
LoginItemWrapper,
|
LoginItemWrapper,
|
||||||
@@ -14,7 +15,7 @@ export const LoginItem = () => {
|
|||||||
data-testid="open-login-modal"
|
data-testid="open-login-modal"
|
||||||
>
|
>
|
||||||
<WorkspaceItemAvatar alt="AFFiNE" src={''}>
|
<WorkspaceItemAvatar alt="AFFiNE" src={''}>
|
||||||
A
|
<AffineIcon />
|
||||||
</WorkspaceItemAvatar>
|
</WorkspaceItemAvatar>
|
||||||
<WorkspaceItemContent>
|
<WorkspaceItemContent>
|
||||||
<Name title="AFFiNE">AFFiNE</Name>
|
<Name title="AFFiNE">AFFiNE</Name>
|
||||||
|
|||||||
+4
-2
@@ -4,7 +4,7 @@ import { SelectorPopperContent } from './SelectorPopperContent';
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
import { useAppState } from '@/providers/app-state-provider';
|
||||||
import { WorkspaceType } from '@pathfinder/data-services';
|
import { WorkspaceType } from '@pathfinder/data-services';
|
||||||
|
import { AffineIcon } from '../icons/icons';
|
||||||
export const WorkspaceSelector = () => {
|
export const WorkspaceSelector = () => {
|
||||||
const [isShow, setIsShow] = useState(false);
|
const [isShow, setIsShow] = useState(false);
|
||||||
const { currentWorkspace, workspacesMeta, currentWorkspaceId, user } =
|
const { currentWorkspace, workspacesMeta, currentWorkspaceId, user } =
|
||||||
@@ -21,7 +21,9 @@ export const WorkspaceSelector = () => {
|
|||||||
onVisibleChange={setIsShow}
|
onVisibleChange={setIsShow}
|
||||||
>
|
>
|
||||||
<SelectorWrapper data-testid="current-workspace">
|
<SelectorWrapper data-testid="current-workspace">
|
||||||
<Avatar alt="Affine" src={currentWorkspace?.meta.avatar || ''} />
|
<Avatar alt="Affine" src={currentWorkspace?.meta.avatar || ''}>
|
||||||
|
<AffineIcon />
|
||||||
|
</Avatar>
|
||||||
<WorkspaceName>
|
<WorkspaceName>
|
||||||
{currentWorkspace?.meta.name ||
|
{currentWorkspace?.meta.name ||
|
||||||
(workspaceMeta?.type === WorkspaceType.Private && user
|
(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