💄(frontend) visibility icon near title
It was decided to add a visibility icon near the title of the document in the grid view.
This commit is contained in:
@@ -27,8 +27,7 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
|
|||||||
const shareModal = useModal();
|
const shareModal = useModal();
|
||||||
const isPublic = doc.link_reach === LinkReach.PUBLIC;
|
const isPublic = doc.link_reach === LinkReach.PUBLIC;
|
||||||
const isAuthenticated = doc.link_reach === LinkReach.AUTHENTICATED;
|
const isAuthenticated = doc.link_reach === LinkReach.AUTHENTICATED;
|
||||||
|
const isShared = isPublic || isAuthenticated;
|
||||||
const showAccesses = isPublic || isAuthenticated;
|
|
||||||
|
|
||||||
const handleShareClick = () => {
|
const handleShareClick = () => {
|
||||||
shareModal.open();
|
shareModal.open();
|
||||||
@@ -67,12 +66,11 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
|
|||||||
$direction="row"
|
$direction="row"
|
||||||
$align="center"
|
$align="center"
|
||||||
$gap={spacingsTokens.xs}
|
$gap={spacingsTokens.xs}
|
||||||
$flex={flexLeft}
|
|
||||||
$padding={{ right: isDesktop ? 'md' : '3xs' }}
|
$padding={{ right: isDesktop ? 'md' : '3xs' }}
|
||||||
$maxWidth="100%"
|
$maxWidth="100%"
|
||||||
>
|
>
|
||||||
<SimpleDocItem isPinned={doc.is_favorite} doc={doc} />
|
<SimpleDocItem isPinned={doc.is_favorite} doc={doc} />
|
||||||
{showAccesses && (
|
{isShared && (
|
||||||
<Box
|
<Box
|
||||||
$padding={{ top: !isDesktop ? '4xs' : undefined }}
|
$padding={{ top: !isDesktop ? '4xs' : undefined }}
|
||||||
$css={
|
$css={
|
||||||
|
|||||||
Reference in New Issue
Block a user