diff --git a/cognee-frontend/package-lock.json b/cognee-frontend/package-lock.json index c3bf33f0b..b60eca154 100644 --- a/cognee-frontend/package-lock.json +++ b/cognee-frontend/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "classnames": "^2.5.1", "next": "14.2.3", - "ohmy-ui": "^0.0.2", + "ohmy-ui": "^0.0.3", "react": "^18", "react-dom": "^18", "uuid": "^9.0.1" @@ -25,6 +25,45 @@ "typescript": "^5" } }, + "../../../Guerrilla/ohmy-ui": { + "version": "0.0.3", + "extraneous": true, + "license": "MIT", + "dependencies": { + "classnames": "^2.3.2" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-node-resolve": "^15.2.3", + "@rollup/plugin-terser": "^0.4.4", + "@rollup/plugin-typescript": "^11.1.6", + "@types/node": "^20", + "@types/react": "^18", + "@types/react-dom": "^18", + "eslint": "^8", + "eslint-config-next": "14.0.4", + "next": "14.0.4", + "postcss": "^8.4.32", + "postcss-custom-media": "^10.0.2", + "postcss-import": "^15.1.0", + "postcss-preset-env": "^9.3.0", + "rollup": "^4.17.2", + "rollup-plugin-dts": "^6.1.0", + "rollup-plugin-peer-deps-external": "^2.2.4", + "rollup-plugin-postcss": "^4.0.2", + "typescript": "^5" + }, + "peerDependencies": { + "@types/react": "^18", + "react": "^18", + "react-dom": "^18" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@babel/runtime": { "version": "7.24.5", "dev": true, @@ -2853,8 +2892,9 @@ } }, "node_modules/ohmy-ui": { - "version": "0.0.2", - "license": "MIT", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/ohmy-ui/-/ohmy-ui-0.0.3.tgz", + "integrity": "sha512-GXtTZxbL+sXdlT26+mcSrqvUPUIWNUiZOtKT+0lxK6DglGezB0Y/NVQHBcsoPCzmXHY3wi4UBaCH6//8DjHKXA==", "dependencies": { "classnames": "^2.3.2" }, diff --git a/cognee-frontend/package.json b/cognee-frontend/package.json index 7c0821ed9..4c8dfdc91 100644 --- a/cognee-frontend/package.json +++ b/cognee-frontend/package.json @@ -11,7 +11,7 @@ "dependencies": { "classnames": "^2.5.1", "next": "14.2.3", - "ohmy-ui": "^0.0.2", + "ohmy-ui": "^0.0.3", "react": "^18", "react-dom": "^18", "uuid": "^9.0.1" diff --git a/cognee-frontend/src/app/globals.css b/cognee-frontend/src/app/globals.css index f4bd77c0c..f06746bfd 100644 --- a/cognee-frontend/src/app/globals.css +++ b/cognee-frontend/src/app/globals.css @@ -1,6 +1,6 @@ :root { --max-width: 1100px; - --border-radius: 12px; + --border-radius: 2px; --font-mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", monospace; diff --git a/cognee-frontend/src/app/page.module.css b/cognee-frontend/src/app/page.module.css index 23f40f61e..02878d478 100644 --- a/cognee-frontend/src/app/page.module.css +++ b/cognee-frontend/src/app/page.module.css @@ -1,7 +1,6 @@ .main { display: flex; flex-direction: column; - padding: 32px; min-height: 100vh; } .main.noData { diff --git a/cognee-frontend/src/app/page.tsx b/cognee-frontend/src/app/page.tsx index ed1c57039..c6a1ce5c7 100644 --- a/cognee-frontend/src/app/page.tsx +++ b/cognee-frontend/src/app/page.tsx @@ -2,17 +2,17 @@ import { useCallback, useEffect, useState } from 'react'; import styles from "./page.module.css"; -import { Notification, NotificationContainer, Text, useNotifications } from 'ohmy-ui'; +import { GhostButton, Notification, NotificationContainer, Spacer, Stack, Text, useBoolean, useNotifications } from 'ohmy-ui'; import useDatasets from '@/modules/ingestion/useDatasets'; import DataView, { Data } from '@/modules/ingestion/DataView'; import DatasetsView from '@/modules/ingestion/DatasetsView'; import classNames from 'classnames'; import addData from '@/modules/ingestion/addData'; import cognifyDataset from '@/modules/datasets/cognifyDataset'; -import deleteDataset from '@/modules/datasets/deleteDataset'; import getDatasetData from '@/modules/datasets/getDatasetData'; -import getExplorationGraphUrl from '@/modules/exploration/getExplorationGraphUrl'; -import { Footer } from '@/ui/Partials'; +import { Footer, SettingsModal } from '@/ui/Partials'; +import { TextLogo } from '@/ui/App'; +import { SettingsIcon } from '@/ui/Icons'; export default function Home() { const { @@ -60,45 +60,49 @@ export default function Home() { }); }, [showNotification]); - const onDatasetDelete = useCallback((dataset: { id: string }) => { - deleteDataset(dataset) - .then(() => { - showNotification(`Dataset "${dataset.id}" deleted.`, 5000); - refreshDatasets(); - }) - }, [refreshDatasets, showNotification]); - - const onDatasetExplore = useCallback((dataset: { id: string }) => { - return getExplorationGraphUrl(dataset); - }, []); + const { + value: isSettingsModalOpen, + setTrue: openSettingsModal, + setFalse: closeSettingsModal, + } = useBoolean(false); return (
-
-
0, - })}> - -
- {datasetData.length > 0 && selectedDataset && ( -
- + + + + + + + + + +
+
0, + })}> +
- )} -
-
+ {datasetData.length > 0 && selectedDataset && ( +
+ +
+ )} +
+ + +