Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #183 from mgilangjanuar/staging
Browse files Browse the repository at this point in the history
fix share file in view page and add send to menu
  • Loading branch information
mgilangjanuar authored Jan 9, 2022
2 parents d74bba0 + b5c3329 commit 31d0d9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/src/pages/View.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
ArrowLeftOutlined,
ArrowRightOutlined,
AudioOutlined,
BranchesOutlined,
CopyOutlined,
Expand Down Expand Up @@ -454,7 +455,8 @@ const View: React.FC<PageProps> = ({ match }) => {
{!showContent && <Button shape="circle" icon={<ArrowLeftOutlined />} onClick={back} />}
{!showContent && me?.user.id === data?.file.user_id ? <Dropdown placement="bottomCenter" trigger={['click']} overlay={<Menu>
<Menu.Item key="rename" onClick={() => setFileRename(data?.file)} icon={<EditOutlined />}>Rename</Menu.Item>
<Menu.Item key="share" onClick={() => setSelectShare(data?.file)} icon={<ShareAltOutlined />}>Share</Menu.Item>
<Menu.Item key="share" onClick={() => setSelectShare({ action: 'share', row: data?.file })} icon={<ShareAltOutlined />}>Share</Menu.Item>
<Menu.Item key="send" onClick={() => setSelectShare({ action: 'forward', row: data?.file })} icon={<ArrowRightOutlined />}>Send to</Menu.Item>
<Menu.Item key="download" onClick={() => location.replace(`${apiUrl}/files/${data?.file.id}?raw=1&dl=1`)} icon={<DownloadOutlined />}>Download</Menu.Item>
<Menu.Item key="remove" danger onClick={() => setSelectDeleted([data?.file])} icon={<DeleteOutlined />}>Delete</Menu.Item>
</Menu>}>
Expand Down

0 comments on commit 31d0d9a

Please sign in to comment.