From fa380d8d23344a12bf7328129087f7d4046e69ed Mon Sep 17 00:00:00 2001 From: Redon <790348264@qq.com> Date: Sat, 25 Feb 2023 00:19:13 +0800 Subject: [PATCH] chore: version 2.7.3 (#120) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 用户输入也被渲染的问题 (#117) * fix: 用户输入不转换 * feat: 基础深色模式适配 * feat: 主题模式跟随系统 * feat: 深色适配补漏 * chore: version 2.7.3 --- CHANGELOG.md | 9 + index.html | 6 + package.json | 3 +- pnpm-lock.yaml | 6 - src/App.vue | 9 +- src/components/common/HoverButton/Button.vue | 2 +- src/components/common/Setting/index.vue | 2 +- src/components/custom/GithubSite.vue | 4 +- src/hooks/useTheme.ts | 43 + src/plugins/assets.ts | 5 +- src/store/modules/app/helper.ts | 13 +- src/store/modules/app/index.ts | 11 +- src/styles/global.less | 5 + src/styles/lib/github-markdown.less | 1102 ++++++++++++++++++ src/styles/{global.css => lib/tailwind.css} | 6 - src/views/chat/components/Message/Avatar.vue | 4 +- src/views/chat/components/Message/Text.vue | 12 +- src/views/chat/components/Message/index.vue | 13 +- src/views/chat/components/Message/style.less | 9 + src/views/chat/index.vue | 8 +- src/views/chat/layout/Layout.vue | 4 +- src/views/chat/layout/header/index.vue | 2 +- src/views/chat/layout/sider/Footer.vue | 51 +- src/views/chat/layout/sider/List.vue | 4 +- tailwind.config.js | 3 +- 25 files changed, 1285 insertions(+), 51 deletions(-) create mode 100644 src/hooks/useTheme.ts create mode 100644 src/styles/global.less create mode 100644 src/styles/lib/github-markdown.less rename src/styles/{global.css => lib/tailwind.css} (61%) diff --git a/CHANGELOG.md b/CHANGELOG.md index abd2607b14..e5187123ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## v2.7.3 + +`2023-02-25` + +### Feature +- 适配系统深色模式 [#118](https://github.com/Chanzhaoyu/chatgpt-web/issues/103) +### BugFix +- 修复用户消息能被渲染为 `HTML` 问题 [#117](https://github.com/Chanzhaoyu/chatgpt-web/issues/117) + ## v2.7.2 `2023-02-24` diff --git a/index.html b/index.html index 897ff1e78e..5daed11fdd 100644 --- a/index.html +++ b/index.html @@ -61,6 +61,12 @@ transform: translateX(100%); } } + + @media (prefers-color-scheme: dark) { + body { + background: #121212; + } + }
diff --git a/package.json b/package.json index 653409fb75..5ec8aba8e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chatgpt-web", - "version": "2.7.2", + "version": "2.7.3", "private": false, "description": "ChatGPT Web", "author": "ChenZhaoYu ", @@ -24,7 +24,6 @@ }, "dependencies": { "@vueuse/core": "^9.13.0", - "github-markdown-css": "^5.2.0", "highlight.js": "^11.7.0", "marked": "^4.2.12", "naive-ui": "^2.34.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 752d1e7a6e..f9191da7a1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,7 +15,6 @@ specifiers: axios: ^1.3.3 crypto-js: ^4.1.1 eslint: ^8.34.0 - github-markdown-css: ^5.2.0 highlight.js: ^11.7.0 husky: ^8.0.3 less: ^4.1.3 @@ -35,7 +34,6 @@ specifiers: dependencies: '@vueuse/core': 9.13.0_vue@3.2.47 - github-markdown-css: 5.2.0 highlight.js: 11.7.0 marked: 4.2.12 naive-ui: 2.34.3_vue@3.2.47 @@ -2526,10 +2524,6 @@ packages: through2: 4.0.2 dev: true - /github-markdown-css/5.2.0: - resolution: {integrity: sha512-hq5RaCInSUZ48bImOZpkppW2/MT44StRgsbsZ8YA4vJFwLKB/Vo3k7R2t+pUGqO+ThG0QDMi96TewV/B3vyItg==} - dev: false - /glob-parent/5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} diff --git a/src/App.vue b/src/App.vue index 729fdb99ea..88520c0884 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,17 @@