|
@@ -44,7 +44,7 @@ import {
|
|
|
useIsAllReplyShown, useIsContainerFluid, useIsNotCreatable,
|
|
useIsAllReplyShown, useIsContainerFluid, useIsNotCreatable,
|
|
|
useIsUploadAllFileAllowed, useIsUploadEnabled,
|
|
useIsUploadAllFileAllowed, useIsUploadEnabled,
|
|
|
useElasticsearchMaxBodyLengthToIndex,
|
|
useElasticsearchMaxBodyLengthToIndex,
|
|
|
- useIsLocalAccountRegistrationEnabled,
|
|
|
|
|
|
|
+ useIsLocalAccountRegistrationEnabled, useIsAiEnabled,
|
|
|
} from '~/stores-universal/context';
|
|
} from '~/stores-universal/context';
|
|
|
import { useEditingMarkdown } from '~/stores/editor';
|
|
import { useEditingMarkdown } from '~/stores/editor';
|
|
|
import {
|
|
import {
|
|
@@ -190,6 +190,8 @@ type Props = CommonProps & {
|
|
|
yjsData: CurrentPageYjsData,
|
|
yjsData: CurrentPageYjsData,
|
|
|
|
|
|
|
|
rendererConfig: RendererConfig,
|
|
rendererConfig: RendererConfig,
|
|
|
|
|
+
|
|
|
|
|
+ aiEnabled: boolean,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const Page: NextPageWithLayout<Props> = (props: Props) => {
|
|
const Page: NextPageWithLayout<Props> = (props: Props) => {
|
|
@@ -242,6 +244,8 @@ const Page: NextPageWithLayout<Props> = (props: Props) => {
|
|
|
|
|
|
|
|
useIsLocalAccountRegistrationEnabled(props.isLocalAccountRegistrationEnabled);
|
|
useIsLocalAccountRegistrationEnabled(props.isLocalAccountRegistrationEnabled);
|
|
|
|
|
|
|
|
|
|
+ useIsAiEnabled(props.aiEnabled);
|
|
|
|
|
+
|
|
|
const { pageWithMeta } = props;
|
|
const { pageWithMeta } = props;
|
|
|
|
|
|
|
|
const pageId = pageWithMeta?.data._id;
|
|
const pageId = pageWithMeta?.data._id;
|
|
@@ -546,6 +550,8 @@ function injectServerConfigurations(context: GetServerSidePropsContext, props: P
|
|
|
searchService, configManager, aclService,
|
|
searchService, configManager, aclService,
|
|
|
} = crowi;
|
|
} = crowi;
|
|
|
|
|
|
|
|
|
|
+ props.aiEnabled = configManager.getConfig('crowi', 'app:aiEnabled');
|
|
|
|
|
+
|
|
|
props.isSearchServiceConfigured = searchService.isConfigured;
|
|
props.isSearchServiceConfigured = searchService.isConfigured;
|
|
|
props.isSearchServiceReachable = searchService.isReachable;
|
|
props.isSearchServiceReachable = searchService.isReachable;
|
|
|
props.isSearchScopeChildrenAsDefault = configManager.getConfig('crowi', 'customize:isSearchScopeChildrenAsDefault');
|
|
props.isSearchScopeChildrenAsDefault = configManager.getConfig('crowi', 'customize:isSearchScopeChildrenAsDefault');
|