Merge branch 'fe/develop' of https://lab.ssafy.com/s11-s-project/S11P21S002 into fe/fix/upload

This commit is contained in:
정현조 2024-10-08 13:45:16 +09:00
commit eea5b77c9c
7 changed files with 54 additions and 67 deletions

View File

@ -1,42 +1,24 @@
import * as React from 'react';
import Modal from './Modal';
import { cn } from '@/lib/utils';
export interface FooterProps extends React.HTMLAttributes<HTMLDivElement> {}
export default function Footer({ className, ...props }: FooterProps) {
const [isTermsOpen, setIsTermsOpen] = React.useState(false);
const [isPrivacyOpen, setIsPrivacyOpen] = React.useState(false);
export default function Footer() {
const [modalState, setModalState] = React.useState<'terms' | 'privacy' | null>(null);
return (
<footer
className={cn('mt-[100px] border-t border-gray-200 bg-gray-100', className)}
{...props}
>
{' '}
<div className="container py-10">
<div className="flex flex-col items-start gap-5">
<div className="relative">
<div className="font-heading text-lg text-gray-600 md:text-xl">WorLabel</div>
<p className="font-body-small mt-2 text-gray-500">Copyright © 2024 WorLabel All rights reserved</p>
<footer className="select-none bg-gray-100">
<div className="container py-8 text-gray-400">
<div className="body-small flex flex-col items-start gap-5">
<div>
<div className="heading">WorLabel</div>
<span>Copyright © 2024 WorLabel All rights reserved</span>
</div>
<div className="inline-flex items-center gap-4">
<button
className="font-body-small text-gray-500 hover:text-primary"
onClick={() => setIsTermsOpen(true)}
>
</button>
<div className="h-4 w-px bg-gray-400" />
<button
className="font-body-small text-gray-500 hover:text-primary"
onClick={() => setIsPrivacyOpen(true)}
>
</button>
<div className="inline-flex items-center gap-2">
<button onClick={() => setModalState('terms')}> </button>
<span className="h-3 w-px rounded bg-gray-400" />
<button onClick={() => setModalState('privacy')}> </button>
</div>
</div>
</div>
{/* Terms of Service Modal */}
<Modal
title="서비스 이용약관"
content={
@ -86,10 +68,9 @@ export default function Footer({ className, ...props }: FooterProps) {
</p>
</>
}
open={isTermsOpen}
onClose={() => setIsTermsOpen(false)}
open={modalState === 'terms'}
onClose={() => setModalState(null)}
/>
{/* Privacy Policy Modal */}
<Modal
title="개인정보 처리방침"
content={
@ -142,8 +123,8 @@ export default function Footer({ className, ...props }: FooterProps) {
</p>
</>
}
open={isPrivacyOpen}
onClose={() => setIsPrivacyOpen(false)}
open={modalState === 'privacy'}
onClose={() => setModalState(null)}
/>
</footer>
);

View File

@ -199,10 +199,16 @@ export default function ImagePreSignedForm({
) : (
<p className="text-gray-500">
{uploadType === 'folder'
? '폴더를 업로드하려면 여기를 클릭하거나 폴더를 드래그하여 여기에 놓으세요'
? '폴더를 업로드하려면 여기를 클릭하거나'
: uploadType === 'zip'
? 'ZIP 파일을 업로드하려면 여기를 클릭하거나 ZIP 파일을 드래그하여 여기에 놓으세요'
: '파일을 업로드하려면 여기를 클릭하거나 파일을 드래그하여 여기에 놓으세요'}
? '압축 파일을 업로드하려면 여기를 클릭하거나'
: '파일을 업로드하려면 여기를 클릭하거나'}
<br />
{uploadType === 'folder'
? '폴더를 드래그하여 여기에 놓으세요'
: uploadType === 'zip'
? '압축 파일을 드래그하여 여기에 놓으세요'
: '파일을 드래그하여 여기에 놓으세요'}
</p>
)}
</div>
@ -217,7 +223,7 @@ export default function ImagePreSignedForm({
{({ index, style }) => (
<div
key={index}
className="flex items-center justify-between border-b border-gray-200 p-2"
className="flex items-center justify-between border-gray-200 p-2"
style={style}
>
<span className="truncate">{files[index].path}</span>

View File

@ -15,7 +15,7 @@ export default function PageLayout() {
</main>
</Suspense>
</div>
<Footer className="mt-0" />
<Footer />
</div>
</>
);

View File

@ -147,7 +147,7 @@ export default function WorkspaceBrowseLayout() {
</NavLink>
))
) : (
<p className="text-gray-500"> .</p>
<p className="p-2 text-gray-500"> .</p>
)}
</div>
</div>

View File

@ -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<number>(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({
>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem
onClick={() => {
setUploadType('folder');
@ -53,7 +44,6 @@ export default function WorkspaceDropdownMenu({
>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem
onClick={() => {
setUploadType('zip');
@ -73,17 +63,17 @@ export default function WorkspaceDropdownMenu({
<DialogContent className="max-w-2xl">
<DialogHeader
title={
fileCount > 0
? `파일 업로드 (${fileCount})`
: uploadType === 'file'
? '파일 업로드'
: uploadType === 'folder'
uploadType === 'folder'
? '폴더 업로드'
: '압축 파일 업로드'
: uploadType === 'zip'
? '압축 파일 업로드'
: fileCount > 0
? `파일 업로드 (${fileCount})`
: '파일 업로드'
}
/>
<ImagePreSignedForm
onClose={handleCloseUpload}
onClose={() => setIsOpenUpload(false)}
onRefetch={onRefetch}
onFileCount={handleFileCount}
projectId={projectId}

View File

@ -182,7 +182,7 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc
id="uploadZip"
onClick={handleItemClick}
>
ZIP
</Item>
</>
)}
@ -202,7 +202,17 @@ export default function ProjectContextMenu({ projectId, folderId, node, onRefetc
>
<DialogTrigger asChild></DialogTrigger>
<DialogContent className="max-w-2xl">
<DialogHeader title={fileCount > 0 ? `업로드 (${fileCount})` : '업로드'} />
<DialogHeader
title={
uploadType === 'folder'
? '폴더 업로드'
: uploadType === 'zip'
? '압축 파일 업로드'
: fileCount > 0
? `파일 업로드 (${fileCount})`
: '파일 업로드'
}
/>
<ImagePreSignedForm
onClose={() => setIsOpenUpload(false)}
onRefetch={onRefetch}

View File

@ -9,16 +9,16 @@ export default function Home() {
const { accessToken } = useAuthStore();
return (
<div className="flex h-full w-full flex-col items-center justify-center bg-gray-50">
<div className="flex h-full w-full flex-col items-center justify-center break-keep bg-gray-50 px-10">
<div className="text-center">
<p className="text-5xl font-semibold leading-[60px] text-black">
<span className="text-primary"> </span>
<p className="text-5xl font-semibold leading-[1.2] text-gray-900">
<span className="font-bold text-primary"> </span>
<br />
<span className="text-primary">WorLabel</span>
<span className="font-bold text-primary">WorLabel</span>
</p>
</div>
<div className="mt-4 text-center">
<p className="text-xl font-light leading-[28px] text-black">
<p className="body font-light leading-[28px] text-gray-500">
WorLabel로 .
<br />
.