Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions website/sdds-finai-docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ const config = {
label: 'GitHub',
position: 'right',
},
{
href: `${baseUrl}ai-search/`,
label: 'AI-поиск',
position: 'right',
},
],
},
footer: {
Expand Down
43 changes: 43 additions & 0 deletions website/sdds-finai-docs/src/pages/ai-search.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React from 'react';
import Layout from '@theme/Layout';
import { IconTrash } from '@salutejs/plasma-icons/css';
import { Button } from '@salutejs/sdds-finai';
import Head from '@docusaurus/Head';

export default function AiSearchPage() {
const handleClearHistory = () => {
const dbName = 'plasma_docs-all';

indexedDB.databases().then((databases) => {
const targetDB = databases.find((db) => db.name === dbName);

if (targetDB) {
indexedDB.deleteDatabase(dbName);
}

window.location.reload();
});
};

return (
<Layout>
<Head>
<title>AI-поиск | sdds-finai</title>
</Head>

<main className="container margin-vert--lg">
<div style={{ display: 'flex', justifyContent: 'flex-end', marginBottom: '16px' }}>
<Button
onClick={handleClearHistory}
text="Очистить историю поиска"
size="xs"
view="clear"
contentRight={<IconTrash />}
/>
</div>

<iframe title="AI search" src="/service/help-page/plasma-docs" width="100%" height="700px" />
</main>
</Layout>
);
}
Loading