From 4827abbcb44aae528543b11b57e7e58c4884d490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=8D=EC=B0=BD=EA=B8=B0?= Date: Tue, 8 Oct 2024 12:56:12 +0900 Subject: [PATCH] =?UTF-8?q?Design:=20browse=20=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=20=EB=B0=8F=20=EC=9B=8C=ED=81=AC=EC=8A=A4=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=8A=A4=20=EC=82=AC=EC=9D=B4=EB=93=9C=EB=B0=94=20=EB=94=94?= =?UTF-8?q?=EC=9E=90=EC=9D=B8=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ImagePreSignedForm/index.tsx | 14 +++++++--- .../WorkspaceBrowseLayout/index.tsx | 2 +- .../WorkspaceDropdownMenu/index.tsx | 28 ++++++------------- .../WorkspaceSidebar/ProjectContextMenu.tsx | 14 ++++++++-- 4 files changed, 32 insertions(+), 26 deletions(-) diff --git a/frontend/src/components/ImagePreSignedForm/index.tsx b/frontend/src/components/ImagePreSignedForm/index.tsx index daace94..00e0d55 100644 --- a/frontend/src/components/ImagePreSignedForm/index.tsx +++ b/frontend/src/components/ImagePreSignedForm/index.tsx @@ -199,10 +199,16 @@ export default function ImagePreSignedForm({ ) : (

{uploadType === 'folder' - ? '폴더를 업로드하려면 여기를 클릭하거나 폴더를 드래그하여 여기에 놓으세요' + ? '폴더를 업로드하려면 여기를 클릭하거나' : uploadType === 'zip' - ? 'ZIP 파일을 업로드하려면 여기를 클릭하거나 ZIP 파일을 드래그하여 여기에 놓으세요' - : '파일을 업로드하려면 여기를 클릭하거나 파일을 드래그하여 여기에 놓으세요'} + ? '압축 파일을 업로드하려면 여기를 클릭하거나' + : '파일을 업로드하려면 여기를 클릭하거나'} +
+ {uploadType === 'folder' + ? '폴더를 드래그하여 여기에 놓으세요' + : uploadType === 'zip' + ? '압축 파일을 드래그하여 여기에 놓으세요' + : '파일을 드래그하여 여기에 놓으세요'}

)} @@ -217,7 +223,7 @@ export default function ImagePreSignedForm({ {({ index, style }) => (
{files[index].path} diff --git a/frontend/src/components/WorkspaceBrowseLayout/index.tsx b/frontend/src/components/WorkspaceBrowseLayout/index.tsx index fb800fa..c488ce0 100644 --- a/frontend/src/components/WorkspaceBrowseLayout/index.tsx +++ b/frontend/src/components/WorkspaceBrowseLayout/index.tsx @@ -147,7 +147,7 @@ export default function WorkspaceBrowseLayout() { )) ) : ( -

워크스페이스가 없습니다.

+

워크스페이스가 없습니다.

)}
diff --git a/frontend/src/components/WorkspaceDropdownMenu/index.tsx b/frontend/src/components/WorkspaceDropdownMenu/index.tsx index 0dd9578..2b0ee81 100644 --- a/frontend/src/components/WorkspaceDropdownMenu/index.tsx +++ b/frontend/src/components/WorkspaceDropdownMenu/index.tsx @@ -1,12 +1,6 @@ import React from 'react'; import { Menu } from 'lucide-react'; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuTrigger, -} from '../ui/dropdown-menu'; +import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '../ui/dropdown-menu'; import { Dialog, DialogContent, DialogHeader, DialogTrigger } from '../ui/dialogCustom'; import ImagePreSignedForm from '../ImagePreSignedForm'; @@ -23,8 +17,6 @@ export default function WorkspaceDropdownMenu({ const [fileCount, setFileCount] = React.useState(0); const [uploadType, setUploadType] = React.useState<'file' | 'folder' | 'zip'>('file'); - const handleCloseUpload = () => setIsOpenUpload(false); - const handleFileCount = (fileCount: number) => { setFileCount(fileCount); }; @@ -44,7 +36,6 @@ export default function WorkspaceDropdownMenu({ > 파일 업로드 - { setUploadType('folder'); @@ -53,7 +44,6 @@ export default function WorkspaceDropdownMenu({ > 폴더 업로드 - { setUploadType('zip'); @@ -73,17 +63,17 @@ export default function WorkspaceDropdownMenu({ 0 - ? `파일 업로드 (${fileCount})` - : uploadType === 'file' - ? '파일 업로드' - : uploadType === 'folder' - ? '폴더 업로드' - : '압축 파일 업로드' + uploadType === 'folder' + ? '폴더 업로드' + : uploadType === 'zip' + ? '압축 파일 업로드' + : fileCount > 0 + ? `파일 업로드 (${fileCount})` + : '파일 업로드' } /> setIsOpenUpload(false)} onRefetch={onRefetch} onFileCount={handleFileCount} projectId={projectId} diff --git a/frontend/src/components/WorkspaceSidebar/ProjectContextMenu.tsx b/frontend/src/components/WorkspaceSidebar/ProjectContextMenu.tsx index 403f75f..b690012 100644 --- a/frontend/src/components/WorkspaceSidebar/ProjectContextMenu.tsx +++ b/frontend/src/components/WorkspaceSidebar/ProjectContextMenu.tsx @@ -184,7 +184,7 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc id="uploadZip" onClick={handleItemClick} > - ZIP 파일 업로드 + 압축 파일 업로드 )} @@ -204,7 +204,17 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc > - 0 ? `업로드 (${fileCount})` : '업로드'} /> + 0 + ? `파일 업로드 (${fileCount})` + : '파일 업로드' + } + /> setIsOpenUpload(false)} onRefetch={onRefetch}