Compare commits

...

5 Commits

Author SHA1 Message Date
lyf
e83f61e74d fix 2024-09-25 15:21:17 +08:00
lyf
10d472e79e fix 2024-09-25 14:41:41 +08:00
lyf
a6b920d9af fix 2024-09-25 14:35:09 +08:00
lyf
77f037a3c4 add maidian 2024-09-25 13:08:03 +08:00
lyf
248d27680d fix style 2024-09-25 11:15:00 +08:00
9 changed files with 48 additions and 22 deletions

View File

@@ -13,7 +13,10 @@ import BotIcon from "../icons/bot.svg";
import { getClientConfig } from "../config/client";
import LeftIcon from "@/app/icons/left.svg";
import { safeLocalStorage } from "@/app/utils";
import {
trackSettingsPageGuideToCPaymentClick,
trackAuthorizationPageButtonToCPaymentClick,
} from "../utils/auth-settings-events";
const storage = safeLocalStorage();
export function AuthPage() {
@@ -22,6 +25,7 @@ export function AuthPage() {
const goHome = () => navigate(Path.Home);
const goChat = () => navigate(Path.Chat);
const goSaas = () => {
trackAuthorizationPageButtonToCPaymentClick();
window.location.href = SAAS_CHAT_URL;
};
@@ -151,11 +155,17 @@ function TopBanner() {
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
>
<div className={styles["top-banner-inner"]}>
<div className={`${styles["top-banner-inner"]} no-dark`}>
<Logo className={styles["top-banner-logo"]}></Logo>
<span>
{Locale.Auth.TopTips}
<a href={SAAS_CHAT_URL} rel="stylesheet">
<a
href={SAAS_CHAT_URL}
rel="stylesheet"
onClick={() => {
trackSettingsPageGuideToCPaymentClick();
}}
>
{Locale.Settings.Access.SaasStart.ChatNow}
<Arrow style={{ marginLeft: "4px" }} />
</a>

View File

@@ -21,7 +21,6 @@ import {
} from "./artifacts";
import { useChatStore } from "../store";
import { IconButton } from "./button";
export function Mermaid(props: { code: string }) {
const ref = useRef<HTMLDivElement>(null);
const [hasError, setHasError] = useState(false);

View File

@@ -0,0 +1,7 @@
.select-compress-model {
width: 60%;
select {
max-width: 100%;
white-space: normal;
}
}

View File

@@ -6,7 +6,7 @@ import { InputRange } from "./input-range";
import { ListItem, Select } from "./ui-lib";
import { useAllModels } from "../utils/hooks";
import { groupBy } from "lodash-es";
import styles from "./ui-lib.module.scss";
import styles from "./model-config.module.scss";
export function ModelConfigList(props: {
modelConfig: ModelConfig;
@@ -243,7 +243,7 @@ export function ModelConfigList(props: {
subTitle={Locale.Settings.CompressModel.SubTitle}
>
<Select
className={styles["select-model"]}
className={styles["select-compress-model"]}
aria-label={Locale.Settings.CompressModel.Title}
value={compressModelValue}
onChange={(e) => {

View File

@@ -73,7 +73,7 @@
}
}
.SubTitle-button {
.subtitle-button {
button {
overflow:visible ;
}

View File

@@ -19,7 +19,7 @@ import ConfirmIcon from "../icons/confirm.svg";
import ConnectionIcon from "../icons/connection.svg";
import CloudSuccessIcon from "../icons/cloud-success.svg";
import CloudFailIcon from "../icons/cloud-fail.svg";
import { trackSettingsPageGuideToCPaymentClick } from "../utils/auth-settings-events";
import {
Input,
List,
@@ -690,7 +690,7 @@ export function Settings() {
const saasStartComponent = (
<ListItem
className={styles["SubTitle-button"]}
className={styles["subtitle-button"]}
title={
Locale.Settings.Access.SaasStart.Title +
`${Locale.Settings.Access.SaasStart.Label}`
@@ -706,6 +706,7 @@ export function Settings() {
type={"primary"}
text={Locale.Settings.Access.SaasStart.ChatNow}
onClick={() => {
trackSettingsPageGuideToCPaymentClick();
window.location.href = SAAS_CHAT_URL;
}}
/>

View File

@@ -260,11 +260,9 @@
.select-with-icon-select {
height: 100%;
max-width: 100%;
border: var(--border-in-light);
padding: 10px 35px 10px 10px;
border-radius: 10px;
white-space: normal;
appearance: none;
cursor: pointer;
background-color: var(--white);
@@ -281,15 +279,6 @@
}
}
.select-model {
width: 60%;
.select-with-icon-select {
max-width: 100%;
white-space: normal;
}
}
.modal-input {
height: 100%;
width: 100%;

View File

@@ -2,6 +2,7 @@ import { getClientConfig } from "../config/client";
import { SubmitKey } from "../store/config";
import { SAAS_CHAT_URL } from "@/app/constant";
const SAAS_CHAT_URL_WITH_PARAM = `${SAAS_CHAT_URL}?data=title`;
const isApp = !!getClientConfig()?.isApp;
const cn = {
@@ -9,10 +10,10 @@ const cn = {
Error: {
Unauthorized: isApp
? `😆 对话遇到了一些问题,不用慌:
\\ 1⃣ 想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL})
\\ 1⃣ 想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL_WITH_PARAM})
\\ 2⃣ 如果你想消耗自己的 OpenAI 资源,点击[这里](/#/settings)修改设置 ⚙️`
: `😆 对话遇到了一些问题,不用慌:
\ 1⃣ 想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL})
\ 1⃣ 想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL_WITH_PARAM})
\ 2⃣ 如果你正在使用私有部署版本,点击[这里](/#/auth)输入访问秘钥 🔑
\ 3⃣ 如果你想消耗自己的 OpenAI 资源,点击[这里](/#/settings)修改设置 ⚙️
`,

View File

@@ -0,0 +1,19 @@
import { sendGAEvent } from "@next/third-parties/google";
export function trackConversationGuideToCPaymentClick() {
sendGAEvent("event", "ConversationGuideToCPaymentClick", { value: 1 });
}
export function trackAuthorizationPageButtonToCPaymentClick() {
sendGAEvent("event", "AuthorizationPageButtonToCPaymentClick", { value: 1 });
}
export function trackAuthorizationPageBannerToCPaymentClick() {
sendGAEvent("event", "AuthorizationPageBannerToCPaymentClick", {
value: 1,
});
}
export function trackSettingsPageGuideToCPaymentClick() {
sendGAEvent("event", "SettingsPageGuideToCPaymentClick", { value: 1 });
}