From 77eecb00e78c6a711d7664c037a1299e9a282dfb Mon Sep 17 00:00:00 2001 From: zhangkuo <769329489@qq.com> Date: Wed, 10 Jul 2024 15:47:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=99=BB=E9=99=86=E5=92=8C?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/auth.module.scss | 60 +- app/components/auth.tsx | 176 +- app/components/home.tsx | 4 +- app/components/login.module.scss | 36 + app/components/login.tsx | 174 + app/constant.ts | 9 +- app/locales/cn.ts | 24 +- package-lock.json | 11314 +++++++++++++++++++++++++++++ public/masks.json | 976 +++ yarn.lock | 2022 +++--- 10 files changed, 13562 insertions(+), 1233 deletions(-) create mode 100644 app/components/login.module.scss create mode 100644 app/components/login.tsx create mode 100644 package-lock.json create mode 100644 public/masks.json diff --git a/app/components/auth.module.scss b/app/components/auth.module.scss index 6630c0613..727e5f0b4 100644 --- a/app/components/auth.module.scss +++ b/app/components/auth.module.scss @@ -1,36 +1,36 @@ -.auth-page { - display: flex; - justify-content: center; - align-items: center; - height: 100%; - width: 100%; - flex-direction: column; +// .auth-page { +// display: flex; +// justify-content: center; +// align-items: center; +// height: 100%; +// width: 100%; +// flex-direction: column; - .auth-logo { - transform: scale(1.4); - } +// .auth-logo { +// transform: scale(1.4); +// } - .auth-title { - font-size: 24px; - font-weight: bold; - line-height: 2; - } +// .auth-title { +// font-size: 24px; +// font-weight: bold; +// line-height: 2; +// } - .auth-tips { - font-size: 14px; - } +// .auth-tips { +// font-size: 14px; +// } - .auth-input { - margin: 3vh 0; - } +// .auth-input { +// margin: 3vh 0; +// } - .auth-actions { - display: flex; - justify-content: center; - flex-direction: column; +// .auth-actions { +// display: flex; +// justify-content: center; +// flex-direction: column; - button:not(:last-child) { - margin-bottom: 10px; - } - } -} +// button:not(:last-child) { +// margin-bottom: 10px; +// } +// } +// } diff --git a/app/components/auth.tsx b/app/components/auth.tsx index 57118349b..5e872cbdb 100644 --- a/app/components/auth.tsx +++ b/app/components/auth.tsx @@ -1,97 +1,97 @@ -import styles from "./auth.module.scss"; -import { IconButton } from "./button"; +// import styles from "./auth.module.scss"; +// import { IconButton } from "./button"; -import { useNavigate } from "react-router-dom"; -import { Path } from "../constant"; -import { useAccessStore } from "../store"; -import Locale from "../locales"; +// import { useNavigate } from "react-router-dom"; +// import { Path } from "../constant"; +// import { useAccessStore } from "../store"; +// import Locale from "../locales"; -import BotIcon from "../icons/bot.svg"; -import { useEffect } from "react"; -import { getClientConfig } from "../config/client"; +// import BotIcon from "../icons/bot.svg"; +// import { useEffect } from "react"; +// import { getClientConfig } from "../config/client"; -export function AuthPage() { - const navigate = useNavigate(); - const accessStore = useAccessStore(); +// export function AuthPage() { +// const navigate = useNavigate(); +// const accessStore = useAccessStore(); - const goHome = () => navigate(Path.Home); - const goChat = () => navigate(Path.Chat); - const resetAccessCode = () => { - accessStore.update((access) => { - access.openaiApiKey = ""; - access.accessCode = ""; - }); - }; // Reset access code to empty string +// const goHome = () => navigate(Path.Home); +// const goChat = () => navigate(Path.Chat); +// const resetAccessCode = () => { +// accessStore.update((access) => { +// access.openaiApiKey = ""; +// access.accessCode = ""; +// }); +// }; // Reset access code to empty string - useEffect(() => { - if (getClientConfig()?.isApp) { - navigate(Path.Settings); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); +// useEffect(() => { +// if (getClientConfig()?.isApp) { +// navigate(Path.Settings); +// } +// // eslint-disable-next-line react-hooks/exhaustive-deps +// }, []); - return ( -