From 64b407ae386caa141c004ec8d3126ff989cdd58a Mon Sep 17 00:00:00 2001 From: Shahharshii Date: Sat, 19 Oct 2024 14:51:58 +0530 Subject: [PATCH 1/9] Fixed text overlap issue on small screens --- frontend/src/components/Pages/About.jsx | 5 ++--- frontend/src/components/Shared/Navbar.jsx | 4 ++-- frontend/src/components/ui/Landing.jsx | 2 +- package-lock.json | 6 ++++++ 4 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 package-lock.json diff --git a/frontend/src/components/Pages/About.jsx b/frontend/src/components/Pages/About.jsx index f4ab679b..f834b2aa 100644 --- a/frontend/src/components/Pages/About.jsx +++ b/frontend/src/components/Pages/About.jsx @@ -1,8 +1,7 @@ - -import bgpic from "../../assets/img/abt1.jpg"; +'use client'; +import bgpic from '../../assets/img/abt1.jpg'; import React, { useEffect } from 'react'; - export default function About() { useEffect(() => { window.scrollTo(0, 0); diff --git a/frontend/src/components/Shared/Navbar.jsx b/frontend/src/components/Shared/Navbar.jsx index 482056a9..560478d2 100644 --- a/frontend/src/components/Shared/Navbar.jsx +++ b/frontend/src/components/Shared/Navbar.jsx @@ -20,7 +20,7 @@ const Navbar = () => { { name: 'BOARDGAMES', path: '/boardgame' }, { name: 'MEMBERSHIP', path: '/membership' }, // Add Membership here ]; - + useEffect(() => { setToken(Cookies.get('authToken')); }); @@ -107,7 +107,7 @@ const Navbar = () => { -
+
{token ? (
-
- Forgot Password? -
+ + Forgot Password? + -

- Dont have an account? - - Register Here - +

+ Don’t have an account? + + Register Here +

+ + {error &&

{error}

} + diff --git a/frontend/src/components/Pages/Signup.jsx b/frontend/src/components/Pages/Signup.jsx index a0ae4183..b10ce1c5 100644 --- a/frontend/src/components/Pages/Signup.jsx +++ b/frontend/src/components/Pages/Signup.jsx @@ -1,30 +1,24 @@ import { useState, useEffect } from 'react'; import photo from '../../assets/login.png'; -import { useNavigate } from 'react-router-dom'; -import { Link } from 'react-router-dom'; +import { useNavigate, Link } from 'react-router-dom'; import { FaEye } from 'react-icons/fa'; import { FaEyeSlash } from 'react-icons/fa6'; -import zxcvbn from 'zxcvbn'; // Import zxcvbn for password strength check +import zxcvbn from 'zxcvbn'; // Password strength checker const Signup = () => { const API_URL = import.meta.env.VITE_BACKEND_URL || 'http://localhost:3000'; const navigate = useNavigate(); const [isLoading, setIsLoading] = useState(false); const [error, setError] = useState(null); - const [passwordStrength, setPasswordStrength] = useState(0); // State to track password strength - const [data, setData] = useState({ - name: '', - email: '', - password: '', - }); + const [passwordStrength, setPasswordStrength] = useState(0); + const [data, setData] = useState({ name: '', email: '', password: '' }); const [hidden, setHidden] = useState(true); const handleChange = (e) => { setData({ ...data, [e.target.name]: e.target.value }); - if (e.target.name === 'password') { const result = zxcvbn(e.target.value); - setPasswordStrength(result.score); // Update password strength score + setPasswordStrength(result.score); } }; @@ -36,42 +30,33 @@ const Signup = () => { setIsLoading(false); return; } - if (data.password.length < 8) { setError('Password must be at least 8 characters long'); setIsLoading(false); return; } - if (data.name.length < 3) { setError('Name must be at least 3 characters long'); setIsLoading(false); return; } - if (!data.email.includes('@')) { setError('Please enter a valid email address'); setIsLoading(false); return; } - try { const response = await fetch(`${API_URL}/api/user/register`, { method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data), }); const result = await response.json(); - if (!response.ok) { setIsLoading(false); setError(result.error); return; } - - // Handle successful registration alert('Registered successfully! Please log in.'); navigate('/'); } catch (error) { @@ -95,43 +80,42 @@ const Signup = () => { }; return ( -
- login - -
+
+ login + +
Play Cafe,
- + Register to continue
- handleChange(e)} + type="text" + onChange={handleChange} /> - handleChange(e)} + onChange={handleChange} /> -
handleChange(e)} + onChange={handleChange} />
- - {/* Password Strength Meter */}
{ Strength: {getPasswordStrengthText(passwordStrength)}

- {error && (
{error}
)} -

+

Already have an account? - - Login - -

- - From c38c275082cdbe7ca5dcdb56e6f654473b215680 Mon Sep 17 00:00:00 2001 From: Ramakrushna Biswal <125277258+RamakrushnaBiswal@users.noreply.github.com> Date: Sun, 20 Oct 2024 21:27:24 +0530 Subject: [PATCH 3/9] Delete package-lock.json --- package-lock.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index a0c27c60..00000000 --- a/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "PlayCafe", - "lockfileVersion": 3, - "requires": true, - "packages": {} -} From cfedd243530d2cb2067d5f22d4e48805c5a4d61c Mon Sep 17 00:00:00 2001 From: smog-root Date: Sun, 20 Oct 2024 21:56:53 +0530 Subject: [PATCH 4/9] Implement GitHub PR Issue Checker Workflow --- .github/workflows/pr-checker.yaml | 58 +++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/pr-checker.yaml diff --git a/.github/workflows/pr-checker.yaml b/.github/workflows/pr-checker.yaml new file mode 100644 index 00000000..52f6ddaf --- /dev/null +++ b/.github/workflows/pr-checker.yaml @@ -0,0 +1,58 @@ +name: PR Issue Checker +# Created by @smog-root. +on: + pull_request: + types: [opened, edited] + +jobs: + check_pr_details: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies (if needed) + run: pip install re # Install Python's regex library (not needed if using built-in) + + - name: Check PR Description and Title + id: check_pr_details + run: | + python -c " +import re +import sys +import os + +pr_description = os.getenv('GITHUB_EVENT_PULL_REQUEST_BODY', '') +pr_title = os.getenv('GITHUB_EVENT_PULL_REQUEST_TITLE', '') + +# Check if PR description is present +if not pr_description: + print('PR description is missing.') + sys.exit(1) + +# Check if the PR description contains 'Fixes #' +if not re.search(r'Fixes #[0-9]+', pr_description): + print('The PR description should include Fixes , Close, Closes, Closed , Fix , Fixed , Resolve , Resolves #.') + sys.exit(1) + +# Check if the PR title starts with FIX, FEAT, or DOC +if not re.match(r'^(Fixes|Close|Closes|Closed|Fix|Fixed|Resolve|Resolves +Resolved)', pr_title): + print('The PR title should start with Fixes , Close, Closes, Closed , Fix , Fixed , Resolve , Resolves') + sys.exit(1) + +print('PR description and title are valid.') +" + env: + GITHUB_EVENT_PULL_REQUEST_BODY: ${{ github.event.pull_request.body }} + GITHUB_EVENT_PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }} + + - name: Output result + run: echo "All checks passed." + From 8934e1c611b4e927897d740ab7efc0c206bcc5aa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 20 Oct 2024 16:27:09 +0000 Subject: [PATCH 5/9] docs(contributor): contrib-readme-action has updated readme --- README.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4ec81dec..ba9c6e34 100644 --- a/README.md +++ b/README.md @@ -353,6 +353,13 @@ We extend our heartfelt gratitude to all the amazing contributors who have made MD REHAN + + + T-Rahul-prabhu-38 +
+ t rahul prabhu +
+ Aditya90456 @@ -360,6 +367,8 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Aditya Bakshi + + tanishirai @@ -367,8 +376,6 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Tanishi Rai - - Picodes10 @@ -404,6 +411,8 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Ayush Yadav + + AliGates915 @@ -411,8 +420,6 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Ali Gates - - chikatlarakesh @@ -448,6 +455,8 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Bashua Mutiat + + Sapna127 @@ -455,8 +464,6 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Sapna Kul - - stutxi @@ -477,6 +484,13 @@ We extend our heartfelt gratitude to all the amazing contributors who have made
Vaibhav-Kumar-K-R
+ + + + vaibhav-yerkar +
+ Vaibhav._Y +
From 8003bb4bce9f168d91abf4097b5b9eee3621404c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 04:56:19 +0000 Subject: [PATCH 6/9] docs(contributor): contrib-readme-action has updated readme --- README.md | 71 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index ba9c6e34..7b045cc0 100644 --- a/README.md +++ b/README.md @@ -414,40 +414,49 @@ We extend our heartfelt gratitude to all the amazing contributors who have made - - AliGates915 + + smog-root
- Ali Gates + smog-root
- - chikatlarakesh + + vaibhav-yerkar
- CHIKATLA RAKESH + Vaibhav._Y
- - mishradev1 + + Vaibhav-Kumar-K-R
- Dev Mishra + Vaibhav-Kumar-K-R
- - jaidh01 + + Syed-Farazuddin
- Jai Dhingra + Syed Faraz
- - Mohitranag18 + + stutxi
- Mohit Rana + Stuti +
+ + + + Sapna127 +
+ Sapna Kul
+ + MutiatBash @@ -455,41 +464,39 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Bashua Mutiat - - - - Sapna127 + + Mohitranag18
- Sapna Kul + Mohit Rana
- - stutxi + + jaidh01
- Stuti + Jai Dhingra
- - Syed-Farazuddin + + mishradev1
- Syed Faraz + Dev Mishra
- - Vaibhav-Kumar-K-R + + chikatlarakesh
- Vaibhav-Kumar-K-R + CHIKATLA RAKESH
- - vaibhav-yerkar + + AliGates915
- Vaibhav._Y + Ali Gates
From 8fbf6c11c582878667f2436fbbc6aab3ee1c14f7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 05:07:51 +0000 Subject: [PATCH 7/9] docs(contributor): contrib-readme-action has updated readme --- README.md | 71 +++++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 7b045cc0..ba9c6e34 100644 --- a/README.md +++ b/README.md @@ -414,49 +414,40 @@ We extend our heartfelt gratitude to all the amazing contributors who have made - - smog-root -
- smog-root -
- - - - vaibhav-yerkar + + AliGates915
- Vaibhav._Y + Ali Gates
- - Vaibhav-Kumar-K-R + + chikatlarakesh
- Vaibhav-Kumar-K-R + CHIKATLA RAKESH
- - Syed-Farazuddin + + mishradev1
- Syed Faraz + Dev Mishra
- - stutxi + + jaidh01
- Stuti + Jai Dhingra
- - Sapna127 + + Mohitranag18
- Sapna Kul + Mohit Rana
- - MutiatBash @@ -464,39 +455,41 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Bashua Mutiat + + - - Mohitranag18 + + Sapna127
- Mohit Rana + Sapna Kul
- - jaidh01 + + stutxi
- Jai Dhingra + Stuti
- - mishradev1 + + Syed-Farazuddin
- Dev Mishra + Syed Faraz
- - chikatlarakesh + + Vaibhav-Kumar-K-R
- CHIKATLA RAKESH + Vaibhav-Kumar-K-R
- - AliGates915 + + vaibhav-yerkar
- Ali Gates + Vaibhav._Y
From 97481e4409e60bb641b3d57a0dc640c7ff482454 Mon Sep 17 00:00:00 2001 From: Nikhil More <149102391+Nikhil0-3@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:55:53 +0530 Subject: [PATCH 8/9] Update CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 154 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 123 insertions(+), 31 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 2351d266..7cf49ac4 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,53 +1,145 @@ -
+# ✨Contributor Covenant Code of Conduct✨ -# Code of Conduct +--- -
+## 🌟Our Pledge +--- +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. -## Our Pledge +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. -We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. +--- +## 🚦Our Standards -## Our Standards +Examples of behavior that contributes to a positive environment for our +community include: -Examples of behavior that contributes to creating a positive environment include: +* 💖Demonstrating empathy and kindness toward other people +* 🤝Being respectful of differing opinions, viewpoints, and experiences +* 📝Giving and gracefully accepting constructive feedback +* 🌱Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* 🎯Focusing on what is best not just for us as individuals, but for the + overall community -- Using welcoming and inclusive language -- Being respectful of differing viewpoints and experiences -- Gracefully accepting constructive criticism -- Focusing on what is best for the community -- Showing empathy towards other community members +Examples of unacceptable behavior include: -Examples of unacceptable behavior by participants include: +* 🚫The use of sexualized language or imagery, and sexual attention or + advances of any kind +* 🛑Trolling, insulting or derogatory comments, and personal or political attacks +* ⚠️Public or private harassment +* 🔒Publishing others' private information, such as a physical or email + address, without their explicit permission +* ❌Other conduct which could reasonably be considered inappropriate in a + professional setting -- The use of sexualized language or imagery and unwelcome sexual attention or advances -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or electronic address, without explicit permission -- Other conduct which could reasonably be considered inappropriate in a professional setting +--- -## Our Responsibilities +## 👨‍⚖️Enforcement Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. -Maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that do not align with this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. -## Scope +--- +## 🌐Scope -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. -## Enforcement +--- +## 📋Pull Request Guidelines -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project owner. All complaints will be reviewed and investigated promptly and fairly. All project team members are obligated to respect the privacy and security of the reporter of any incident. +Contributions, including pull requests, must align with this Code of Conduct. +All contributors are expected to submit work that fosters a positive and inclusive community. +Inappropriate behavior, language, or content in pull requests may result in the rejection of +the contribution and further enforcement actions as outlined in the guidelines. -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership. +--- +## 🛡️Enforcement -You can also tag the admin, if you find anything voilating the Code of Conduct. +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +. +All complaints will be reviewed and investigated promptly and fairly. -## Attribution +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. -This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/), version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. +--- +## 📖Enforcement Guidelines -Community Impact Guidelines were inspired by Mozilla's code of conduct enforcement ladder. +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: -For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. +### 1. ✏️Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. ⚠️Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. ⏳Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. 🚫Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +--- +## 📜Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From 23a9149f43d3b1e7663018545c8fe20aa0a2e609 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:53:58 +0000 Subject: [PATCH 9/9] docs(contributor): contrib-readme-action has updated readme --- README.md | 80 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index ba9c6e34..25fe95fd 100644 --- a/README.md +++ b/README.md @@ -414,38 +414,54 @@ We extend our heartfelt gratitude to all the amazing contributors who have made - - AliGates915 + + smog-root
- Ali Gates + smog-root
- - chikatlarakesh + + vaibhav-yerkar
- CHIKATLA RAKESH + Vaibhav._Y
- - mishradev1 + + Vaibhav-Kumar-K-R
- Dev Mishra + Vaibhav-Kumar-K-R
- - jaidh01 + + Syed-Farazuddin
- Jai Dhingra + Syed Faraz
- - Mohitranag18 + + stutxi
- Mohit Rana + Stuti +
+ + + + Sapna127 +
+ Sapna Kul +
+ + + + + + Nikhil0-3 +
+ Nikhil More
@@ -455,41 +471,41 @@ We extend our heartfelt gratitude to all the amazing contributors who have made Bashua Mutiat - - - - Sapna127 + + Mohitranag18
- Sapna Kul + Mohit Rana
- - stutxi + + jaidh01
- Stuti + Jai Dhingra
- - Syed-Farazuddin + + mishradev1
- Syed Faraz + Dev Mishra
- - Vaibhav-Kumar-K-R + + chikatlarakesh
- Vaibhav-Kumar-K-R + CHIKATLA RAKESH
+ + - - vaibhav-yerkar + + AliGates915
- Vaibhav._Y + Ali Gates