mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 05:49:40 +02:00
[WEB-4350] chore: access icon for linked pages search (#3488)
* chore: return access detail * feat: added page accessibility icon --------- Co-authored-by: gakshita <akshitagoyal1516@gmail.com>
This commit is contained in:
@@ -102,5 +102,5 @@ class PageSearchViewSet(BaseAPIView):
|
||||
if search:
|
||||
pages = pages.filter(name__icontains=search)
|
||||
|
||||
pages = pages.values("id", "name", "logo_props", "is_global")
|
||||
pages = pages.values("id", "name", "logo_props", "is_global", "access")
|
||||
return Response(pages, status=status.HTTP_200_OK)
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
import React, { useCallback, useEffect, useState } from "react";
|
||||
import debounce from "lodash/debounce";
|
||||
import { observer } from "mobx-react";
|
||||
import { FileText, Search, X } from "lucide-react";
|
||||
import { Earth, FileText, Lock, Search, X } from "lucide-react";
|
||||
import { Combobox } from "@headlessui/react";
|
||||
// hooks
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { TIssuePage, TIssueServiceType } from "@plane/types";
|
||||
import { EPageAccess, TIssuePage, TIssueServiceType } from "@plane/types";
|
||||
import {
|
||||
setToast,
|
||||
TOAST_TYPE,
|
||||
@@ -229,6 +229,15 @@ const PagesMultiSelectModal = observer(
|
||||
</div>
|
||||
<span className="truncate text-base">{getPageName(page.name)}</span>
|
||||
</div>
|
||||
{page.access != null && (
|
||||
<div className="hidden flex-shrink-0 text-custom-text-350 group-hover:flex">
|
||||
{page.access === EPageAccess.PUBLIC ? (
|
||||
<Earth className="size-4" />
|
||||
) : (
|
||||
<Lock className="size-4" />
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</Combobox.Option>
|
||||
);
|
||||
})
|
||||
|
||||
@@ -113,4 +113,5 @@ export type TIssuePage = Pick<TPage, "name" | "logo_props"> & {
|
||||
description_stripped: string;
|
||||
created_by?: string;
|
||||
updated_at?: string;
|
||||
access: EPageAccess;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user