mirror of
https://github.com/docmost/docmost.git
synced 2026-05-21 17:22:54 +08:00
fix visibility
This commit is contained in:
@@ -5,9 +5,10 @@ const enterpriseFeatures = [
|
||||
"AI Integration (Chat, Search & Assistant)",
|
||||
"MCP Support",
|
||||
"SSO (SAML, OIDC, LDAP)",
|
||||
"SCIM Provisioning",
|
||||
"Multi-factor Authentication (2FA)",
|
||||
"Page-level Permissions",
|
||||
"Page verification & approval workflow",
|
||||
"Page Verification & Approval Workflow",
|
||||
"Audit Logs",
|
||||
"Enterprise Controls",
|
||||
"API Keys",
|
||||
@@ -15,7 +16,8 @@ const enterpriseFeatures = [
|
||||
"Full-text Search in Attachments (PDF, DOCX)",
|
||||
"Resolve Comments",
|
||||
"Confluence Import",
|
||||
"DOCX Import",
|
||||
"PDF & DOCX Import",
|
||||
"Templates",
|
||||
];
|
||||
|
||||
export default function OssDetails() {
|
||||
|
||||
@@ -56,6 +56,7 @@ import { useToggleSidebar } from "@/components/layouts/global/hooks/hooks/use-to
|
||||
import { searchSpotlight } from "@/features/search/constants";
|
||||
import TemplatePickerModal from "@/ee/template/components/template-picker-modal";
|
||||
import { useHasFeature } from "@/ee/hooks/use-feature";
|
||||
import { useUpgradeLabel } from "@/ee/hooks/use-upgrade-label";
|
||||
import { Feature } from "@/ee/features";
|
||||
import { ErrorBoundary } from "react-error-boundary";
|
||||
|
||||
@@ -256,6 +257,7 @@ function SpaceMenu({
|
||||
{ open: openTemplatePicker, close: closeTemplatePicker },
|
||||
] = useDisclosure(false);
|
||||
const hasTemplates = useHasFeature(Feature.TEMPLATES);
|
||||
const upgradeLabel = useUpgradeLabel();
|
||||
|
||||
const { data: watchStatus } = useSpaceWatchStatusQuery(spaceId);
|
||||
const watchMutation = useWatchSpaceMutation();
|
||||
@@ -325,15 +327,24 @@ function SpaceMenu({
|
||||
{isWatching ? t("Stop watching space") : t("Watch space")}
|
||||
</Menu.Item>
|
||||
|
||||
{hasTemplates && canManagePages && (
|
||||
{canManagePages && (
|
||||
<>
|
||||
<Menu.Divider />
|
||||
<Menu.Item
|
||||
onClick={openTemplatePicker}
|
||||
leftSection={<IconTemplate size={16} />}
|
||||
<Tooltip
|
||||
label={upgradeLabel}
|
||||
disabled={hasTemplates}
|
||||
position="right"
|
||||
withArrow
|
||||
>
|
||||
{t("Templates")}
|
||||
</Menu.Item>
|
||||
<Menu.Item
|
||||
onClick={hasTemplates ? openTemplatePicker : undefined}
|
||||
leftSection={<IconTemplate size={16} />}
|
||||
data-disabled={!hasTemplates || undefined}
|
||||
aria-disabled={!hasTemplates || undefined}
|
||||
>
|
||||
{t("Templates")}
|
||||
</Menu.Item>
|
||||
</Tooltip>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user