diff --git a/admin/src/shared/Sidebar.jsx b/admin/src/shared/Sidebar.jsx index 6de4698..4dab128 100644 --- a/admin/src/shared/Sidebar.jsx +++ b/admin/src/shared/Sidebar.jsx @@ -1,4 +1,3 @@ - /* Copyright 2024 Himanshu Dinkar @@ -16,9 +15,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { useState ,useContext} from "react"; +import { useState, useContext } from "react"; import { Link, useLocation, useNavigate } from "react-router-dom"; -// import { ContextStore } from "../store/ContextStore"; +import { motion } from "framer-motion"; +import { Tooltip } from "@mui/material"; import Logo from "../components/Dashboard/Logo"; import Lottie from "lottie-react"; import loadingAnimation from "../assets/loading.json"; @@ -30,9 +30,9 @@ import EventNoteIcon from '@mui/icons-material/EventNote'; import QuizIcon from '@mui/icons-material/Quiz'; import AssignmentIcon from '@mui/icons-material/Assignment'; import Modal from "../components/Model"; + const Sidebar = () => { - - const {userRole} = useContext(RoleContext); + const { userRole } = useContext(RoleContext); const location = useLocation(); const [isModalOpen, setIsModalOpen] = useState(false); const navigate = useNavigate(); @@ -40,163 +40,157 @@ const Sidebar = () => { // Loader state const [isLoading, setIsLoading] = useState(false); - const isActive = (path) => location.pathname === path; - const handleNavigation = (path) => { if (location.pathname !== path) { setIsLoading(true); setTimeout(() => { setIsLoading(false); navigate(path); - }, 1500); + }, 1500); } }; - return ( -
- {/* Sidebar */} -
- -
+ + setIsModalOpen(false)} onSubmit={() => console.log("Handle Room Join")} email="" - setEmail={() => {}} + setEmail={() => { }} roomId="" - setRoomId={() => {}} + setRoomId={() => { }} loading={false} /> @@ -208,7 +202,6 @@ const Sidebar = () => { loop={true} className="w-20 h-20" /> -
)} diff --git a/client/package-lock.json b/client/package-lock.json index 6c8ff42..dcbc461 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -16,6 +16,7 @@ "axios": "^1.7.7", "clsx": "^2.1.1", "dompurify": "^3.2.3", + "framer-motion": "^12.0.6", "lucide-react": "^0.459.0", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -3469,6 +3470,33 @@ "url": "https://github.com/sponsors/rawify" } }, + "node_modules/framer-motion": { + "version": "12.0.6", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.0.6.tgz", + "integrity": "sha512-LmrXbXF6Vv5WCNmb+O/zn891VPZrH7XbsZgRLBROw6kFiP+iTK49gxTv2Ur3F0Tbw6+sy9BVtSqnWfMUpH+6nA==", + "license": "MIT", + "dependencies": { + "motion-dom": "^12.0.0", + "motion-utils": "^12.0.0", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "@emotion/is-prop-valid": "*", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -4544,6 +4572,21 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/motion-dom": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.0.0.tgz", + "integrity": "sha512-CvYd15OeIR6kHgMdonCc1ihsaUG4MYh/wrkz8gZ3hBX/uamyZCXN9S9qJoYF03GqfTt7thTV/dxnHYX4+55vDg==", + "license": "MIT", + "dependencies": { + "motion-utils": "^12.0.0" + } + }, + "node_modules/motion-utils": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-12.0.0.tgz", + "integrity": "sha512-MNFiBKbbqnmvOjkPyOKgHUp3Q6oiokLkI1bEwm5QA28cxMZrv0CbbBGDNmhF6DIXsi1pCQBSs0dX8xjeER1tmA==", + "license": "MIT" + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -6055,6 +6098,12 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/client/package.json b/client/package.json index 4797c71..fa28a29 100644 --- a/client/package.json +++ b/client/package.json @@ -18,6 +18,7 @@ "axios": "^1.7.7", "clsx": "^2.1.1", "dompurify": "^3.2.3", + "framer-motion": "^12.0.6", "lucide-react": "^0.459.0", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/client/public/images/myImage.jpeg b/client/public/images/myImage.jpeg new file mode 100644 index 0000000..be2e0e3 Binary files /dev/null and b/client/public/images/myImage.jpeg differ diff --git a/client/src/components/AI Powered Assistant/AiAssistent.jsx b/client/src/components/AI Powered Assistant/AiAssistent.jsx index b3bc3c8..e9f14bc 100644 --- a/client/src/components/AI Powered Assistant/AiAssistent.jsx +++ b/client/src/components/AI Powered Assistant/AiAssistent.jsx @@ -22,6 +22,8 @@ import SendIcon from '@mui/icons-material/Send'; import AssistantIcon from '@mui/icons-material/AssistantOutlined'; import { FaSpinner } from 'react-icons/fa'; import DOMPurify from 'dompurify'; +import { motion, AnimatePresence } from "framer-motion"; +import { Sparkles, Brain, Copy, SendHorizontal } from 'lucide-react'; const AiAssistent = () => { const [input, setInput] = useState(""); @@ -80,66 +82,106 @@ const AiAssistent = () => { }; return ( -
-
-
-

- - Classroom AI Assistant +
+
+ {/* Header Section */} + +
+ +
+

+ AI Classroom Assistant

-

- Ask me anything about your course material, assignments, or schedule +

+ Your intelligent learning companion. Ask questions about your courses, assignments, or any academic topic.

-
- - {/* Response Container - Above Input */} - {output && ( -
-
- -
-
-
+ + + + {/* Chat Container */} +
+ {/* Response Display */} + + {output && ( + +
+
+
+ +
+
+
+
+ +
+
+ + )} + + + {/* Input Form */} +
+
+