diff --git a/client/package-lock.json b/client/package-lock.json index 734e626..8f4f28d 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -6868,7 +6868,6 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "license": "MIT", "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", diff --git a/client/projectupload.html b/client/projectupload.html new file mode 100644 index 0000000..6ecc1fc --- /dev/null +++ b/client/projectupload.html @@ -0,0 +1,125 @@ + + + + + + + + Bitbox - Where Projects Find Solutions Together + + + + + + + + + +
+
+
+

Project Upload Form

+
+
+ +
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + + + + + + + +
+ + + +
+
+
+ + +
+ + +
+ + +
+ +
+ + +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+
+
+

+
+
+
+ +
+
+ + + + + + + + + + diff --git a/client/src/component/About.jsx b/client/src/component/About.jsx index 70fb42d..62df204 100644 --- a/client/src/component/About.jsx +++ b/client/src/component/About.jsx @@ -31,7 +31,13 @@ export default function About(props) { return (
-
+

About Us

diff --git a/client/src/component/Discussion.jsx b/client/src/component/Discussion.jsx index 8301543..4c7739d 100644 --- a/client/src/component/Discussion.jsx +++ b/client/src/component/Discussion.jsx @@ -80,6 +80,7 @@ const Discussion = (props) => { isOpen={isModalOpen} onClose={() => setIsModalOpen(false)} onSubmit={handleJoin} + mode={props.mode} />
@@ -94,7 +95,7 @@ const Discussion = (props) => { {/* Form for sending messages */}
- -
-
-
- -
- logo +
+
+
+
+ +
+ logo +
+

BITBOX

+ +
+ Where Projects Find Solution Together +
+
+ Explore more..
-

BITBOX

- -
Where Projects Find Solution Together
-
- Explore more..
-
-
-

About Bitbox

-
-
    -
  • Contact Us
  • -
  • Code of Conduct
  • -
+ +
+

+ About Bitbox +

+
+
    +
  • Contact Us
  • +
  • Code of Conduct
  • +
+
-
-
-
-

Legal

+ +
+

+ Legal +

  • Feedback
  • Privacy Policy
  • Terms of use
-
-
-
-

Follow us on

- -
-
-
-
-

© 2024 Bitbox.  Made with 🤍 by Bitbox India.  All rights reserved.

-
+
+

+ Follow us on +

+ +
+
- - ) +
+

© 2024 Bitbox.  Made with 🤍 by Bitbox India.  All rights reserved.

+
+
+ + ); } Footer.propTypes = { showAlert: PropTypes.func, - mode: PropTypes.string, + mode: PropTypes.string.isRequired, }; export default Footer; diff --git a/client/src/component/Home.jsx b/client/src/component/Home.jsx index 9748244..c35e505 100644 --- a/client/src/component/Home.jsx +++ b/client/src/component/Home.jsx @@ -7,6 +7,7 @@ import Share from '../assets/images/Share.png'; import glichBitboxGif from '../assets/images/Other Gifs/Bitbox Glitch.gif' import CardsPage from './HomePage/Card'; + const Home = (props) => { return ( diff --git a/client/src/component/InputModal.jsx b/client/src/component/InputModal.jsx index bfbeb4b..0f1c94b 100644 --- a/client/src/component/InputModal.jsx +++ b/client/src/component/InputModal.jsx @@ -1,6 +1,7 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; +import PropTypes from 'prop-types'; // Import PropTypes -const InputModal = ({ isOpen, onClose, onSubmit }) => { +const InputModal = ({ isOpen, onClose, onSubmit, mode }) => { const [name, setName] = useState(''); const [modalMessage, setModalMessage] = useState(''); @@ -26,10 +27,15 @@ const InputModal = ({ isOpen, onClose, onSubmit }) => { if (!isOpen) return null; - return ( + return ( /*fixed the inputmodal overlay issue in dark mode*/
-
-

Enter your name to join:

+
+

+ Enter your name to join: +

{ setName(e.target.value); setModalMessage(''); // Clear error message on input change }} + style={{ + color: mode === "dark" ? "white" : "black", + backgroundColor: mode === "dark" ? "#444" : "white", // Adjust input background color + }} onKeyDown={handleKeyDown} // Allow Enter key to submit placeholder="Enter your name" className="border rounded py-2 px-2 mb-3 w-full focus:outline-none focus:ring-2 focus:ring-blue-500" /> {modalMessage &&

{modalMessage}

} -
+
- //
- // - //
- //
Don't have an account? - // Signup - //
- // {/* Or Sign in with */} - // {/*
- // - // - // - //
*/} - // {/* */} - //
- //
- //
- //
- // ) - // return ( -
+

Login

@@ -160,11 +112,11 @@ const Login = ({mode}) => { color: mode === 'dark' ? 'white' : 'black', }}>
-

- Don't have an account?{" "} + Dont have an account?{" "} Sign Up @@ -191,14 +143,12 @@ const Login = ({mode}) => {

- {/* Antd Modal for Forgot Password */} Reset Password via Email} visible={forgotPasswordModalVisible} onOk={handleForgotPassword} onCancel={() => setForgotPasswordModalVisible(false)} okText="Submit" - className="" okButtonProps={{ style: { backgroundColor: "#6366f1", color: "#000" }, }} @@ -216,6 +166,7 @@ const Login = ({mode}) => { value={forgotEmail} onChange={(e) => setForgotEmail(e.target.value)} required + style={{ backgroundColor: props.mode === 'dark' ? '#333' : '#fff', color: props.mode === 'dark' ? '#fff' : '#000' }} />
@@ -223,9 +174,9 @@ const Login = ({mode}) => { ); }; -// Prop Validation Login.propTypes = { showAlert: PropTypes.func, + mode: PropTypes.string.isRequired, }; export default Login; diff --git a/client/src/component/Share.jsx b/client/src/component/Share.jsx index f5f6982..8c82d5d 100644 --- a/client/src/component/Share.jsx +++ b/client/src/component/Share.jsx @@ -1,8 +1,17 @@ +// <<<<<<< nik + +// import { ToastContainer, toast } from 'react-toastify'; // import 'react-toastify/dist/ReactToastify.css'; // import Share from '../assets/images/Share.png'; +// import PropTypes from 'prop-types'; // Import PropTypes +// ======= +// // import 'react-toastify/dist/ReactToastify.css'; +// // import Share from '../assets/images/Share.png'; +// >>>>>>> main -// const ShareComponent = (props) => { +// // const ShareComponent = (props) => { +// <<<<<<< nik // return ( //
//
@@ -15,14 +24,51 @@ // Share // //

-// 🌐 Join the vibrant Bitbox Opensource Community today! Whether you're a seasoned developer or just starting out, there's a place for you to collaborate, -// innovate, and make a difference. Let's shape the future of digital exchange together! #BitboxCommunity #OpenSource 🚀💻 +// 🌐 Join the vibrant Bitbox Opensource Community today! Whether you're a seasoned developer or just starting out, there's a place for you to collaborate, +// innovate, and make a difference. Let's shape the future of digital exchange together! #BitboxCommunity #OpenSource 🚀💻 //

+// //
//
//
+// //
// ); // }; +// ShareComponent.propTypes = { +// mode: PropTypes.string.isRequired, // Expecting 'mode' to be a string and required +// }; + // export default ShareComponent; +// ======= +// // return ( +// //
+// //
+// //
+// // Share +// //
+// //
+// //
+// //

+// // Share +// //

+// //

+// // 🌐 Join the vibrant Bitbox Opensource Community today! Whether you're a seasoned developer or just starting out, there's a place for you to collaborate, +// // innovate, and make a difference. Let's shape the future of digital exchange together! #BitboxCommunity #OpenSource 🚀💻 +// //

+// //
+// //
+// //
+// //
+// // ); +// // }; + +// // export default ShareComponent; +// >>>>>>> main diff --git a/client/src/component/Signup.jsx b/client/src/component/Signup.jsx index 5637a0a..bde16e2 100644 --- a/client/src/component/Signup.jsx +++ b/client/src/component/Signup.jsx @@ -1,4 +1,4 @@ -import { Eye, EyeOff, Lock, Mail, User } from "lucide-react"; +import { Eye, EyeOff} from "lucide-react"; import PropTypes from "prop-types"; import { useState } from "react"; import { Link, useNavigate } from "react-router-dom"; diff --git a/client/src/component/Verify.jsx b/client/src/component/Verify.jsx index 41fb84d..1d544f3 100644 --- a/client/src/component/Verify.jsx +++ b/client/src/component/Verify.jsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { useParams, useNavigate } from 'react-router-dom'; const host = "http://localhost:5000"; diff --git a/client/src/component/css/Footer.css b/client/src/component/css/Footer.css index 4d831e6..71fcd90 100644 --- a/client/src/component/css/Footer.css +++ b/client/src/component/css/Footer.css @@ -63,6 +63,41 @@ p { .footer-container a:hover { color: #0d0d0e; } +/* Icon styles */ +.footer-container .social a { + color: #0a0a0a; /* Default color for light mode */ +} + +.footer-container .social a:hover { + color: #0d0d0e; /* Hover color for light mode */ +} + +/* Dark mode styles */ +.footer-container.dark-mode .social a { + color: white; /* Icon color in dark mode */ +} + +.footer-container.dark-mode .social a:hover { + color: #cccccc; /* Lighter hover color in dark mode */ +} + +/* Specific icon color overrides */ +.footer-container.dark-mode .social a .FaLinkedin { + color: white; /* LinkedIn icon color in dark mode */ +} + +.footer-container.dark-mode .social a .FaTwitter { + color: white; /* Twitter icon color in dark mode */ +} + +.footer-container.dark-mode .social a .FaGithub { + color: white; /* GitHub icon color in dark mode */ +} + +.footer-container.dark-mode .social a .FaYoutube { + color: white; /* YouTube icon color in dark mode */ +} + ul { list-style-type: none; diff --git a/client/src/component/css/Login.css b/client/src/component/css/Login.css index 2a0afe7..3523827 100644 --- a/client/src/component/css/Login.css +++ b/client/src/component/css/Login.css @@ -49,7 +49,7 @@ body{ border-bottom: 2px solid #eee; } .input{ - color: black; + color:"#000000"; border: none; outline: none; background: none; @@ -59,6 +59,14 @@ body{ font-size: 17px; } + + +/*Changed this for dark-mode input toggle (by anothercoder-nik)*/ +/* .dark-mode .input { + color: #ffffff; /* White text for dark mode */ +/* background: #000000; /* Black background for dark mode */ +/* } */ + .submit{ border: none; outline: none; diff --git a/server/Models/Profile.js b/server/Models/Profile.js index 1589f73..573f4c9 100644 --- a/server/Models/Profile.js +++ b/server/Models/Profile.js @@ -6,15 +6,19 @@ const ProfileSchema = new Schema({ user: { type: mongoose.Schema.Types.ObjectId, ref: 'user', + required: true }, image: { image: String, }, name: { type: String, + required: true }, email: { type: String, + required: true, + unique: true, }, address: { type: String, @@ -33,7 +37,8 @@ const ProfileSchema = new Schema({ }, password: { type: String, + required: true, }, -}); +}, { timestamps: true }); module.exports = mongoose.model('profile', ProfileSchema); diff --git a/server/routes/projects.js b/server/routes/projects.js index 5c115b8..68a0894 100644 --- a/server/routes/projects.js +++ b/server/routes/projects.js @@ -13,7 +13,9 @@ router.get('/fetchallglobalprojects',fetchallglobalprojects); router.get('/fetchalluserprojects', fetchuser,fetchalluserprojects); // ROUTE 3 : Add a New Project : POST: "/api/projects/addproject". Login required -router.post('/addproject', fetchuser,addproject) +router.post('/addproject', fetchuser, [ + body('title', 'Title is required').not().isEmpty(), +], addproject); // ROUTE 4 : Update an Existing Project : PUT: "/api/projects/updateproject". Login required router.put('/updateproject/:id', fetchuser, updateproject); @@ -27,4 +29,4 @@ router.post('/uploadProjectImage', fetchuser, uploadProjectImage); // ROUTE 7 : Get All User Project : GET: "/api/projects/getProjectImage". Login required router.get('/getProjectImage', fetchuser, getProjectImage); -module.exports = router \ No newline at end of file +module.exports = router