Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-CloudComputing
/
C_Team_KhuDrive
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
김재형
2020-06-14 23:18:20 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3e44a401675bf7dc8b1560978dd2ea0e58a971ed
3e44a401
1 parent
780059b3
Add actions for folder
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
frontend/src/file/FileItemActions.tsx
frontend/src/file/FileList.tsx
frontend/src/file/FileItemActions.tsx
View file @
3e44a40
import React, { useState } from "react";
import React, { useState
, Fragment
} from "react";
import { Popconfirm, Popover, Button, message } from "antd";
import { FileItem } from "./useFileList";
import styles from "./FileItemActions.module.scss";
...
...
@@ -52,9 +52,11 @@ export function FileItemActions({
이름 변경
</Button>
</Popover>
{!item.is_folder && (
<Button type="link" size="small">
공유
</Button>
)}
<Popover
title="이동할 폴더를 선택하세요"
content={
...
...
@@ -78,6 +80,7 @@ export function FileItemActions({
이동
</Button>
</Popover>
{!item.is_folder && (
<Popover
title="복사할 폴더를 선택하세요"
content={
...
...
@@ -98,6 +101,8 @@ export function FileItemActions({
복사
</Button>
</Popover>
)}
{!item.is_folder && (
<Popconfirm
title="정말로 삭제하시겠습니까?"
onConfirm={() => onDelete(item.id)}
...
...
@@ -108,6 +113,7 @@ export function FileItemActions({
삭제
</Button>
</Popconfirm>
)}
</div>
);
}
...
...
frontend/src/file/FileList.tsx
View file @
3e44a40
...
...
@@ -152,15 +152,14 @@ function getColumns({
dataIndex: "size",
width: 120,
render: (bytes: number, item) =>
item.is_folder ? "" : filesize(bytes, { round: 0 }),
item.is_folder ? "
-
" : filesize(bytes, { round: 0 }),
},
{
title: "",
key: "action",
dataIndex: "",
width: 300,
render: (__: any, item) =>
item.is_folder ? null : (
render: (__: any, item) => (
<FileItemActions
item={item}
onRename={handleRename}
...
...
Please
register
or
login
to post a comment