mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 03:26:38 +08:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
caa05a1a90
@ -120,11 +120,23 @@ function useSwitchTheme() {
|
|||||||
document.body.classList.add("light");
|
document.body.classList.add("light");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const metaDescriptionDark = document.querySelector(
|
||||||
|
'meta[name="theme-color"][media]',
|
||||||
|
);
|
||||||
|
const metaDescriptionLight = document.querySelector(
|
||||||
|
'meta[name="theme-color"]:not([media])',
|
||||||
|
);
|
||||||
|
|
||||||
|
if (config.theme === "auto") {
|
||||||
|
metaDescriptionDark?.setAttribute("content", "#151515");
|
||||||
|
metaDescriptionLight?.setAttribute("content", "#fafafa");
|
||||||
|
} else {
|
||||||
const themeColor = getComputedStyle(document.body)
|
const themeColor = getComputedStyle(document.body)
|
||||||
.getPropertyValue("--theme-color")
|
.getPropertyValue("--theme-color")
|
||||||
.trim();
|
.trim();
|
||||||
const metaDescription = document.querySelector('meta[name="theme-color"]');
|
metaDescriptionDark?.setAttribute("content", themeColor);
|
||||||
metaDescription?.setAttribute("content", themeColor);
|
metaDescriptionLight?.setAttribute("content", themeColor);
|
||||||
|
}
|
||||||
}, [config.theme]);
|
}, [config.theme]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ export const metadata = {
|
|||||||
description: "Your personal ChatGPT Chat Bot.",
|
description: "Your personal ChatGPT Chat Bot.",
|
||||||
appleWebApp: {
|
appleWebApp: {
|
||||||
title: "ChatGPT Next Web",
|
title: "ChatGPT Next Web",
|
||||||
statusBarStyle: "black-translucent",
|
statusBarStyle: "default",
|
||||||
},
|
},
|
||||||
themeColor: "#fafafa",
|
themeColor: "#fafafa",
|
||||||
};
|
};
|
||||||
@ -53,6 +53,11 @@ export default function RootLayout({
|
|||||||
name="viewport"
|
name="viewport"
|
||||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
|
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
|
||||||
/>
|
/>
|
||||||
|
<meta
|
||||||
|
name="theme-color"
|
||||||
|
content="#151515"
|
||||||
|
media="(prefers-color-scheme: dark)"
|
||||||
|
/>
|
||||||
<Meta />
|
<Meta />
|
||||||
<link rel="manifest" href="/site.webmanifest"></link>
|
<link rel="manifest" href="/site.webmanifest"></link>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com"></link>
|
<link rel="preconnect" href="https://fonts.googleapis.com"></link>
|
||||||
|
@ -3,7 +3,7 @@ import { SubmitKey } from "../store/app";
|
|||||||
const cn = {
|
const cn = {
|
||||||
WIP: "该功能仍在开发中……",
|
WIP: "该功能仍在开发中……",
|
||||||
Error: {
|
Error: {
|
||||||
Unauthorized: "现在是未授权状态,请在设置页填写授权码。",
|
Unauthorized: "现在是未授权状态,请在设置页输入授权码。",
|
||||||
},
|
},
|
||||||
ChatItem: {
|
ChatItem: {
|
||||||
ChatItemCount: (count: number) => `${count} 条对话`,
|
ChatItemCount: (count: number) => `${count} 条对话`,
|
||||||
@ -99,7 +99,7 @@ const cn = {
|
|||||||
},
|
},
|
||||||
Token: {
|
Token: {
|
||||||
Title: "API Key",
|
Title: "API Key",
|
||||||
SubTitle: "使用自己的 Key 可绕过受控访问限制",
|
SubTitle: "使用自己的 Key 可绕过授权访问限制",
|
||||||
Placeholder: "OpenAI API Key",
|
Placeholder: "OpenAI API Key",
|
||||||
},
|
},
|
||||||
Usage: {
|
Usage: {
|
||||||
@ -112,9 +112,9 @@ const cn = {
|
|||||||
NoAccess: "输入API Key查看余额",
|
NoAccess: "输入API Key查看余额",
|
||||||
},
|
},
|
||||||
AccessCode: {
|
AccessCode: {
|
||||||
Title: "访问码",
|
Title: "授权码",
|
||||||
SubTitle: "现在是受控访问状态",
|
SubTitle: "现在是未授权访问状态",
|
||||||
Placeholder: "请输入访问码",
|
Placeholder: "请输入授权码",
|
||||||
},
|
},
|
||||||
Model: "模型 (model)",
|
Model: "模型 (model)",
|
||||||
Temperature: {
|
Temperature: {
|
||||||
|
@ -4,7 +4,7 @@ import type { LocaleType } from "./index";
|
|||||||
const tw: LocaleType = {
|
const tw: LocaleType = {
|
||||||
WIP: "該功能仍在開發中……",
|
WIP: "該功能仍在開發中……",
|
||||||
Error: {
|
Error: {
|
||||||
Unauthorized: "目前您的狀態是未授權,請前往設定頁面填寫授權碼。",
|
Unauthorized: "目前您的狀態是未授權,請前往設定頁面輸入授權碼。",
|
||||||
},
|
},
|
||||||
ChatItem: {
|
ChatItem: {
|
||||||
ChatItemCount: (count: number) => `${count} 條對話`,
|
ChatItemCount: (count: number) => `${count} 條對話`,
|
||||||
@ -99,7 +99,7 @@ const tw: LocaleType = {
|
|||||||
},
|
},
|
||||||
Token: {
|
Token: {
|
||||||
Title: "API Key",
|
Title: "API Key",
|
||||||
SubTitle: "使用自己的 Key 可規避受控訪問限制",
|
SubTitle: "使用自己的 Key 可規避授權訪問限制",
|
||||||
Placeholder: "OpenAI API Key",
|
Placeholder: "OpenAI API Key",
|
||||||
},
|
},
|
||||||
Usage: {
|
Usage: {
|
||||||
@ -112,9 +112,9 @@ const tw: LocaleType = {
|
|||||||
NoAccess: "輸入API Key查看餘額",
|
NoAccess: "輸入API Key查看餘額",
|
||||||
},
|
},
|
||||||
AccessCode: {
|
AccessCode: {
|
||||||
Title: "訪問碼",
|
Title: "授權碼",
|
||||||
SubTitle: "現在是受控訪問狀態",
|
SubTitle: "現在是未授權訪問狀態",
|
||||||
Placeholder: "請輸入訪問碼",
|
Placeholder: "請輸入授權碼",
|
||||||
},
|
},
|
||||||
Model: "模型 (model)",
|
Model: "模型 (model)",
|
||||||
Temperature: {
|
Temperature: {
|
||||||
|
Loading…
Reference in New Issue
Block a user