mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2026-04-28 05:54:24 +08:00
Compare commits
6 Commits
fe4cba8baf
...
add_tip
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5ac2386d8 | ||
|
|
e83f61e74d | ||
|
|
10d472e79e | ||
|
|
a6b920d9af | ||
|
|
77f037a3c4 | ||
|
|
248d27680d |
@@ -13,7 +13,10 @@ import BotIcon from "../icons/bot.svg";
|
|||||||
import { getClientConfig } from "../config/client";
|
import { getClientConfig } from "../config/client";
|
||||||
import LeftIcon from "@/app/icons/left.svg";
|
import LeftIcon from "@/app/icons/left.svg";
|
||||||
import { safeLocalStorage } from "@/app/utils";
|
import { safeLocalStorage } from "@/app/utils";
|
||||||
|
import {
|
||||||
|
trackSettingsPageGuideToCPaymentClick,
|
||||||
|
trackAuthorizationPageButtonToCPaymentClick,
|
||||||
|
} from "../utils/auth-settings-events";
|
||||||
const storage = safeLocalStorage();
|
const storage = safeLocalStorage();
|
||||||
|
|
||||||
export function AuthPage() {
|
export function AuthPage() {
|
||||||
@@ -22,6 +25,7 @@ export function AuthPage() {
|
|||||||
const goHome = () => navigate(Path.Home);
|
const goHome = () => navigate(Path.Home);
|
||||||
const goChat = () => navigate(Path.Chat);
|
const goChat = () => navigate(Path.Chat);
|
||||||
const goSaas = () => {
|
const goSaas = () => {
|
||||||
|
trackAuthorizationPageButtonToCPaymentClick();
|
||||||
window.location.href = SAAS_CHAT_URL;
|
window.location.href = SAAS_CHAT_URL;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -151,11 +155,17 @@ function TopBanner() {
|
|||||||
onMouseEnter={handleMouseEnter}
|
onMouseEnter={handleMouseEnter}
|
||||||
onMouseLeave={handleMouseLeave}
|
onMouseLeave={handleMouseLeave}
|
||||||
>
|
>
|
||||||
<div className={styles["top-banner-inner"]}>
|
<div className={`${styles["top-banner-inner"]} no-dark`}>
|
||||||
<Logo className={styles["top-banner-logo"]}></Logo>
|
<Logo className={styles["top-banner-logo"]}></Logo>
|
||||||
<span>
|
<span>
|
||||||
{Locale.Auth.TopTips}
|
{Locale.Auth.TopTips}
|
||||||
<a href={SAAS_CHAT_URL} rel="stylesheet">
|
<a
|
||||||
|
href={SAAS_CHAT_URL}
|
||||||
|
rel="stylesheet"
|
||||||
|
onClick={() => {
|
||||||
|
trackSettingsPageGuideToCPaymentClick();
|
||||||
|
}}
|
||||||
|
>
|
||||||
{Locale.Settings.Access.SaasStart.ChatNow}
|
{Locale.Settings.Access.SaasStart.ChatNow}
|
||||||
<Arrow style={{ marginLeft: "4px" }} />
|
<Arrow style={{ marginLeft: "4px" }} />
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import {
|
|||||||
} from "./artifacts";
|
} from "./artifacts";
|
||||||
import { useChatStore } from "../store";
|
import { useChatStore } from "../store";
|
||||||
import { IconButton } from "./button";
|
import { IconButton } from "./button";
|
||||||
|
|
||||||
export function Mermaid(props: { code: string }) {
|
export function Mermaid(props: { code: string }) {
|
||||||
const ref = useRef<HTMLDivElement>(null);
|
const ref = useRef<HTMLDivElement>(null);
|
||||||
const [hasError, setHasError] = useState(false);
|
const [hasError, setHasError] = useState(false);
|
||||||
|
|||||||
7
app/components/model-config.module.scss
Normal file
7
app/components/model-config.module.scss
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.select-compress-model {
|
||||||
|
width: 60%;
|
||||||
|
select {
|
||||||
|
max-width: 100%;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ import { InputRange } from "./input-range";
|
|||||||
import { ListItem, Select } from "./ui-lib";
|
import { ListItem, Select } from "./ui-lib";
|
||||||
import { useAllModels } from "../utils/hooks";
|
import { useAllModels } from "../utils/hooks";
|
||||||
import { groupBy } from "lodash-es";
|
import { groupBy } from "lodash-es";
|
||||||
import styles from "./ui-lib.module.scss";
|
import styles from "./model-config.module.scss";
|
||||||
|
|
||||||
export function ModelConfigList(props: {
|
export function ModelConfigList(props: {
|
||||||
modelConfig: ModelConfig;
|
modelConfig: ModelConfig;
|
||||||
@@ -243,7 +243,7 @@ export function ModelConfigList(props: {
|
|||||||
subTitle={Locale.Settings.CompressModel.SubTitle}
|
subTitle={Locale.Settings.CompressModel.SubTitle}
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
className={styles["select-model"]}
|
className={styles["select-compress-model"]}
|
||||||
aria-label={Locale.Settings.CompressModel.Title}
|
aria-label={Locale.Settings.CompressModel.Title}
|
||||||
value={compressModelValue}
|
value={compressModelValue}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.SubTitle-button {
|
.subtitle-button {
|
||||||
button {
|
button {
|
||||||
overflow:visible ;
|
overflow:visible ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import ConfirmIcon from "../icons/confirm.svg";
|
|||||||
import ConnectionIcon from "../icons/connection.svg";
|
import ConnectionIcon from "../icons/connection.svg";
|
||||||
import CloudSuccessIcon from "../icons/cloud-success.svg";
|
import CloudSuccessIcon from "../icons/cloud-success.svg";
|
||||||
import CloudFailIcon from "../icons/cloud-fail.svg";
|
import CloudFailIcon from "../icons/cloud-fail.svg";
|
||||||
|
import { trackSettingsPageGuideToCPaymentClick } from "../utils/auth-settings-events";
|
||||||
import {
|
import {
|
||||||
Input,
|
Input,
|
||||||
List,
|
List,
|
||||||
@@ -690,7 +690,7 @@ export function Settings() {
|
|||||||
|
|
||||||
const saasStartComponent = (
|
const saasStartComponent = (
|
||||||
<ListItem
|
<ListItem
|
||||||
className={styles["SubTitle-button"]}
|
className={styles["subtitle-button"]}
|
||||||
title={
|
title={
|
||||||
Locale.Settings.Access.SaasStart.Title +
|
Locale.Settings.Access.SaasStart.Title +
|
||||||
`${Locale.Settings.Access.SaasStart.Label}`
|
`${Locale.Settings.Access.SaasStart.Label}`
|
||||||
@@ -706,6 +706,7 @@ export function Settings() {
|
|||||||
type={"primary"}
|
type={"primary"}
|
||||||
text={Locale.Settings.Access.SaasStart.ChatNow}
|
text={Locale.Settings.Access.SaasStart.ChatNow}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
trackSettingsPageGuideToCPaymentClick();
|
||||||
window.location.href = SAAS_CHAT_URL;
|
window.location.href = SAAS_CHAT_URL;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -260,11 +260,9 @@
|
|||||||
|
|
||||||
.select-with-icon-select {
|
.select-with-icon-select {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
max-width: 100%;
|
|
||||||
border: var(--border-in-light);
|
border: var(--border-in-light);
|
||||||
padding: 10px 35px 10px 10px;
|
padding: 10px 35px 10px 10px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
white-space: normal;
|
|
||||||
appearance: none;
|
appearance: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: var(--white);
|
background-color: var(--white);
|
||||||
@@ -281,15 +279,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-model {
|
|
||||||
width: 60%;
|
|
||||||
.select-with-icon-select {
|
|
||||||
max-width: 100%;
|
|
||||||
white-space: normal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.modal-input {
|
.modal-input {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { getClientConfig } from "../config/client";
|
|||||||
import { SubmitKey } from "../store/config";
|
import { SubmitKey } from "../store/config";
|
||||||
import { SAAS_CHAT_URL } from "@/app/constant";
|
import { SAAS_CHAT_URL } from "@/app/constant";
|
||||||
|
|
||||||
|
const SAAS_CHAT_URL_WITH_PARAM = `${SAAS_CHAT_URL}?data=title`;
|
||||||
const isApp = !!getClientConfig()?.isApp;
|
const isApp = !!getClientConfig()?.isApp;
|
||||||
|
|
||||||
const cn = {
|
const cn = {
|
||||||
@@ -9,10 +10,10 @@ const cn = {
|
|||||||
Error: {
|
Error: {
|
||||||
Unauthorized: isApp
|
Unauthorized: isApp
|
||||||
? `😆 对话遇到了一些问题,不用慌:
|
? `😆 对话遇到了一些问题,不用慌:
|
||||||
\\ 1️⃣ 想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL})
|
\\ 1️⃣ 想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL_WITH_PARAM})
|
||||||
\\ 2️⃣ 如果你想消耗自己的 OpenAI 资源,点击[这里](/#/settings)修改设置 ⚙️`
|
\\ 2️⃣ 如果你想消耗自己的 OpenAI 资源,点击[这里](/#/settings)修改设置 ⚙️`
|
||||||
: `😆 对话遇到了一些问题,不用慌:
|
: `😆 对话遇到了一些问题,不用慌:
|
||||||
\ 1️⃣ 想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL})
|
\ 1️⃣ 想要零配置开箱即用,[点击这里立刻开启对话 🚀](${SAAS_CHAT_URL_WITH_PARAM})
|
||||||
\ 2️⃣ 如果你正在使用私有部署版本,点击[这里](/#/auth)输入访问秘钥 🔑
|
\ 2️⃣ 如果你正在使用私有部署版本,点击[这里](/#/auth)输入访问秘钥 🔑
|
||||||
\ 3️⃣ 如果你想消耗自己的 OpenAI 资源,点击[这里](/#/settings)修改设置 ⚙️
|
\ 3️⃣ 如果你想消耗自己的 OpenAI 资源,点击[这里](/#/settings)修改设置 ⚙️
|
||||||
`,
|
`,
|
||||||
|
|||||||
19
app/utils/auth-settings-events.ts
Normal file
19
app/utils/auth-settings-events.ts
Normal 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 });
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user