mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-15 10:25:11 +00:00
docs: migrate to native Fumadocs search & UI fixes (#12732)
Changes: - **Search**: Replaced Inkeep with Fumadocs' native built-in search (createFromSource). Removed @inkeep/cxkit-react and custom search dialogs. - **Hydration Fix**: Removed markdown links from ### headings in egress.mdx (across all versions) to fix the <a inside a> DOM mismatch error. - **Console Fix**: Added the missing key prop to <VersionSelector/> in the layout to resolve the React list warning. --------- Co-authored-by: Florian Forster <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Florian Forster
Claude Fable 5.1
parent
7e34f04361
commit
8ccd5b206f
@@ -1,71 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import type { SharedProps } from "fumadocs-ui/components/dialog/search";
|
||||
import {
|
||||
InkeepModalSearchAndChat,
|
||||
type InkeepModalSearchAndChatProps,
|
||||
} from "@inkeep/cxkit-react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
export default function CustomDialog(props: SharedProps) {
|
||||
const [syncTarget, setSyncTarget] = useState<HTMLElement | null>(null);
|
||||
const { open, onOpenChange } = props;
|
||||
// We do this because document is not available in the server
|
||||
useEffect(() => {
|
||||
setSyncTarget(document.documentElement);
|
||||
}, []);
|
||||
|
||||
const config: InkeepModalSearchAndChatProps = {
|
||||
baseSettings: {
|
||||
apiKey: process.env.NEXT_PUBLIC_INKEEP_API_KEY,
|
||||
primaryBrandColor: '#425b76',
|
||||
organizationDisplayName: "Zitadel",
|
||||
colorMode: {
|
||||
sync: {
|
||||
target: syncTarget,
|
||||
attributes: ["class"],
|
||||
isDarkMode: (attributes) => !!attributes.class?.includes("dark"),
|
||||
},
|
||||
},
|
||||
},
|
||||
modalSettings: {
|
||||
isOpen: open,
|
||||
onOpenChange,
|
||||
// optional settings
|
||||
},
|
||||
searchSettings: {
|
||||
// optional settings
|
||||
},
|
||||
aiChatSettings: {
|
||||
aiAssistantName: 'Zitadel AI Assistant',
|
||||
chatSubjectName: 'Zitadel',
|
||||
placeholder: 'How can I enable MFA?',
|
||||
introMessage: 'Hey! I’m the Zitadel AI assistant 🤖 — throw your questions my way!',
|
||||
aiAssistantAvatar: '/icons/favicon-32x32.png',
|
||||
userAvatar: '/icons/user.png',
|
||||
exampleQuestionsLabel: 'Example Questions:',
|
||||
exampleQuestions: [
|
||||
'What is an Instance?',
|
||||
'What is an Organization?',
|
||||
'How to create an Action?',
|
||||
'How to integrate Zitadel to my React app?',
|
||||
],
|
||||
isFirstExampleQuestionHighlighted: true,
|
||||
shouldOpenLinksInNewTab: true,
|
||||
isCopyChatButtonVisible: true,
|
||||
disclaimerSettings: {
|
||||
isEnabled: true,
|
||||
label: 'AI Assistant',
|
||||
tooltip: 'Responses are AI-generated and may require verification.',
|
||||
},
|
||||
toolbarButtonLabels: {
|
||||
clear: 'Start Over',
|
||||
share: 'Share Chat',
|
||||
getHelp: 'Get Help',
|
||||
stop: 'Stop',
|
||||
copyChat: 'Copy Chat',
|
||||
},
|
||||
},
|
||||
};
|
||||
return <InkeepModalSearchAndChat {...config} />;
|
||||
}
|
||||
Reference in New Issue
Block a user