From 3cb91c0f683f30bee88943ad2d4d57100540fb08 Mon Sep 17 00:00:00 2001 From: tzhangchi Date: Thu, 5 Jan 2023 17:38:23 +0800 Subject: [PATCH] feat: improve the ui of workspace item --- .../src/components/create-workspace/index.tsx | 1 - .../src/components/workspace-modal/index.tsx | 66 ++++++++++++++++--- 2 files changed, 56 insertions(+), 11 deletions(-) diff --git a/packages/app/src/components/create-workspace/index.tsx b/packages/app/src/components/create-workspace/index.tsx index 1a04d3ce9a..9059d9bec1 100644 --- a/packages/app/src/components/create-workspace/index.tsx +++ b/packages/app/src/components/create-workspace/index.tsx @@ -4,7 +4,6 @@ import { Button } from '@/ui/button'; import { useState } from 'react'; import { createWorkspace } from '@/hooks/mock-data/mock'; import Input from '@/ui/input'; - interface ModalProps { open: boolean; onClose: () => void; diff --git a/packages/app/src/components/workspace-modal/index.tsx b/packages/app/src/components/workspace-modal/index.tsx index 24d9782c06..ab0df439c0 100644 --- a/packages/app/src/components/workspace-modal/index.tsx +++ b/packages/app/src/components/workspace-modal/index.tsx @@ -8,6 +8,11 @@ import { setActiveWorkspace, } from '@/hooks/mock-data/mock'; import { CreateWorkspaceModal } from '../create-workspace'; +import { + CloudUnsyncedIcon, + CloudInsyncIcon, + UsersIcon, +} from '@blocksuite/icons'; interface LoginModalProps { open: boolean; @@ -29,9 +34,9 @@ export const WorkspaceModal = ({ open, onClose }: LoginModalProps) => { return (
- +
- My Workspace List + My Workspaces { }} key={item.id} > - {item.name}/ - {item.type === 'local' && local} - {item.type === 'join' && join}/ - {item.isPublish ? 'isPublish' : 'isPrivate'}/ - {item.isLocal ? 'isLocal' : ''}/ + + + + + + {item.name} + + + {item.type === 'local' && ( + + )} + {item.type === 'cloud' && ( + + )} + {item.isPublish && } + + {/* {item.isLocal ? 'isLocal' : ''}/ */} ); })} @@ -66,12 +107,16 @@ export const WorkspaceModal = ({ open, onClose }: LoginModalProps) => { setCreateWorkspaceOpen(true); }} > - Create Workspace + Create Or Import