diff --git a/.github/workflows/deploy_frontend.yml b/.github/workflows/deploy_frontend.yml index 944efb2..5af7c6a 100644 --- a/.github/workflows/deploy_frontend.yml +++ b/.github/workflows/deploy_frontend.yml @@ -27,7 +27,7 @@ jobs: - run: yarn install --immutable - run: yarn build - name: Copy app.yaml to build - run: 'cp app.yaml ./build/app.yaml' + run: 'cp app.yaml ./dist/app.yaml' - id: auth uses: google-github-actions/auth@v0 with: @@ -35,5 +35,5 @@ jobs: - id: deploy uses: google-github-actions/deploy-appengine@v0 with: - working_directory: crabfit-frontend/build + working_directory: crabfit-frontend version: v1 diff --git a/crabfit-frontend/.eslintrc.js b/crabfit-frontend/.eslintrc.js new file mode 100644 index 0000000..0dfd57e --- /dev/null +++ b/crabfit-frontend/.eslintrc.js @@ -0,0 +1,73 @@ +/* eslint-env node */ +module.exports = { + 'settings': { + 'react': { + 'version': 'detect' + } + }, + 'env': { + 'browser': true, + 'es2021': true + }, + 'globals': { + 'process': true, + 'require': true, + 'gtag': true, + }, + 'extends': [ + 'eslint:recommended', + 'plugin:react/recommended' + ], + 'parserOptions': { + 'ecmaFeatures': { + 'jsx': true + }, + 'ecmaVersion': 12, + 'sourceType': 'module' + }, + 'plugins': [ + 'react' + ], + 'rules': { + 'react/display-name': 'off', + 'react/prop-types': 'off', + 'react/no-unescaped-entities': 'off', + 'react/react-in-jsx-scope': 'off', + 'eqeqeq': 2, + 'no-return-await': 1, + 'no-var': 2, + 'prefer-const': 1, + 'yoda': 2, + 'no-trailing-spaces': 1, + 'eol-last': [1, 'always'], + 'no-unused-vars': [ + 1, + { + 'args': 'all', + 'argsIgnorePattern': '^_', + 'ignoreRestSiblings': true + } + ], + 'indent': [ + 'error', + 2 + ], + 'linebreak-style': [ + 'error', + 'unix' + ], + 'quotes': [ + 'error', + 'single' + ], + 'semi': [ + 'error', + 'never' + ], + 'arrow-parens': [ + 'error', + 'as-needed' + ], + 'jsx-quotes': [1, 'prefer-double'], + } +} diff --git a/crabfit-frontend/.gcloudignore b/crabfit-frontend/.gcloudignore new file mode 100644 index 0000000..f970c16 --- /dev/null +++ b/crabfit-frontend/.gcloudignore @@ -0,0 +1,10 @@ +node_modules +.DS_Store +.git +.gitignore +.gcloudignore +src +public +.eslintrc.js +yarn.lock +package.json diff --git a/crabfit-frontend/.gitignore b/crabfit-frontend/.gitignore index 4d29575..6565811 100644 --- a/crabfit-frontend/.gitignore +++ b/crabfit-frontend/.gitignore @@ -1,22 +1,6 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local +node_modules +dist +build npm-debug.log* yarn-debug.log* diff --git a/crabfit-frontend/README.md b/crabfit-frontend/README.md deleted file mode 100644 index 02aac3f..0000000 --- a/crabfit-frontend/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `yarn start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.\ -You will also see any lint errors in the console. - -### `yarn test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `yarn build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `yarn eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) - -### Analyzing the Bundle Size - -This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) - -### Making a Progressive Web App - -This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) - -### Advanced Configuration - -This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) - -### Deployment - -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) - -### `yarn build` fails to minify - -This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) diff --git a/crabfit-frontend/app.yaml b/crabfit-frontend/app.yaml index 10ca879..b3ee472 100644 --- a/crabfit-frontend/app.yaml +++ b/crabfit-frontend/app.yaml @@ -1,15 +1,15 @@ -runtime: nodejs12 +runtime: nodejs16 handlers: # Serve all static files with url ending with a file extension - url: /(.*\..+)$ - static_files: \1 + static_files: dist/\1 upload: (.*\..+)$ secure: always redirect_http_response_code: 301 # Catch all handler to index.html - url: /.* - static_files: index.html - upload: index.html + static_files: dist/index.html + upload: dist/index.html secure: always redirect_http_response_code: 301 diff --git a/crabfit-frontend/public/index.html b/crabfit-frontend/index.html similarity index 79% rename from crabfit-frontend/public/index.html rename to crabfit-frontend/index.html index 5bd4e36..b0f99ac 100644 --- a/crabfit-frontend/public/index.html +++ b/crabfit-frontend/index.html @@ -2,7 +2,7 @@
- + - - + + - +{t('help:p1')}
+{t('help:p2')}
+ +{t('help:p4')}
+{t('help:p5')}
+{t('help:p6')}
+{t('help:p7')}
+{t('help:p8')}
+{t('help:p9')}
+{t('help:p10')}
+{t('help:p1')}
-{t('help:p2')}
- -{t('help:p4')}
-{t('help:p5')}
-{t('help:p6')}
-{t('help:p7')}
-{t('help:p8')}
-{t('help:p9')}
-{t('help:p10')}
-This SERVICE is provided by Benjamin Grant at no cost and is intended for use as is.
+This page is used to inform visitors regarding the policies of the collection, use, and disclosure of Personal Information if using the Service.
+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.
+ +The Service uses third party services that may collect information used to identify you.
+Links to privacy policies of the third party service providers used by the Service:
++
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.
+ +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.
+Cookies are used by Google Analytics to track you across the web and provide anonymous statistics to improve the Service.
+ +Third-party companies may be employed for the following reasons:
++
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.
+ +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.
+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.
+ +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 using the details below so that this information can be removed.
+ +This Privacy Policy may be updated from time to time. Thus, you are advised to review this page periodically for any changes.
+Last updated: 2021-06-16
+ +If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at contact@crab.fit.
+This SERVICE is provided by Benjamin Grant at no cost and is intended for use as is.
-This page is used to inform visitors regarding the policies of the collection, use, and disclosure of Personal Information if using the Service.
-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.
- -The Service uses third party services that may collect information used to identify you.
-Links to privacy policies of the third party service providers used by the Service:
--
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.
- -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.
-Cookies are used by Google Analytics to track you across the web and provide anonymous statistics to improve the Service.
- -Third-party companies may be employed for the following reasons:
--
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.
- -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.
-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.
- -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 using the details below so that this information can be removed.
- -This Privacy Policy may be updated from time to time. Thus, you are advised to review this page periodically for any changes.
-Last updated: 2021-06-16
- -If you have any questions or suggestions about the Privacy Policy, do not hesitate to contact us at contact@crab.fit.
-