forked from Chanzhaoyu/chatgpt-web
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: version 2.7.3 (Chanzhaoyu#120)
* fix: 用户输入也被渲染的问题 (Chanzhaoyu#117) * fix: 用户输入不转换 * feat: 基础深色模式适配 * feat: 主题模式跟随系统 * feat: 深色适配补漏 * chore: version 2.7.3
- Loading branch information
1 parent
32949d5
commit fa380d8
Showing
25 changed files
with
1,285 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "chatgpt-web", | ||
"version": "2.7.2", | ||
"version": "2.7.3", | ||
"private": false, | ||
"description": "ChatGPT Web", | ||
"author": "ChenZhaoYu <[email protected]>", | ||
|
@@ -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", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import type { GlobalThemeOverrides } from 'naive-ui' | ||
import { computed, watch } from 'vue' | ||
import { darkTheme, useOsTheme } from 'naive-ui' | ||
import { useAppStore } from '@/store' | ||
|
||
export function useTheme() { | ||
const appStore = useAppStore() | ||
|
||
const OsTheme = useOsTheme() | ||
|
||
const isDark = computed(() => { | ||
if (appStore.theme === 'auto') | ||
return OsTheme.value === 'dark' | ||
else | ||
return appStore.theme === 'dark' | ||
}) | ||
|
||
const theme = computed(() => { | ||
return isDark.value ? darkTheme : undefined | ||
}) | ||
|
||
const themeOverrides = computed<GlobalThemeOverrides>(() => { | ||
if (isDark.value) { | ||
return { | ||
common: {}, | ||
} | ||
} | ||
return {} | ||
}) | ||
|
||
watch( | ||
() => isDark.value, | ||
(dark) => { | ||
if (dark) | ||
document.documentElement.classList.add('dark') | ||
else | ||
document.documentElement.classList.remove('dark') | ||
}, | ||
{ immediate: true }, | ||
) | ||
|
||
return { theme, themeOverrides } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
html, | ||
body, | ||
#app { | ||
height: 100%; | ||
} |
Oops, something went wrong.