Skip to content

Commit

Permalink
IS-678: UI changes for album tile (#1630)
Browse files Browse the repository at this point in the history
* feat: update dropdown

* feat: update category dropdown

* feat: update dropdown for workspace
  • Loading branch information
harishv7 authored Nov 2, 2023
1 parent bc63798 commit b053fed
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 36 deletions.
17 changes: 5 additions & 12 deletions src/layouts/Media/components/MediaDirectoryCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LinkOverlay, LinkBox, Divider, Text, Icon } from "@chakra-ui/react"
import { BiEditAlt, BiFolder, BiTrash, BiWrench } from "react-icons/bi"
import { BiEdit, BiFolder, BiTrash, BiWrench } from "react-icons/bi"
import { Link as RouterLink, useRouteMatch } from "react-router-dom"

import { Card, CardBody } from "components/Card"
Expand Down Expand Up @@ -45,27 +45,20 @@ export const MediaDirectoryCard = ({
<ContextMenu.Button pos="absolute" />
<ContextMenu.List>
<ContextMenu.Item
icon={<BiEditAlt />}
as={RouterLink}
to={`/sites/${siteName}/media/${mediaType}/mediaDirectory/${encodedDirectoryPath}`}
>
<Text>Edit folder</Text>
</ContextMenu.Item>
<ContextMenu.Item
icon={<BiWrench />}
icon={<BiEdit />}
as={RouterLink}
to={`${url}/editDirectorySettings/${encodedDirectoryPath}`}
>
Folder settings
Rename {mediaType === "images" ? "album" : "directory"}
</ContextMenu.Item>
<>
<Divider />
<ContextMenu.Item
icon={<BiTrash />}
as={RouterLink}
to={`${url}/deleteDirectory/${encodedDirectoryPath}`}
color="text.danger"
>
Delete
Delete {mediaType === "images" ? "album" : "directory"}
</ContextMenu.Item>
</>
</ContextMenu.List>
Expand Down
17 changes: 5 additions & 12 deletions src/layouts/ResourceRoom/components/CategoryCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Divider, Icon, LinkBox, LinkOverlay, Text } from "@chakra-ui/react"
import { BiEditAlt, BiFolder, BiTrash, BiWrench } from "react-icons/bi"
import { BiFolder, BiTrash, BiEdit } from "react-icons/bi"
import { Link as RouterLink, useRouteMatch } from "react-router-dom"

import { Card, CardBody } from "components/Card"
Expand Down Expand Up @@ -36,27 +36,20 @@ export const CategoryCard = ({ title }: CategoryCardProps): JSX.Element => {
<ContextMenu.Button />
<ContextMenu.List>
<ContextMenu.Item
icon={<BiEditAlt />}
as={RouterLink}
to={generatedLink}
>
<Text>Edit category</Text>
</ContextMenu.Item>
<ContextMenu.Item
icon={<BiWrench />}
icon={<BiEdit />}
as={RouterLink}
to={`${url}/editDirectorySettings/${title}`}
>
Category settings
Rename category
</ContextMenu.Item>
<>
<Divider />
<ContextMenu.Item
icon={<BiTrash />}
as={RouterLink}
to={`${url}/deleteDirectory/${title}`}
color="text.danger"
>
Delete
Delete category
</ContextMenu.Item>
</>
</ContextMenu.List>
Expand Down
17 changes: 5 additions & 12 deletions src/layouts/Workspace/components/Cards/FolderCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LinkOverlay, LinkBox, Divider, Text, Icon } from "@chakra-ui/react"
import { BiEditAlt, BiFolder, BiTrash, BiWrench } from "react-icons/bi"
import { BiEdit, BiFolder, BiTrash } from "react-icons/bi"
import { Link as RouterLink, useRouteMatch } from "react-router-dom"

import { Card, CardBody } from "components/Card"
Expand Down Expand Up @@ -35,27 +35,20 @@ export const FolderCard = ({
<ContextMenu.Button position="absolute" />
<ContextMenu.List>
<ContextMenu.Item
icon={<BiEditAlt />}
as={RouterLink}
to={`/sites/${siteName}/folders/${title}`}
>
<Text>Edit folder</Text>
</ContextMenu.Item>
<ContextMenu.Item
icon={<BiWrench />}
icon={<BiEdit />}
as={RouterLink}
to={`${url}/editDirectorySettings/${title}`}
>
Folder settings
Rename folder
</ContextMenu.Item>
<>
<Divider />
<ContextMenu.Item
icon={<BiTrash />}
as={RouterLink}
to={`${url}/deleteDirectory/${title}`}
color="text.danger"
>
Delete
Delete folder
</ContextMenu.Item>
</>
</ContextMenu.List>
Expand Down

0 comments on commit b053fed

Please sign in to comment.