feat(theme): 移除首页主题切换按钮,恢复默认深色主题 ClassicDark
- 首页 index.vue:删除主题切换按钮 DOM、useTheme 引入及 handleToggleTheme 处理函数 - nuxt.config.ts:defaultTheme ClassicLight → ClassicDark;enabledThemes 恢复为 4 主题(System/ClassicDark/ClassicLight/ModernLight);x-default-theme meta 和防闪烁脚本回退值同步改为 ClassicDark - schema.ts / system-settings-defaults / site-config API / POST API / useSiteConfig:7 处主题默认配置全部从 ClassicLight/双浅色列表 同步改为 ClassicDark/四主题完整列表
This commit is contained in:
@@ -62,8 +62,8 @@ export const useSiteConfig = () => {
|
||||
enableReplayRequests: false,
|
||||
enableCollaborativeSubmission: true,
|
||||
enableSubmissionRemarks: false,
|
||||
defaultTheme: 'ClassicLight',
|
||||
enabledThemes: '["ClassicLight","ModernLight"]',
|
||||
defaultTheme: 'ClassicDark',
|
||||
enabledThemes: '["System","ClassicDark","ClassicLight","ModernLight"]',
|
||||
statisticsCode: '',
|
||||
statisticsCodeEnabled: false
|
||||
}
|
||||
|
||||
@@ -350,8 +350,8 @@ export const systemSettings = pgTable('SystemSettings', {
|
||||
autoBackupConfig: text('autoBackupConfig'),
|
||||
statisticsCode: text('statisticsCode'),
|
||||
statisticsCodeEnabled: boolean('statisticsCodeEnabled').default(false).notNull(),
|
||||
defaultTheme: text('defaultTheme').default('ClassicLight').notNull(),
|
||||
enabledThemes: text('enabledThemes').default('[\"ClassicLight\",\"ModernLight\"]').notNull(),
|
||||
defaultTheme: text('defaultTheme').default('ClassicDark').notNull(),
|
||||
enabledThemes: text('enabledThemes').default('[\"System\",\"ClassicDark\",\"ClassicLight\",\"ModernLight\"]').notNull(),
|
||||
enabledPlatforms: text('enabledPlatforms'),
|
||||
platformOrder: text('platformOrder'),
|
||||
});
|
||||
|
||||
@@ -33,18 +33,6 @@
|
||||
<!-- 用户信息区域 -->
|
||||
<div class="user-section">
|
||||
<ClientOnly>
|
||||
<!-- 主题切换按钮 -->
|
||||
<button
|
||||
class="utility-btn theme-toggle-btn"
|
||||
type="button"
|
||||
aria-label="主题"
|
||||
title="切换主题"
|
||||
@click="handleToggleTheme"
|
||||
>
|
||||
<Icon :name="isDark ? 'sun' : 'moon'" :size="18" />
|
||||
<span class="utility-btn-label">主题</span>
|
||||
</button>
|
||||
|
||||
<div v-if="isClientAuthenticated" class="user-info">
|
||||
<div class="user-details-desktop">
|
||||
<span class="user-name">{{ user?.name || '用户' }}</span>
|
||||
@@ -686,19 +674,12 @@ import ConfirmDialog from '~/components/UI/ConfirmDialog.vue'
|
||||
|
||||
import { useNotifications } from '~/composables/useNotifications'
|
||||
import { useSiteConfig } from '~/composables/useSiteConfig'
|
||||
import { useTheme } from '~/composables/useTheme'
|
||||
import CustomSelect from '~/components/UI/Common/CustomSelect.vue'
|
||||
|
||||
// 获取运行时配置
|
||||
const config = useRuntimeConfig()
|
||||
const router = useRouter()
|
||||
|
||||
// 主题
|
||||
const { isDark, toggleTheme } = useTheme()
|
||||
const handleToggleTheme = () => {
|
||||
toggleTheme()
|
||||
}
|
||||
|
||||
// 站点配置
|
||||
const {
|
||||
siteTitle,
|
||||
|
||||
Reference in New Issue
Block a user