-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(site): refactor the implementation mode of switch dark theme #2995
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0fe2122
fix(site): remove switch theme button
shenjunjian bf6472a
fix(site): fix some wrong colors
shenjunjian 1799218
fix(site): add { allowDarkTheme:true } to TDCommon
shenjunjian 3677496
fix(site): add mock button for switch theme
shenjunjian af9383c
fix(site): fix reviews
shenjunjian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
16 changes: 2 additions & 14 deletions
16
examples/sites/src/assets/images/leftMenu/directives-custom-instruction.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,6 @@ | |
<div class="main-layout ti-hp100 ti-f-c ti-f-box-stretch"> | ||
<div class="content-layout ti-fi-1" :has-sider="!isFrame"> | ||
<div id="layoutSider" class="layout-sider" :class="{ 'saas-border': templateModeState.isSaas }" v-if="!isFrame"> | ||
<div style="padding: 10px 0; text-align: center"> | ||
<tiny-button :reset-time="0" type="info" @click="toggleDark()">{{ isDark ? 'dark' : 'light' }}</tiny-button> | ||
</div> | ||
<tiny-tree-menu | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 移除了切换主题按钮的代码,这意味着用户将无法通过UI切换主题。确保这是预期的行为,并且在文档中有说明如何手动切换主题。 |
||
ref="treeMenuRef" | ||
class="main-menu" | ||
|
@@ -68,7 +65,6 @@ import { getWord, i18nByKey, appData, appFn, useApiMode, useTemplateMode } from | |
import useTheme from '@/tools/useTheme' | ||
import FloatSettings from '@/views/components-doc/components/float-settings.vue' | ||
import VersionTip from '@/views/components-doc/components/version-tip.vue' | ||
import { useDark, useToggle } from '@vueuse/core' | ||
|
||
export default defineComponent({ | ||
name: 'LayoutVue', | ||
|
@@ -107,8 +103,6 @@ export default defineComponent({ | |
const getTo = (route, key) => `${import.meta.env.VITE_CONTEXT}${allPath}${lang}/${theme}/${route}${key}` | ||
|
||
const isThemeSaas = import.meta.env.VITE_TINY_THEME === 'saas' | ||
const isDark = useDark() | ||
const toggleDark = useToggle(isDark) | ||
|
||
const changeLanguage = () => { | ||
appFn.toggleLang() | ||
|
@@ -197,8 +191,6 @@ export default defineComponent({ | |
getWord, | ||
i18nByKey, | ||
isThemeSaas, | ||
isDark, | ||
toggleDark, | ||
isShowFilter | ||
} | ||
} | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这行代码注释的原因是什么,如果没有了就直接删除
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已删除