From 3bf56272c92ff35788ffbe2de4da8d8f27b98dbf Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Mon, 3 Apr 2023 22:28:19 +0800 Subject: [PATCH] fix: useless code removed --- app/components/home.tsx | 8 ++++---- app/layout.tsx | 4 ++-- app/store/app.ts | 6 +++--- public/site.webmanifest | 39 +++++++++++++++++++-------------------- 4 files changed, 28 insertions(+), 29 deletions(-) diff --git a/app/components/home.tsx b/app/components/home.tsx index 04703eea6..a7d9953e2 100644 --- a/app/components/home.tsx +++ b/app/components/home.tsx @@ -8,7 +8,7 @@ import { IconButton } from "./button"; import styles from "./home.module.scss"; import SettingsIcon from "../icons/settings.svg"; -import GithubIcon from "../icons/github.svg"; +// import GithubIcon from "../icons/github.svg"; import ChatGptIcon from "../icons/chatgpt.svg"; import BotIcon from "../icons/bot.svg"; @@ -23,7 +23,7 @@ import { ChatList } from "./chat-list"; import { Chat } from "./chat"; import dynamic from "next/dynamic"; -import { REPO_URL } from "../constant"; +// import { REPO_URL } from "../constant"; import { ErrorBoundary } from "./error"; export function Loading(props: { noLogo?: boolean }) { @@ -46,9 +46,9 @@ function useSwitchTheme() { document.body.classList.remove("light"); document.body.classList.remove("dark"); - if (config.theme === "dark") { + if (config.theme === "Dark") { document.body.classList.add("dark"); - } else if (config.theme === "light") { + } else if (config.theme === "Light") { document.body.classList.add("light"); } diff --git a/app/layout.tsx b/app/layout.tsx index 6b6999f83..f8ac8cb60 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -17,10 +17,10 @@ try { } export const metadata = { - title: "ChatGPT Next Web", + title: "ChatGPT Next", description: "Your personal ChatGPT Chat Bot.", appleWebApp: { - title: "ChatGPT Next Web", + title: "ChatGPT Next", statusBarStyle: "black-translucent", }, themeColor: "#fafafa", diff --git a/app/store/app.ts b/app/store/app.ts index b943c0d97..4a13fc394 100644 --- a/app/store/app.ts +++ b/app/store/app.ts @@ -26,9 +26,9 @@ export enum SubmitKey { } export enum Theme { - Auto = "auto", - Dark = "dark", - Light = "light", + Auto = "Auto", + Dark = "Dark", + Light = "Light", } export interface ChatConfig { diff --git a/public/site.webmanifest b/public/site.webmanifest index 117f33b86..7a1d296da 100644 --- a/public/site.webmanifest +++ b/public/site.webmanifest @@ -1,21 +1,20 @@ { - "name": "ChatGPT Next Web", - "short_name": "ChatGPT", - "icons": [ - { - "src": "/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "start_url": "/", - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" - } - \ No newline at end of file + "name": "ChatGPT Next", + "short_name": "ChatGPT", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "start_url": "/", + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +}