From 4ba6dfa7be99c786ca1ce5ef88f6e6dc12737602 Mon Sep 17 00:00:00 2001 From: Mann Patel <130435633+MannPatel0@users.noreply.github.com> Date: Mon, 21 Apr 2025 22:46:39 -0600 Subject: [PATCH] UI Color update --- README.md | 3 +- frontend/src/App.jsx | 42 +++++------ frontend/src/components/CategoryForm.jsx | 8 +-- frontend/src/components/DashboardNav.jsx | 1 + frontend/src/components/FloatingAlert.jsx | 2 +- frontend/src/components/Navbar.jsx | 2 +- frontend/src/components/Pagination.jsx | 8 +-- frontend/src/components/UserDropdown.jsx | 2 +- frontend/src/pages/Dashboard.jsx | 22 +++--- frontend/src/pages/Favorites.jsx | 56 ++------------- frontend/src/pages/Home.jsx | 62 ++-------------- frontend/src/pages/ProductDetail.jsx | 24 +++---- frontend/src/pages/SearchPage.jsx | 57 ++------------- frontend/src/pages/Selling.jsx | 33 +++++---- frontend/src/pages/Settings.jsx | 21 +++--- frontend/src/pages/Transactions.jsx | 66 +++--------------- .../__pycache__/app.cpython-313.pyc | Bin 11849 -> 11849 bytes 17 files changed, 109 insertions(+), 300 deletions(-) diff --git a/README.md b/README.md index b506b12..c40db75 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,13 @@ 1. python3 server.py #Start The Server ``` --- + ### Recommendation system 1. Install the dependencies ```Bash pip install mysql.connector ``` - +--- ### Database 1. MySql Version 9.2.0 diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 8543792..6569551 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -105,7 +105,7 @@ function App() { body: JSON.stringify({ userId: user.ID, }), - } + }, ); if (!response.ok) { @@ -117,14 +117,14 @@ function App() { if (result.success) { console.log( "Recommendations generated successfully:", - result.recommendations + result.recommendations, ); setRecommendations(result.recommendations); // Store recommendations in session storage for access across the app sessionStorage.setItem( "userRecommendations", - JSON.stringify(result.recommendations) + JSON.stringify(result.recommendations), ); } else { console.error("Error generating recommendations:", result.message); @@ -178,7 +178,7 @@ function App() { email: userData.email, // Add any other required fields }), - } + }, ); if (!response.ok) { @@ -227,7 +227,7 @@ function App() { email: tempUserData.email, code: code, }), - } + }, ); if (!response.ok) { @@ -271,7 +271,7 @@ function App() { "Content-Type": "application/json", }, body: JSON.stringify(userData), - } + }, ); if (!response.ok) { @@ -382,7 +382,7 @@ function App() { email: formValues.email, password: formValues.password, }), - } + }, ); if (!response.ok) { @@ -517,7 +517,7 @@ function App() { // Loading overlay component const LoadingOverlay = () => (
-
+
); @@ -584,7 +584,7 @@ function App() { id="name" name="name" placeholder="Enter your name" - className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-green-500 focus:ring-1 focus:ring-green-500" + className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-emerald-600 focus:ring-1 focus:ring-emerald-600" required={isSignUp} /> @@ -603,7 +603,7 @@ function App() { id="ucid" name="ucid" placeholder="1234567" - className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-green-500 focus:ring-1 focus:ring-green-500" + className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-emerald-600 focus:ring-1 focus:ring-emerald-600" required={isSignUp} /> @@ -621,7 +621,7 @@ function App() { id="email" name="email" placeholder="your.email@ucalgary.ca" - className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-green-500 focus:ring-1 focus:ring-green-500" + className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-emerald-600 focus:ring-1 focus:ring-emerald-600" required /> @@ -639,7 +639,7 @@ function App() { id="phone" name="phone" placeholder="+1(123)456 7890" - className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-green-500 focus:ring-1 focus:ring-green-500" + className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-emerald-600 focus:ring-1 focus:ring-emerald-600" required={isSignUp} /> @@ -658,7 +658,7 @@ function App() { id="address" name="address" placeholder="Your address" - className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-green-500 focus:ring-1 focus:ring-green-500" + className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-emerald-600 focus:ring-1 focus:ring-emerald-600" required={isSignUp} /> @@ -680,7 +680,7 @@ function App() { ? "Create a secure password" : "Enter your password" } - className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-green-500 focus:ring-1 focus:ring-green-500" + className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-emerald-600 focus:ring-1 focus:ring-emerald-600" required /> @@ -689,13 +689,13 @@ function App() { @@ -716,7 +716,7 @@ function App() { id="verificationCode" name="verificationCode" placeholder="Enter the 6-digit code" - className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-green-500 focus:ring-1 focus:ring-green-500" + className="w-full px-4 py-2 border border-gray-300 bg-white text-gray-800 focus:outline-none focus:border-emerald-600 focus:ring-1 focus:ring-emerald-600" required />

@@ -728,7 +728,7 @@ function App() { @@ -746,7 +746,7 @@ function App() { type="button" onClick={handleResendCode} disabled={isLoading} - className="text-sm text-green-500 hover:text-green-700" + className="text-sm text-emerald-600 hover:text-emerald-700" > Resend code @@ -764,7 +764,7 @@ function App() { diff --git a/frontend/src/components/CategoryForm.jsx b/frontend/src/components/CategoryForm.jsx index 08d7e86..21652cb 100644 --- a/frontend/src/components/CategoryForm.jsx +++ b/frontend/src/components/CategoryForm.jsx @@ -22,7 +22,7 @@ export default function CategoryForm({ visible, onAddCategory }) { .classList.remove("opacity-0", "bg-red-200", "text-red-500"); document .getElementById("noti") - .classList.add("bg-green-200", "text-green-800"); + .classList.add("bg-emerald-200", "text-emerald-800"); document.getElementById("noti").innerHTML = `${message.message}`; setCategory(""); onAddCategory(); @@ -42,18 +42,18 @@ export default function CategoryForm({ visible, onAddCategory }) { return (

-