diff --git a/crabfit-frontend/package.json b/crabfit-frontend/package.json index 0ce5dd3..4e2cfe0 100644 --- a/crabfit-frontend/package.json +++ b/crabfit-frontend/package.json @@ -22,7 +22,7 @@ "i18next-http-backend": "^1.2.4", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-hook-form": "^6.15.4", + "react-hook-form": "^7.8.1", "react-i18next": "^11.8.15", "react-router-dom": "^5.2.0", "react-scripts": "4.0.3", diff --git a/crabfit-frontend/public/i18n/de/privacy.json b/crabfit-frontend/public/i18n/de/privacy.json deleted file mode 100644 index 0f7f917..0000000 --- a/crabfit-frontend/public/i18n/de/privacy.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "Privacy Policy", - - "p1": "This SERVICE is provided by Benjamin Grant at no cost and is intended for use as is.", - "p2": "This page is used to inform visitors regarding the policies of the collection, use, and disclosure of Personal Information if using the Service.", - "p3": "If you choose to use the Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that is collected is used for providing and improving the Service. Your information will not be used or shared with anyone except as described in this Privacy Policy.", - - "h1": "Information Collection and Use", - - "p4": "The Service uses third party services that may collect information used to identify you.", - "p5": "Links to privacy policies of the third party service providers used by the Service:", - "link": "Google Play Services", - - "h2": "Log Data", - - "p6": "When you use the Service, in the case of an error, data and information is collected to improve the Service, which may include your IP address, device name, operating system version, app configuration and the time and date of the error.", - - "h3": "Cookies", - - "p7": "Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.", - "p8": "Cookies are used by Google Analytics to track you across the web and provide anonymous statistics to improve the Service.", - - "h4": "Service Providers", - - "p9": "Third-party companies may be employed for the following reasons:", - "l1": "To facilitate the Service", - "l2": "To provide the Service on our behalf", - "l3": "To perform Service-related services", - "l4": "To assist in analyzing how the Service is used", - "p10": "To perform these tasks, the third parties may have access to your Personal Information, but are obligated not to disclose or use this information for any purpose except the above.", - - "h5": "Security", - - "p11": "Personal Information that is shared via the Service is protected, however remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, so take care when sharing Personal Information.", - - "h6": "Links to Other Sites", - - "p12": "The Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by the Service. Therefore, you are advised to review the Privacy Policy of these websites.", - - "h7": "Children's Privacy", - - "p13": "The Service does not address anyone under the age of 13. Personally identifiable information is not knowingly collected from children under 13. If discovered that a child under 13 has provided the Service with personal information, such information will be immediately deleted from the servers. If you are a parent or guardian and you are aware that your child has provided the Service with personal information, please <1>contact us so that this information can be removed.", - - "h8": "Changes to This Privacy Policy", - - "p14": "This Privacy Policy may be updated from time to time. Thus, you are advised to review this page periodically for any changes.", - "p15": "This policy is effective as of 2021-04-20", - - "h9": "Contact Us", - - "p16": "If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at <1>benjamin.grantGRA0007+crabfit@gmail.com." -} diff --git a/crabfit-frontend/public/i18n/en/home.json b/crabfit-frontend/public/i18n/en/home.json index fce306a..98db888 100644 --- a/crabfit-frontend/public/i18n/en/home.json +++ b/crabfit-frontend/public/i18n/en/home.json @@ -48,10 +48,13 @@ "availabilities": "Availabilities entered", "content": { "p1": "Crab Fit helps you fit your event around everyone's schedules. Simply create an event above and send the link to everyone that is participating. Results update live and you will be able to see a heat-map of when everyone is free.<1/><2>Learn more about how to Crab Fit.", - "p2": "Create a lot of Crab Fits? Get the <1>Chrome extension or <3>Firefox extension for your browser! You can also download the <5>Android app to Crab Fit on the go.", "p3": "Created by <1>Ben Grant, Crab Fit is the modern-day solution to your group event planning debates.", "p4": "The code for Crab Fit is open source, if you find any issues or want to contribute, you can visit the <1>repository. By using Crab Fit you agree to the <3>privacy policy.", - "p5": "Consider donating below if it helped you out so it can stay free for everyone. 🦀" - } + "p5": "Consider donating below if it helped you out so Crab Fit can stay free for everyone. 🦀" + }, + "chrome_extension": "Get the Chrome Extension", + "firefox_extension": "Get the Firefox Extension", + "safari_extension": "Get the Safari Extension", + "android_app": "Download the Android app" } } diff --git a/crabfit-frontend/public/i18n/en/privacy.json b/crabfit-frontend/public/i18n/en/privacy.json index 0f7f917..a83ae48 100644 --- a/crabfit-frontend/public/i18n/en/privacy.json +++ b/crabfit-frontend/public/i18n/en/privacy.json @@ -48,5 +48,5 @@ "h9": "Contact Us", - "p16": "If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at <1>benjamin.grantGRA0007+crabfit@gmail.com." + "p16": "If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at <1>crabfit@bengrant.dev." } diff --git a/crabfit-frontend/public/i18n/es/privacy.json b/crabfit-frontend/public/i18n/es/privacy.json deleted file mode 100644 index 0f7f917..0000000 --- a/crabfit-frontend/public/i18n/es/privacy.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "Privacy Policy", - - "p1": "This SERVICE is provided by Benjamin Grant at no cost and is intended for use as is.", - "p2": "This page is used to inform visitors regarding the policies of the collection, use, and disclosure of Personal Information if using the Service.", - "p3": "If you choose to use the Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that is collected is used for providing and improving the Service. Your information will not be used or shared with anyone except as described in this Privacy Policy.", - - "h1": "Information Collection and Use", - - "p4": "The Service uses third party services that may collect information used to identify you.", - "p5": "Links to privacy policies of the third party service providers used by the Service:", - "link": "Google Play Services", - - "h2": "Log Data", - - "p6": "When you use the Service, in the case of an error, data and information is collected to improve the Service, which may include your IP address, device name, operating system version, app configuration and the time and date of the error.", - - "h3": "Cookies", - - "p7": "Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.", - "p8": "Cookies are used by Google Analytics to track you across the web and provide anonymous statistics to improve the Service.", - - "h4": "Service Providers", - - "p9": "Third-party companies may be employed for the following reasons:", - "l1": "To facilitate the Service", - "l2": "To provide the Service on our behalf", - "l3": "To perform Service-related services", - "l4": "To assist in analyzing how the Service is used", - "p10": "To perform these tasks, the third parties may have access to your Personal Information, but are obligated not to disclose or use this information for any purpose except the above.", - - "h5": "Security", - - "p11": "Personal Information that is shared via the Service is protected, however remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, so take care when sharing Personal Information.", - - "h6": "Links to Other Sites", - - "p12": "The Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by the Service. Therefore, you are advised to review the Privacy Policy of these websites.", - - "h7": "Children's Privacy", - - "p13": "The Service does not address anyone under the age of 13. Personally identifiable information is not knowingly collected from children under 13. If discovered that a child under 13 has provided the Service with personal information, such information will be immediately deleted from the servers. If you are a parent or guardian and you are aware that your child has provided the Service with personal information, please <1>contact us so that this information can be removed.", - - "h8": "Changes to This Privacy Policy", - - "p14": "This Privacy Policy may be updated from time to time. Thus, you are advised to review this page periodically for any changes.", - "p15": "This policy is effective as of 2021-04-20", - - "h9": "Contact Us", - - "p16": "If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at <1>benjamin.grantGRA0007+crabfit@gmail.com." -} diff --git a/crabfit-frontend/public/i18n/fr/privacy.json b/crabfit-frontend/public/i18n/fr/privacy.json deleted file mode 100644 index 0f7f917..0000000 --- a/crabfit-frontend/public/i18n/fr/privacy.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "Privacy Policy", - - "p1": "This SERVICE is provided by Benjamin Grant at no cost and is intended for use as is.", - "p2": "This page is used to inform visitors regarding the policies of the collection, use, and disclosure of Personal Information if using the Service.", - "p3": "If you choose to use the Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that is collected is used for providing and improving the Service. Your information will not be used or shared with anyone except as described in this Privacy Policy.", - - "h1": "Information Collection and Use", - - "p4": "The Service uses third party services that may collect information used to identify you.", - "p5": "Links to privacy policies of the third party service providers used by the Service:", - "link": "Google Play Services", - - "h2": "Log Data", - - "p6": "When you use the Service, in the case of an error, data and information is collected to improve the Service, which may include your IP address, device name, operating system version, app configuration and the time and date of the error.", - - "h3": "Cookies", - - "p7": "Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.", - "p8": "Cookies are used by Google Analytics to track you across the web and provide anonymous statistics to improve the Service.", - - "h4": "Service Providers", - - "p9": "Third-party companies may be employed for the following reasons:", - "l1": "To facilitate the Service", - "l2": "To provide the Service on our behalf", - "l3": "To perform Service-related services", - "l4": "To assist in analyzing how the Service is used", - "p10": "To perform these tasks, the third parties may have access to your Personal Information, but are obligated not to disclose or use this information for any purpose except the above.", - - "h5": "Security", - - "p11": "Personal Information that is shared via the Service is protected, however remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, so take care when sharing Personal Information.", - - "h6": "Links to Other Sites", - - "p12": "The Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by the Service. Therefore, you are advised to review the Privacy Policy of these websites.", - - "h7": "Children's Privacy", - - "p13": "The Service does not address anyone under the age of 13. Personally identifiable information is not knowingly collected from children under 13. If discovered that a child under 13 has provided the Service with personal information, such information will be immediately deleted from the servers. If you are a parent or guardian and you are aware that your child has provided the Service with personal information, please <1>contact us so that this information can be removed.", - - "h8": "Changes to This Privacy Policy", - - "p14": "This Privacy Policy may be updated from time to time. Thus, you are advised to review this page periodically for any changes.", - "p15": "This policy is effective as of 2021-04-20", - - "h9": "Contact Us", - - "p16": "If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at <1>benjamin.grantGRA0007+crabfit@gmail.com." -} diff --git a/crabfit-frontend/public/i18n/hi/privacy.json b/crabfit-frontend/public/i18n/hi/privacy.json deleted file mode 100644 index 0f7f917..0000000 --- a/crabfit-frontend/public/i18n/hi/privacy.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "Privacy Policy", - - "p1": "This SERVICE is provided by Benjamin Grant at no cost and is intended for use as is.", - "p2": "This page is used to inform visitors regarding the policies of the collection, use, and disclosure of Personal Information if using the Service.", - "p3": "If you choose to use the Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that is collected is used for providing and improving the Service. Your information will not be used or shared with anyone except as described in this Privacy Policy.", - - "h1": "Information Collection and Use", - - "p4": "The Service uses third party services that may collect information used to identify you.", - "p5": "Links to privacy policies of the third party service providers used by the Service:", - "link": "Google Play Services", - - "h2": "Log Data", - - "p6": "When you use the Service, in the case of an error, data and information is collected to improve the Service, which may include your IP address, device name, operating system version, app configuration and the time and date of the error.", - - "h3": "Cookies", - - "p7": "Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.", - "p8": "Cookies are used by Google Analytics to track you across the web and provide anonymous statistics to improve the Service.", - - "h4": "Service Providers", - - "p9": "Third-party companies may be employed for the following reasons:", - "l1": "To facilitate the Service", - "l2": "To provide the Service on our behalf", - "l3": "To perform Service-related services", - "l4": "To assist in analyzing how the Service is used", - "p10": "To perform these tasks, the third parties may have access to your Personal Information, but are obligated not to disclose or use this information for any purpose except the above.", - - "h5": "Security", - - "p11": "Personal Information that is shared via the Service is protected, however remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, so take care when sharing Personal Information.", - - "h6": "Links to Other Sites", - - "p12": "The Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by the Service. Therefore, you are advised to review the Privacy Policy of these websites.", - - "h7": "Children's Privacy", - - "p13": "The Service does not address anyone under the age of 13. Personally identifiable information is not knowingly collected from children under 13. If discovered that a child under 13 has provided the Service with personal information, such information will be immediately deleted from the servers. If you are a parent or guardian and you are aware that your child has provided the Service with personal information, please <1>contact us so that this information can be removed.", - - "h8": "Changes to This Privacy Policy", - - "p14": "This Privacy Policy may be updated from time to time. Thus, you are advised to review this page periodically for any changes.", - "p15": "This policy is effective as of 2021-04-20", - - "h9": "Contact Us", - - "p16": "If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at <1>benjamin.grantGRA0007+crabfit@gmail.com." -} diff --git a/crabfit-frontend/public/i18n/id/privacy.json b/crabfit-frontend/public/i18n/id/privacy.json deleted file mode 100644 index 0f7f917..0000000 --- a/crabfit-frontend/public/i18n/id/privacy.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "Privacy Policy", - - "p1": "This SERVICE is provided by Benjamin Grant at no cost and is intended for use as is.", - "p2": "This page is used to inform visitors regarding the policies of the collection, use, and disclosure of Personal Information if using the Service.", - "p3": "If you choose to use the Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that is collected is used for providing and improving the Service. Your information will not be used or shared with anyone except as described in this Privacy Policy.", - - "h1": "Information Collection and Use", - - "p4": "The Service uses third party services that may collect information used to identify you.", - "p5": "Links to privacy policies of the third party service providers used by the Service:", - "link": "Google Play Services", - - "h2": "Log Data", - - "p6": "When you use the Service, in the case of an error, data and information is collected to improve the Service, which may include your IP address, device name, operating system version, app configuration and the time and date of the error.", - - "h3": "Cookies", - - "p7": "Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.", - "p8": "Cookies are used by Google Analytics to track you across the web and provide anonymous statistics to improve the Service.", - - "h4": "Service Providers", - - "p9": "Third-party companies may be employed for the following reasons:", - "l1": "To facilitate the Service", - "l2": "To provide the Service on our behalf", - "l3": "To perform Service-related services", - "l4": "To assist in analyzing how the Service is used", - "p10": "To perform these tasks, the third parties may have access to your Personal Information, but are obligated not to disclose or use this information for any purpose except the above.", - - "h5": "Security", - - "p11": "Personal Information that is shared via the Service is protected, however remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, so take care when sharing Personal Information.", - - "h6": "Links to Other Sites", - - "p12": "The Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by the Service. Therefore, you are advised to review the Privacy Policy of these websites.", - - "h7": "Children's Privacy", - - "p13": "The Service does not address anyone under the age of 13. Personally identifiable information is not knowingly collected from children under 13. If discovered that a child under 13 has provided the Service with personal information, such information will be immediately deleted from the servers. If you are a parent or guardian and you are aware that your child has provided the Service with personal information, please <1>contact us so that this information can be removed.", - - "h8": "Changes to This Privacy Policy", - - "p14": "This Privacy Policy may be updated from time to time. Thus, you are advised to review this page periodically for any changes.", - "p15": "This policy is effective as of 2021-04-20", - - "h9": "Contact Us", - - "p16": "If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at <1>benjamin.grantGRA0007+crabfit@gmail.com." -} diff --git a/crabfit-frontend/public/i18n/ja/privacy.json b/crabfit-frontend/public/i18n/ja/privacy.json deleted file mode 100644 index 0f7f917..0000000 --- a/crabfit-frontend/public/i18n/ja/privacy.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "Privacy Policy", - - "p1": "This SERVICE is provided by Benjamin Grant at no cost and is intended for use as is.", - "p2": "This page is used to inform visitors regarding the policies of the collection, use, and disclosure of Personal Information if using the Service.", - "p3": "If you choose to use the Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that is collected is used for providing and improving the Service. Your information will not be used or shared with anyone except as described in this Privacy Policy.", - - "h1": "Information Collection and Use", - - "p4": "The Service uses third party services that may collect information used to identify you.", - "p5": "Links to privacy policies of the third party service providers used by the Service:", - "link": "Google Play Services", - - "h2": "Log Data", - - "p6": "When you use the Service, in the case of an error, data and information is collected to improve the Service, which may include your IP address, device name, operating system version, app configuration and the time and date of the error.", - - "h3": "Cookies", - - "p7": "Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.", - "p8": "Cookies are used by Google Analytics to track you across the web and provide anonymous statistics to improve the Service.", - - "h4": "Service Providers", - - "p9": "Third-party companies may be employed for the following reasons:", - "l1": "To facilitate the Service", - "l2": "To provide the Service on our behalf", - "l3": "To perform Service-related services", - "l4": "To assist in analyzing how the Service is used", - "p10": "To perform these tasks, the third parties may have access to your Personal Information, but are obligated not to disclose or use this information for any purpose except the above.", - - "h5": "Security", - - "p11": "Personal Information that is shared via the Service is protected, however remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, so take care when sharing Personal Information.", - - "h6": "Links to Other Sites", - - "p12": "The Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by the Service. Therefore, you are advised to review the Privacy Policy of these websites.", - - "h7": "Children's Privacy", - - "p13": "The Service does not address anyone under the age of 13. Personally identifiable information is not knowingly collected from children under 13. If discovered that a child under 13 has provided the Service with personal information, such information will be immediately deleted from the servers. If you are a parent or guardian and you are aware that your child has provided the Service with personal information, please <1>contact us so that this information can be removed.", - - "h8": "Changes to This Privacy Policy", - - "p14": "This Privacy Policy may be updated from time to time. Thus, you are advised to review this page periodically for any changes.", - "p15": "This policy is effective as of 2021-04-20", - - "h9": "Contact Us", - - "p16": "If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at <1>benjamin.grantGRA0007+crabfit@gmail.com." -} diff --git a/crabfit-frontend/public/i18n/ko/privacy.json b/crabfit-frontend/public/i18n/ko/privacy.json deleted file mode 100644 index dd14d07..0000000 --- a/crabfit-frontend/public/i18n/ko/privacy.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": "개인 정보 보호 정책에" -} diff --git a/crabfit-frontend/public/i18n/ru/privacy.json b/crabfit-frontend/public/i18n/ru/privacy.json deleted file mode 100644 index 0f7f917..0000000 --- a/crabfit-frontend/public/i18n/ru/privacy.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "Privacy Policy", - - "p1": "This SERVICE is provided by Benjamin Grant at no cost and is intended for use as is.", - "p2": "This page is used to inform visitors regarding the policies of the collection, use, and disclosure of Personal Information if using the Service.", - "p3": "If you choose to use the Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that is collected is used for providing and improving the Service. Your information will not be used or shared with anyone except as described in this Privacy Policy.", - - "h1": "Information Collection and Use", - - "p4": "The Service uses third party services that may collect information used to identify you.", - "p5": "Links to privacy policies of the third party service providers used by the Service:", - "link": "Google Play Services", - - "h2": "Log Data", - - "p6": "When you use the Service, in the case of an error, data and information is collected to improve the Service, which may include your IP address, device name, operating system version, app configuration and the time and date of the error.", - - "h3": "Cookies", - - "p7": "Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.", - "p8": "Cookies are used by Google Analytics to track you across the web and provide anonymous statistics to improve the Service.", - - "h4": "Service Providers", - - "p9": "Third-party companies may be employed for the following reasons:", - "l1": "To facilitate the Service", - "l2": "To provide the Service on our behalf", - "l3": "To perform Service-related services", - "l4": "To assist in analyzing how the Service is used", - "p10": "To perform these tasks, the third parties may have access to your Personal Information, but are obligated not to disclose or use this information for any purpose except the above.", - - "h5": "Security", - - "p11": "Personal Information that is shared via the Service is protected, however remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, so take care when sharing Personal Information.", - - "h6": "Links to Other Sites", - - "p12": "The Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by the Service. Therefore, you are advised to review the Privacy Policy of these websites.", - - "h7": "Children's Privacy", - - "p13": "The Service does not address anyone under the age of 13. Personally identifiable information is not knowingly collected from children under 13. If discovered that a child under 13 has provided the Service with personal information, such information will be immediately deleted from the servers. If you are a parent or guardian and you are aware that your child has provided the Service with personal information, please <1>contact us so that this information can be removed.", - - "h8": "Changes to This Privacy Policy", - - "p14": "This Privacy Policy may be updated from time to time. Thus, you are advised to review this page periodically for any changes.", - "p15": "This policy is effective as of 2021-04-20", - - "h9": "Contact Us", - - "p16": "If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at <1>benjamin.grantGRA0007+crabfit@gmail.com." -} diff --git a/crabfit-frontend/src/App.tsx b/crabfit-frontend/src/App.tsx index 743c72f..dd97904 100644 --- a/crabfit-frontend/src/App.tsx +++ b/crabfit-frontend/src/App.tsx @@ -97,17 +97,17 @@ const App = () => { borderRadius: 100, border: `4px solid ${theme.primaryBackground}`, width: 12, - background: `${theme.primaryLight}AA`, + background: `${theme.mode === 'light' ? theme.primaryLight : theme.primaryDark}AA`, }, '*::-webkit-scrollbar-thumb:hover': { - background: `${theme.primaryLight}CC`, + background: `${theme.mode === 'light' ? theme.primaryLight : theme.primaryDark}CC`, }, '*::-webkit-scrollbar-thumb:active': { - background: `${theme.primaryLight}`, + background: `${theme.mode === 'light' ? theme.primaryLight : theme.primaryDark}`, }, })} /> - + }> diff --git a/crabfit-frontend/src/components/AvailabilityViewer/availabilityViewerStyle.ts b/crabfit-frontend/src/components/AvailabilityViewer/availabilityViewerStyle.ts index c499db6..330b3cc 100644 --- a/crabfit-frontend/src/components/AvailabilityViewer/availabilityViewerStyle.ts +++ b/crabfit-frontend/src/components/AvailabilityViewer/availabilityViewerStyle.ts @@ -206,7 +206,7 @@ export const Person = styled.button` font: inherit; font-size: 15px; border-radius: 3px; - border: 2px solid ${props => props.theme.text}; + border: 1px solid ${props => props.theme.text}; color: ${props => props.theme.text}; font-weight: 500; background: transparent; diff --git a/crabfit-frontend/src/components/Button/Button.tsx b/crabfit-frontend/src/components/Button/Button.tsx index 896d574..19c40b7 100644 --- a/crabfit-frontend/src/components/Button/Button.tsx +++ b/crabfit-frontend/src/components/Button/Button.tsx @@ -1,16 +1,16 @@ -import { Wrapper, Top, Bottom } from './buttonStyle'; +import { Pressable } from './buttonStyle'; -const Button = ({ - buttonHeight, - buttonWidth, - primaryColor, - secondaryColor, - ...props -}) => ( - - - - +const Button = ({ href, type = 'button', icon, children, ...props }) => ( + + {icon} + {children} + ); export default Button; diff --git a/crabfit-frontend/src/components/Button/buttonStyle.ts b/crabfit-frontend/src/components/Button/buttonStyle.ts index c3a6338..766769a 100644 --- a/crabfit-frontend/src/components/Button/buttonStyle.ts +++ b/crabfit-frontend/src/components/Button/buttonStyle.ts @@ -1,41 +1,65 @@ import styled from '@emotion/styled'; -export const Wrapper = styled.div` - display: inline-block; - position: relative; +export const Pressable = styled.button` + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + text-align: center; + cursor: pointer; + border: 0; + text-decoration: none; + font: inherit; + box-sizing: border-box; + background: ${props => props.primaryColor || props.theme.primary}; + color: ${props => props.primaryColor ? '#FFF' : props.theme.background}; + font-weight: 600; + transition: transform 150ms cubic-bezier(0, 0, 0.58, 1); + border-radius: 3px; + padding: ${props => props.small ? '.4em 1.3em' : '.6em 1.5em'}; + transform-style: preserve-3d; + margin-bottom: 5px; - --btn-height: ${props => props.buttonHeight || '40px'}; - --btn-width: ${props => props.buttonWidth || '100px'}; + & svg, & img { + height: 1.2em; + width: 1.2em; + margin-right: .5em; + } - height: var(--btn-height); - width: var(--btn-width); -`; + ${props => props.size && ` + padding: 0; + height: ${props.size}; + width: ${props.size}; + `} -export const Top = styled.button` - border: 0; - cursor: pointer; - font: inherit; - box-sizing: border-box; - background: ${props => props.primaryColor || props.theme.primary}; - color: #FFF; - font-weight: 600; - text-shadow: 0 -1.5px .5px ${props => props.secondaryColor || props.theme.primaryDark}; - padding: 0; - border-radius: 3px; - height: var(--btn-height); - width: var(--btn-width); - position: absolute; - top: -4px; - left: 0; - user-select: none; - transition: top .15s; + &::before { + content: ''; + position: absolute; + height: 100%; + width: 100%; + top: 0; + left: 0; + background: ${props => props.secondaryColor || props.theme.primaryDark}; + border-radius: inherit; + transform: translate3d(0, 5px, -1em); + transition: transform 150ms cubic-bezier(0, 0, 0.58, 1), box-shadow 150ms cubic-bezier(0, 0, 0.58, 1); + } - &:active { - top: 0; - } + &:hover, &:focus { + transform: translate(0, 1px); + &::before { + transform: translate3d(0, 4px, -1em); + } + } - ${props => props.isLoading && ` - text-shadow: none; + &:active { + transform: translate(0, 5px); + &::before { + transform: translate3d(0, 0, -1em); + } + } + + ${props => props.isLoading && ` color: transparent; cursor: wait; @@ -83,12 +107,18 @@ export const Top = styled.button` } } `} -`; -export const Bottom = styled.div` - box-sizing: border-box; - background: ${props => props.secondaryColor || props.theme.primaryDark}; - border-radius: 3px; - height: var(--btn-height); - width: var(--btn-width); + ${props => props.secondary && ` + background: transparent; + border: 1px solid ${props.primaryColor || props.theme.mode === 'light' ? props.theme.primaryDark : props.theme.primaryLight}; + color: ${props.primaryColor || props.theme.mode === 'light' ? props.theme.primaryDark : props.theme.primaryLight}; + margin-bottom: 0; + + &::before { + content: none; + } + &:hover, &:active, &:focus { + transform: none; + } + `} `; diff --git a/crabfit-frontend/src/components/CalendarField/CalendarField.tsx b/crabfit-frontend/src/components/CalendarField/CalendarField.tsx index 0844a8b..1927aa6 100644 --- a/crabfit-frontend/src/components/CalendarField/CalendarField.tsx +++ b/crabfit-frontend/src/components/CalendarField/CalendarField.tsx @@ -1,4 +1,4 @@ -import { useState, useEffect, useRef } from 'react'; +import { useState, useEffect, useRef, forwardRef } from 'react'; import { useTranslation } from 'react-i18next'; import dayjs from 'dayjs'; import isToday from 'dayjs/plugin/isToday'; @@ -47,13 +47,13 @@ const calculateMonth = (month, year, weekStart) => { return dates; }; -const CalendarField = ({ +const CalendarField = forwardRef(({ label, subLabel, id, - register, + setValue, ...props -}) => { +}, ref) => { const weekStart = useSettingsStore(state => state.weekStart); const locale = useLocaleUpdateStore(state => state.locale); const { t } = useTranslation('home'); @@ -88,6 +88,8 @@ const CalendarField = ({ _setMode(newMode); }; + useEffect(() => setValue(props.name, type ? JSON.stringify(selectedDays) : JSON.stringify(selectedDates)), [type, selectedDays, selectedDates, setValue, props.name]); + useEffect(() => { if (dayjs.Ls.hasOwnProperty(locale) && weekStart !== dayjs.Ls[locale].weekStart) { dayjs.updateLocale(locale, { weekStart }); @@ -102,7 +104,7 @@ const CalendarField = ({ @@ -122,10 +124,8 @@ const CalendarField = ({ <> {dayjs.months()[month]} {year} - + style={{ whiteSpace: 'nowrap' }} + >{t('donate.button')} ( - + {children} diff --git a/crabfit-frontend/src/components/Error/errorStyle.ts b/crabfit-frontend/src/components/Error/errorStyle.ts index 77568f3..59f43df 100644 --- a/crabfit-frontend/src/components/Error/errorStyle.ts +++ b/crabfit-frontend/src/components/Error/errorStyle.ts @@ -4,7 +4,7 @@ export const Wrapper = styled.div` border-radius: 3px; background-color: ${props => props.theme.error}; color: #FFFFFF; - padding: 12px 16px; + padding: 0 16px; display: flex; align-items: center; justify-content: space-between; @@ -13,16 +13,17 @@ export const Wrapper = styled.div` max-height: 0; margin: 0; visibility: hidden; - transition: margin .2s, max-height .2s; + transition: margin .2s, padding .2s, max-height .2s; ${props => props.open && ` opacity: 1; visibility: visible; margin: 20px 0; + padding: 12px 16px; max-height: 60px; - transition: opacity .15s .2s, max-height .2s, margin .2s, visibility .2s; + transition: opacity .15s .2s, max-height .2s, margin .2s, padding .2s, visibility .2s; `} - + @media (prefers-reduced-motion: reduce) { transition: none; } diff --git a/crabfit-frontend/src/components/GoogleCalendar/GoogleCalendar.tsx b/crabfit-frontend/src/components/GoogleCalendar/GoogleCalendar.tsx index 74f5694..a210359 100644 --- a/crabfit-frontend/src/components/GoogleCalendar/GoogleCalendar.tsx +++ b/crabfit-frontend/src/components/GoogleCalendar/GoogleCalendar.tsx @@ -5,7 +5,6 @@ import { useTranslation } from 'react-i18next'; import { Button, Center } from 'components'; import { Loader } from '../Loading/loadingStyle'; import { - LoginButton, CalendarList, CheckboxInput, CheckboxLabel, @@ -100,13 +99,11 @@ const GoogleCalendar = ({ timeZone, timeMin, timeMax, onImport }) => { ) : ( @@ -156,8 +153,7 @@ const GoogleCalendar = ({ timeZone, timeMin, timeMax, onImport }) => { <> {t('event:you.google_cal.info')} ) : ( @@ -223,8 +220,7 @@ const OutlookCalendar = ({ timeZone, timeMin, timeMax, onImport }) => { <> {t('event:you.google_cal.info')} + )} diff --git a/crabfit-frontend/src/pages/Event/Event.tsx b/crabfit-frontend/src/pages/Event/Event.tsx index 6b64e8e..5f4ce82 100644 --- a/crabfit-frontend/src/pages/Event/Event.tsx +++ b/crabfit-frontend/src/pages/Event/Event.tsx @@ -51,7 +51,7 @@ const Event = (props) => { const { t } = useTranslation(['common', 'event']); - const { register, handleSubmit } = useForm(); + const { register, handleSubmit, setFocus } = useForm(); const { id } = props.match.params; const { offline } = props; const [timezone, setTimezone] = useState(Intl.DateTimeFormat().resolvedOptions().timeZone); @@ -329,27 +329,24 @@ const Event = (props) => { setError(null)}>{error} @@ -395,7 +392,9 @@ const Event = (props) => { e.preventDefault(); if (user) { setTab('you'); - } + } else { + setFocus('name'); + } }} selected={tab === 'you'} disabled={!user} diff --git a/crabfit-frontend/src/pages/Event/eventStyle.ts b/crabfit-frontend/src/pages/Event/eventStyle.ts index 60080e6..9a87bcc 100644 --- a/crabfit-frontend/src/pages/Event/eventStyle.ts +++ b/crabfit-frontend/src/pages/Event/eventStyle.ts @@ -90,7 +90,7 @@ export const ShareInfo = styled.p` cursor: pointer; &:hover { - color: ${props.theme.primaryDark}; + color: ${props.theme.mode === 'light' ? props.theme.primaryDark : props.theme.primaryLight}; } `} `; @@ -109,7 +109,7 @@ export const Tab = styled.a` color: ${props => props.theme.text}; padding: 8px 18px; background-color: ${props => props.theme.primaryBackground}; - border: 1px solid ${props => props.theme.primaryLight}; + border: 1px solid ${props => props.theme.primary}; border-bottom: 0; margin: 0 4px; border-top-left-radius: 5px; diff --git a/crabfit-frontend/src/pages/Help/Help.tsx b/crabfit-frontend/src/pages/Help/Help.tsx index 57bab1b..4196595 100644 --- a/crabfit-frontend/src/pages/Help/Help.tsx +++ b/crabfit-frontend/src/pages/Help/Help.tsx @@ -84,7 +84,7 @@ const Help = () => { -
+
diff --git a/crabfit-frontend/src/pages/Help/helpStyle.ts b/crabfit-frontend/src/pages/Help/helpStyle.ts index fc96326..f0f93b8 100644 --- a/crabfit-frontend/src/pages/Help/helpStyle.ts +++ b/crabfit-frontend/src/pages/Help/helpStyle.ts @@ -29,7 +29,7 @@ export const FakeCalendar = styled.div` } & .dates span { background-color: ${props => props.theme.primaryBackground}; - border: 1px solid ${props => props.theme.primaryLight}; + border: 1px solid ${props => props.theme.primary}; display: flex; align-items: center; justify-content: center; @@ -38,15 +38,22 @@ export const FakeCalendar = styled.div` &.selected { color: #FFF; background-color: ${props => props.theme.primary}; - border-color: ${props => props.theme.primary}; } } + & .dates span:first-of-type { + border-start-start-radius: 3px; + border-end-start-radius: 3px; + } + & .dates span:last-of-type { + border-end-end-radius: 3px; + border-start-end-radius: 3px; + } `; export const FakeTimeRange = styled.div` user-select: none; background-color: ${props => props.theme.primaryBackground}; - border: 1px solid ${props => props.theme.primaryLight}; + border: 1px solid ${props => props.theme.primary}; border-radius: 3px; height: 50px; position: relative; diff --git a/crabfit-frontend/src/pages/Home/Home.tsx b/crabfit-frontend/src/pages/Home/Home.tsx index 3dec4fe..59c7dee 100644 --- a/crabfit-frontend/src/pages/Home/Home.tsx +++ b/crabfit-frontend/src/pages/Home/Home.tsx @@ -34,9 +34,11 @@ import { StatNumber, StatLabel, OfflineMessage, + ButtonArea, } from './homeStyle'; import api from 'services'; +import { detect_browser } from 'utils'; import logo from 'res/logo.svg'; import timezones from 'res/timezones.json'; @@ -46,7 +48,7 @@ dayjs.extend(timezone); dayjs.extend(customParseFormat); const Home = ({ offline }) => { - const { register, handleSubmit } = useForm({ + const { register, handleSubmit, setValue } = useForm({ defaultValues: { timezone: Intl.DateTimeFormat().resolvedOptions().timeZone, }, @@ -58,6 +60,7 @@ const Home = ({ offline }) => { personCount: null, version: 'loading...', }); + const [browser, setBrowser] = useState(undefined); const { push } = useHistory(); const { t } = useTranslation(['common', 'home']); @@ -73,6 +76,7 @@ const Home = ({ offline }) => { fetch(); document.title = 'Crab Fit'; + setBrowser(detect_browser()); }, []); const onSubmit = async data => { @@ -173,36 +177,34 @@ const Home = ({ offline }) => { label={t('home:form.name.label')} subLabel={t('home:form.name.sublabel')} type="text" - name="name" id="name" - register={register} + {...register('name')} /> @@ -224,15 +226,39 @@ const Home = ({ offline }) => { {t('home:about.events')} - {stats.personCount ?? '500+'} + {stats.personCount ?? '550+'} {t('home:about.availabilities')}

Crab Fit helps you fit your event around everyone's schedules. Simply create an event above and send the link to everyone that is participating. Results update live and you will be able to see a heat-map of when everyone is free.
Learn more about how to Crab Fit.

- {/* eslint-disable-next-line */} -

Create a lot of Crab Fits? Get the Chrome extension or Firefox extension for your browser! You can also download the Android app to Crab Fit on the go.

- {/* eslint-disable-next-line */} -

Created by Ben Grant, Crab Fit is the modern-day solution to your group event planning debates.

+ + {['chrome', 'firefox'].includes(browser) && ( + + )} + + +

Created by Ben Grant, Crab Fit is the modern-day solution to your group event planning debates.

The code for Crab Fit is open source, if you find any issues or want to contribute, you can visit the repository. By using Crab Fit you agree to the privacy policy.

Consider donating below if it helped you out so it can stay free for everyone. 🦀

diff --git a/crabfit-frontend/src/pages/Home/homeStyle.ts b/crabfit-frontend/src/pages/Home/homeStyle.ts index 16e1f89..70ca3dc 100644 --- a/crabfit-frontend/src/pages/Home/homeStyle.ts +++ b/crabfit-frontend/src/pages/Home/homeStyle.ts @@ -17,7 +17,7 @@ export const TitleSmall = styled.span` text-align: center; font-family: 'Samurai Bob', sans-serif; font-weight: 400; - color: ${props => props.theme.primaryDark}; + color: ${props => props.theme.mode === 'light' ? props.theme.primaryDark : props.theme.primaryLight}; line-height: 1em; text-transform: uppercase; @@ -89,6 +89,10 @@ export const AboutSection = styled.section` margin: 30px 0 0; background-color: ${props => props.theme.primaryBackground}; padding: 20px 0; + + & a { + color: ${props => props.theme.mode === 'light' ? props.theme.primaryDark : props.theme.primaryLight}; + } `; export const P = styled.p` @@ -113,7 +117,7 @@ export const Stat = styled.div` export const StatNumber = styled.span` display: block; font-weight: 900; - color: ${props => props.theme.primaryDark}; + color: ${props => props.theme.mode === 'light' ? props.theme.primaryDark : props.theme.primaryLight}; font-size: 2em; `; @@ -125,3 +129,12 @@ export const OfflineMessage = styled.div` text-align: center; margin: 50px 0 20px; `; + +export const ButtonArea = styled.div` + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: center; + gap: 12px; + margin: 30px 0; +`; diff --git a/crabfit-frontend/src/pages/Privacy/Privacy.tsx b/crabfit-frontend/src/pages/Privacy/Privacy.tsx index e9f0eff..3025cd6 100644 --- a/crabfit-frontend/src/pages/Privacy/Privacy.tsx +++ b/crabfit-frontend/src/pages/Privacy/Privacy.tsx @@ -71,19 +71,19 @@ const Privacy = () => {

{t('privacy:p12')}

{t('privacy:h7')}

-

The Service does not address anyone under the age of 13. Personally identifiable information is not knowingly collected from children under 13. If discovered that a child under 13 has provided the Service with personal information, such information will be immediately deleted from the servers. If you are a parent or guardian and you are aware that your child has provided the Service with personal information, please contact us so that this information can be removed.

+

The Service does not address anyone under the age of 13. Personally identifiable information is not knowingly collected from children under 13. If discovered that a child under 13 has provided the Service with personal information, such information will be immediately deleted from the servers. If you are a parent or guardian and you are aware that your child has provided the Service with personal information, please contact us so that this information can be removed.

{t('privacy:h8')}

{t('privacy:p14')}

{t('privacy:p15')}

{t('privacy:h9')}

-

If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at benjamin.grantGRA0007+crabfit@gmail.com.

+

If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at crabfit@bengrant.dev.

-
+
diff --git a/crabfit-frontend/src/theme/index.ts b/crabfit-frontend/src/theme/index.ts index 9746b65..b102ecc 100644 --- a/crabfit-frontend/src/theme/index.ts +++ b/crabfit-frontend/src/theme/index.ts @@ -15,8 +15,8 @@ const theme = { background: '#111111', text: '#DDDDDD', primary: '#F79E00', - primaryDark: '#F4BB60', - primaryLight: '#F48600', + primaryDark: '#CC7313', + primaryLight: '#F4BB60', primaryBackground: '#30240F', error: '#E53935', loading: '#444444', diff --git a/crabfit-frontend/src/utils/index.ts b/crabfit-frontend/src/utils/index.ts new file mode 100644 index 0000000..701605a --- /dev/null +++ b/crabfit-frontend/src/utils/index.ts @@ -0,0 +1,31 @@ +export const detect_browser = () => { + // Opera 8.0+ + const isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; + + // Firefox 1.0+ + const isFirefox = typeof InstallTrigger !== 'undefined'; + + // Safari 3.0+ "[object HTMLElementConstructor]" + const isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && window['safari'].pushNotification)); + + // Internet Explorer 6-11 + const isIE = /*@cc_on!@*/false || !!document.documentMode; + + // Edge 20+ + const isEdge = !isIE && !!window.StyleMedia; + + // Chrome 1 - 79 + const isChrome = !!window.chrome; + + // Edge (based on chromium) detection + // eslint-disable-next-line + const isEdgeChromium = isChrome && (navigator.userAgent.indexOf("Edg") != -1); + + if (isEdgeChromium) return 'edge_chromium'; + if (isChrome) return 'chrome'; + if (isEdge) return 'edge'; + if (isIE) return 'ie'; + if (isSafari) return 'safari'; + if (isFirefox) return 'firefox'; + if (isOpera) return 'opera'; +}; diff --git a/crabfit-frontend/yarn.lock b/crabfit-frontend/yarn.lock index e7c363a..0a065f8 100644 --- a/crabfit-frontend/yarn.lock +++ b/crabfit-frontend/yarn.lock @@ -9232,10 +9232,10 @@ react-error-overlay@^6.0.9: resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.9.tgz#3c743010c9359608c375ecd6bc76f35d93995b0a" integrity sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew== -react-hook-form@^6.15.4: - version "6.15.4" - resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-6.15.4.tgz#328003e1ccc096cd158899ffe7e3b33735a9b024" - integrity sha512-K+Sw33DtTMengs8OdqFJI3glzNl1wBzSefD/ksQw/hJf9CnOHQAU6qy82eOrh0IRNt2G53sjr7qnnw1JDjvx1w== +react-hook-form@^7.8.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.8.1.tgz#291609c50778bf8bc94e5d4c586e9ee5c6dd512f" + integrity sha512-pwWxd4UfwsKVh/W2YE2Hnu7KBY4KTCZq3QO1PMISzP31AZ5Kmv6ji085QVIHVWVSLT4oX6IhmZ2bWJ2oBIwobQ== react-i18next@^11.8.15: version "11.8.15"