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