+
+
+ }
+ text={Locale.Auth.Return}
+ onClick={() => navigate(Path.Home)}
+ >
+
@@ -39,36 +61,43 @@ export function AuthPage() {
{Locale.Auth.Title}
{Locale.Auth.Tips}
-
{
accessStore.update(
(access) => (access.accessCode = e.currentTarget.value),
);
}}
/>
+
{!accessStore.hideUserApiKey ? (
<>
{Locale.Auth.SubTips}
-
{
accessStore.update(
(access) => (access.openaiApiKey = e.currentTarget.value),
);
}}
/>
-
{
accessStore.update(
(access) => (access.googleApiKey = e.currentTarget.value),
@@ -85,13 +114,74 @@ export function AuthPage() {
onClick={goChat}
/>
{
- resetAccessCode();
- goHome();
+ goSaas();
}}
/>
);
}
+
+function TopBanner() {
+ const [isHovered, setIsHovered] = useState(false);
+ const [isVisible, setIsVisible] = useState(true);
+ const isMobile = useMobileScreen();
+ useEffect(() => {
+ // 检查 localStorage 中是否有标记
+ const bannerDismissed = storage.getItem("bannerDismissed");
+ // 如果标记不存在,存储默认值并显示横幅
+ if (!bannerDismissed) {
+ storage.setItem("bannerDismissed", "false");
+ setIsVisible(true); // 显示横幅
+ } else if (bannerDismissed === "true") {
+ // 如果标记为 "true",则隐藏横幅
+ setIsVisible(false);
+ }
+ }, []);
+
+ const handleMouseEnter = () => {
+ setIsHovered(true);
+ };
+
+ const handleMouseLeave = () => {
+ setIsHovered(false);
+ };
+
+ const handleClose = () => {
+ setIsVisible(false);
+ storage.setItem("bannerDismissed", "true");
+ };
+
+ if (!isVisible) {
+ return null;
+ }
+ return (
+