feat: add auth tip

This commit is contained in:
river
2024-09-19 08:41:09 +08:00
parent 2f0d94a46b
commit e4fda6cacf
5 changed files with 28 additions and 4 deletions

View File

@@ -1,12 +1,22 @@
.auth-page {
display: flex;
justify-content: center;
justify-content: flex-start;
align-items: center;
height: 100%;
width: 100%;
flex-direction: column;
.auth-header {
display: flex;
justify-content: space-between;
width: 100%;
padding: 10px;
box-sizing: border-box;
animation: slide-in-from-top ease 0.3s;
}
.auth-logo {
margin-top: 10vh;
transform: scale(1.4);
}
@@ -14,6 +24,7 @@
font-size: 24px;
font-weight: bold;
line-height: 2;
margin-bottom: 1vh;
}
.auth-tips {

View File

@@ -9,6 +9,7 @@ import Locale from "../locales";
import BotIcon from "../icons/bot.svg";
import { useEffect } from "react";
import { getClientConfig } from "../config/client";
import LeftIcon from "@/app/icons/left.svg";
export function AuthPage() {
const navigate = useNavigate();
@@ -16,7 +17,9 @@ export function AuthPage() {
const goHome = () => navigate(Path.Home);
const goChat = () => navigate(Path.Chat);
const goSaas = () => window.open(SAAS_CHAT_URL);
const goSaas = () => {
window.location.href = SAAS_CHAT_URL;
};
const resetAccessCode = () => {
accessStore.update((access) => {
access.openaiApiKey = "";
@@ -33,6 +36,13 @@ export function AuthPage() {
return (
<div className={styles["auth-page"]}>
<div className={styles["auth-header"]}>
<IconButton
icon={<LeftIcon />}
text={Locale.Auth.Return}
onClick={() => navigate(Path.Home)}
></IconButton>
</div>
<div className={`no-dark ${styles["auth-logo"]}`}>
<BotIcon />
</div>