Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat: improve the ui of workspace item

tzhangchi08beb6fa95a2
diff --cc packages/app/src/components/workspace-modal/index.tsx
index ab0df439c0,479b22c99e..46cd1a9182
--- a/packages/app/src/components/workspace-modal/index.tsx
+++ b/packages/app/src/components/workspace-modal/index.tsx
@@@ -6,13 -6,14 +6,19 @@@ import
getWorkspaces,
Workspace,
setActiveWorkspace,
+ Login,
+ User,
+ getUserInfo,
+ SignOut,
} from '@/hooks/mock-data/mock';
import { CreateWorkspaceModal } from '../create-workspace';
+import {
+ CloudUnsyncedIcon,
+ CloudInsyncIcon,
+ UsersIcon,
+} from '@blocksuite/icons';
+ import { useConfirm } from '@/providers/confirm-provider';
+ import { toast } from '@/ui/toast';
interface LoginModalProps {
open: boolean;
@@@ -34,9 -41,13 +46,12 @@@ export const WorkspaceModal = ({ open,
return (
<div>
<Modal open={open} onClose={onClose}>
- <ModalWrapper width={820} style={{ padding: '10px' }}>
+ <ModalWrapper
- width={620}
- height={334}
++ width={820}
+ style={{ padding: '10px', display: 'flex', flexDirection: 'column' }}
+ >
<Header>
- <ContentTitle>My Workspace List</ContentTitle>
+ <ContentTitle>My Workspaces</ContentTitle>
<ModalCloseButton
top={6}
right={6}
@@@ -111,13 -86,28 +126,32 @@@
</Button>
</li>
</WorkspaceList>
- </Content>
- <Footer>
+ <p style={{ fontSize: '14px', color: '#ccc', margin: '12px 0' }}>
+ Tips:Workspace is your virtual space to capture, create and plan
+ as just one person or together as a team.
+ </p>
- <Button>Sign in AFFiNE Cloud</Button>
+ </Content>
+ <Footer>
+ {!user ? (
+ <Button
+ onClick={() => {
+ Login();
+ toast('login success');
+ setUserInfo();
+ }}
+ >
+ Sign in AFFiNE Cloud
+ </Button>
+ ) : (
+ <Button
+ onClick={() => {
+ SignOut();
+ setUserInfo();
+ }}
+ >
+ Sign out of AFFiNE Cloud
+ </Button>
+ )}
</Footer>
<CreateWorkspaceModal
open={createWorkspaceOpen}