From 888737f35cf9435433100bc3495188d8a96bacd2 Mon Sep 17 00:00:00 2001 From: Karrot <86092166+karrot0@users.noreply.github.com> Date: Tue, 29 Oct 2024 12:45:22 -0400 Subject: [PATCH 1/4] Create ENG_README.md --- ENG_README.md | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 ENG_README.md diff --git a/ENG_README.md b/ENG_README.md new file mode 100644 index 0000000..7abc7ad --- /dev/null +++ b/ENG_README.md @@ -0,0 +1,89 @@ +# MoeFlow Frontend Project + +**Due to some API code adjustments, please update the MoeFlow backend to Version 1.0.1 before continuing to use.** + +## Deployment + +For non-developers, it is recommended to refer to [moeflow-deploy](https://github.com/moeflow-com/moeflow-deploy) and use Docker and docker-compose for deployment. + +## Tech Stack + +- Core + - react + - react-router // Routing + - emotion // CSS in JS + - react-intl // i18n + - redux + - react-redux + - redux-saga // Side effects handling + - immer.js // Immutable object handling +- UI + - antd + - antd-mobile + - classnames + - fontawesome +- Other + - pepjs // Pointer event polyfill + - bowser // Browser detection + - why-did-you-render // Performance optimization + - lodash // Utility library + - uuid + - fontmin // Font minification + +## Local Development + +1. Install the recent LTS version of Node.js, such as v18 or v20. +2. Run `npm install` to install dependencies. +3. Run `npm start` to start the Vite development server. + - The development server includes API reverse proxying. By default, requests to `localhost:5173/api/*` are forwarded to `localhost:5000/*` (local moeflow-backend development version address). + - This configuration can be modified in `vite.config.ts`. For instance, you can use a public server instead of the local moeflow-backend. +4. Run `npm build` to build the frontend code for production. **Note** that the backend address used will be configured in `.env.local`. + - If `.env.local` is not created, the default value is `/api`. + +If deploying on hosting services like `Vercel`, you can set `REACT_APP_BASE_URL` to the corresponding backend API address in the hosting environment variables. + +## Project Configuration + +If your translation team is translating from a language other than Japanese (ja) to Traditional Chinese (zh-TW), you can modify the corresponding configuration in `src/configs.tsx` (the file has comments). Common language codes include: + +- `ja` Japanese +- `en` English +- `ko` Korean +- `zh-CN` Simplified Chinese +- `zh-TW` Traditional Chinese + +## Version Updates + +### Version 1.0.0 + +First open-source version of the MoeFlow frontend and backend. + +### Version 1.0.1 + +1. Fixed some data processing and interface bugs. +2. Adjusted default initialization settings, reducing the need to modify only the environment variable `REACT_APP_BASE_URL` to point to your backend address. +3. Adjusted the directory structure for generating static files, making joint frontend and backend deployment easier. +4. Updated the "Create Team" and "Create Project" pages for smoother content submission. **(Please use the latest backend version to avoid data format issues!)** +5. Configurable website titles and other content; search for the corresponding terms in `src/locales` to modify. + +### Version 1.0.3 + +(The final stable version of the old architecture. If you encounter issues with new versions, consider reverting to this version.) + +1. Added support for setting and displaying homepage HTML/CSS. +2. Builds both linux-amd64 and linux-aarch64 images. Deployment on ARM machines is now possible. + +### Version 1.1.0 + +1. Replaced create-react-app and webpack with Vite for build. + +### Version 1.1.1 + +- i18n: Added English locale. +- EXPERIMENTAL: Assisted translation with manga-image-translator. +- Dependency updates. +- Minor fixes. + +### Version NEXT + +- [diff](https://github.com/moeflow-com/moeflow-frontend/compare/v1.1.1...main) From 63c9349e86b020f3babb72dd7843d683bc9af008 Mon Sep 17 00:00:00 2001 From: Karrot <86092166+karrot0@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:00:11 -0400 Subject: [PATCH 2/4] Update ENG_README.md Added GitHub Forks and Stars label and added buttons to Chinese and English README.md --- ENG_README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ENG_README.md b/ENG_README.md index 7abc7ad..e858a8c 100644 --- a/ENG_README.md +++ b/ENG_README.md @@ -1,4 +1,8 @@ # MoeFlow Frontend Project +[![GitHubStars](https://img.shields.io/github/stars/moeflow-com/moeflow-frontend)]() +[![GitHubForks](https://img.shields.io/github/forks/moeflow-com/moeflow-frontend)]() +[![Chinese README](https://img.shields.io/badge/README-Chinese-red)](README.md) +[![English README](https://img.shields.io/badge/README-English-blue)](ENG_README.md) **Due to some API code adjustments, please update the MoeFlow backend to Version 1.0.1 before continuing to use.** From 15f8c22c434342b766b69eaa2c27fbfba6c8cc9e Mon Sep 17 00:00:00 2001 From: Karrot <86092166+karrot0@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:02:16 -0400 Subject: [PATCH 3/4] Update README.md Same thing as ENG_README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index b6d6e41..0de0c64 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,10 @@ # 萌翻[MoeFlow]前端项目 +[![GitHubStars](https://img.shields.io/github/stars/moeflow-com/moeflow-frontend)]() +[![GitHubForks](https://img.shields.io/github/forks/moeflow-com/moeflow-frontend)]() +[![Chinese README](https://img.shields.io/badge/README-中文-red)](README.md) +[![English README](https://img.shields.io/badge/README-English-blue)](ENG_README.md) + +**由于部分API代码调整,请更新萌翻后端到对应 Version.1.0.1 后继续使用。** **由于部分API代码调整,请更新萌翻后端到对应 Version.1.0.1 后继续使用。** From 76f0a13c11c3d10adb92c579365927ace07a5040 Mon Sep 17 00:00:00 2001 From: Karrot <86092166+karrot0@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:05:17 -0400 Subject: [PATCH 4/4] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 0de0c64..3515e7c 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,6 @@ **由于部分API代码调整,请更新萌翻后端到对应 Version.1.0.1 后继续使用。** -**由于部分API代码调整,请更新萌翻后端到对应 Version.1.0.1 后继续使用。** - ## 部署方法 非开发者建议参考 [moeflow-deploy](https://github.com/moeflow-com/moeflow-deploy) ,用docker和docker-compose部署。