From ffd72f2c0f2b0dec391bcb13db5ebc2ee755b00d Mon Sep 17 00:00:00 2001 From: jingyang <72259332+zjy365@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:13:26 +0800 Subject: [PATCH] docs: add README for license-system-frontend (#4868) Signed-off-by: jingyang <3161362058@qq.com> --- service/license/README.md | 47 ++++++++----------- .../auth/useAuthList.tsx | 0 .../auth/useCustomError.tsx | 0 .../auth/useLanguage.tsx | 0 .../auth/usePassword.tsx | 0 .../auth/useProtocol.tsx | 0 .../{login-module => signin}/auth/useSms.tsx | 0 .../{login-module => signin}/background.tsx | 0 .../{login-module => signin}/index.tsx | 12 ++--- service/license/src/pages/signin.tsx | 2 +- 10 files changed, 26 insertions(+), 35 deletions(-) rename service/license/src/components/{login-module => signin}/auth/useAuthList.tsx (100%) rename service/license/src/components/{login-module => signin}/auth/useCustomError.tsx (100%) rename service/license/src/components/{login-module => signin}/auth/useLanguage.tsx (100%) rename service/license/src/components/{login-module => signin}/auth/usePassword.tsx (100%) rename service/license/src/components/{login-module => signin}/auth/useProtocol.tsx (100%) rename service/license/src/components/{login-module => signin}/auth/useSms.tsx (100%) rename service/license/src/components/{login-module => signin}/background.tsx (100%) rename service/license/src/components/{login-module => signin}/index.tsx (93%) diff --git a/service/license/README.md b/service/license/README.md index a75ac5248..0bf04294e 100644 --- a/service/license/README.md +++ b/service/license/README.md @@ -1,40 +1,31 @@ +# Next.js Project + This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). ## Getting Started -First, run the development server: +### Installation + +First, install the dependencies: ```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev +pnpm i +``` + +### Development Server + +Next, run the development server: + +```bash +pnpm run dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. +## Docker -[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. +To build and run the project with Docker, use the following command: -The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. - -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. +```bash +sudo docker build --platform linux/amd64 -t license-system-frontend:dev -f Dockerfile . +``` diff --git a/service/license/src/components/login-module/auth/useAuthList.tsx b/service/license/src/components/signin/auth/useAuthList.tsx similarity index 100% rename from service/license/src/components/login-module/auth/useAuthList.tsx rename to service/license/src/components/signin/auth/useAuthList.tsx diff --git a/service/license/src/components/login-module/auth/useCustomError.tsx b/service/license/src/components/signin/auth/useCustomError.tsx similarity index 100% rename from service/license/src/components/login-module/auth/useCustomError.tsx rename to service/license/src/components/signin/auth/useCustomError.tsx diff --git a/service/license/src/components/login-module/auth/useLanguage.tsx b/service/license/src/components/signin/auth/useLanguage.tsx similarity index 100% rename from service/license/src/components/login-module/auth/useLanguage.tsx rename to service/license/src/components/signin/auth/useLanguage.tsx diff --git a/service/license/src/components/login-module/auth/usePassword.tsx b/service/license/src/components/signin/auth/usePassword.tsx similarity index 100% rename from service/license/src/components/login-module/auth/usePassword.tsx rename to service/license/src/components/signin/auth/usePassword.tsx diff --git a/service/license/src/components/login-module/auth/useProtocol.tsx b/service/license/src/components/signin/auth/useProtocol.tsx similarity index 100% rename from service/license/src/components/login-module/auth/useProtocol.tsx rename to service/license/src/components/signin/auth/useProtocol.tsx diff --git a/service/license/src/components/login-module/auth/useSms.tsx b/service/license/src/components/signin/auth/useSms.tsx similarity index 100% rename from service/license/src/components/login-module/auth/useSms.tsx rename to service/license/src/components/signin/auth/useSms.tsx diff --git a/service/license/src/components/login-module/background.tsx b/service/license/src/components/signin/background.tsx similarity index 100% rename from service/license/src/components/login-module/background.tsx rename to service/license/src/components/signin/background.tsx diff --git a/service/license/src/components/login-module/index.tsx b/service/license/src/components/signin/index.tsx similarity index 93% rename from service/license/src/components/login-module/index.tsx rename to service/license/src/components/signin/index.tsx index 88dc593bf..e30a9ca9a 100644 --- a/service/license/src/components/login-module/index.tsx +++ b/service/license/src/components/signin/index.tsx @@ -1,10 +1,10 @@ import { getSystemEnv, uploadConvertData } from '@/api/system'; -import useAuthList from '@/components/login-module/auth/useAuthList'; -import useCustomError from '@/components/login-module/auth/useCustomError'; -import Language from '@/components/login-module/auth/useLanguage'; -import usePassword from '@/components/login-module/auth/usePassword'; -import useProtocol from '@/components/login-module/auth/useProtocol'; -import useSms from '@/components/login-module/auth/useSms'; +import useAuthList from '@/components/signin/auth/useAuthList'; +import useCustomError from '@/components/signin/auth/useCustomError'; +import Language from '@/components/signin/auth/useLanguage'; +import usePassword from '@/components/signin/auth/usePassword'; +import useProtocol from '@/components/signin/auth/useProtocol'; +import useSms from '@/components/signin/auth/useSms'; import useSessionStore from '@/stores/session'; import { LoginType } from '@/types'; import { diff --git a/service/license/src/pages/signin.tsx b/service/license/src/pages/signin.tsx index 12ee9b218..52b0d46d1 100644 --- a/service/license/src/pages/signin.tsx +++ b/service/license/src/pages/signin.tsx @@ -1,4 +1,4 @@ -import SigninComponent from '@/components/login-module'; +import SigninComponent from '@/components/signin'; import useRouteParamsStore from '@/stores/routeParams'; import useSessionStore from '@/stores/session'; import { ClusterType } from '@/types';