feat(front): 前台默认浅色模式并新增居中投稿按钮与实时空闲档期

- 主题: useTheme 默认 ModernLight + variables.css SSR-safe 浅值并精修组件对比度
- 首页: 插入居中投稿 CTA + 紧邻档期概览卡片(今日排期/待播歌曲/空闲档期数)
- 数据: useSongs 新增 fetchExpectedPlayDates 接入空闲档期并走 revision 轮询实时刷新
- 视觉: 移动端优先,少圆角硬边几何 + 概览卡片 3→1 列响应式
This commit is contained in:
2026-09-13 19:32:27 +08:00
parent f80abe659f
commit 92704d6637
9 changed files with 1836 additions and 1463 deletions
+7 -3
View File
@@ -99,13 +99,16 @@ export function useTheme() {
const defaultTheme = computed<string>(() => {
if (siteConfigLoaded.value && siteDefaultTheme.value) {
return siteDefaultTheme.value
const v = siteDefaultTheme.value
if (v === 'System' || v === 'dark' || v.endsWith('Dark')) return 'ModernLight'
return v
}
const fromRuntime = config.public?.defaultTheme
if (typeof fromRuntime === 'string' && fromRuntime) {
if (fromRuntime === 'System' || fromRuntime === 'dark' || fromRuntime.endsWith('Dark')) return 'ModernLight'
return fromRuntime
}
return 'System'
return 'ModernLight'
})
const theme = computed<string>({
@@ -193,7 +196,8 @@ export function useTheme() {
if (stored) {
const valid = firstValidTheme(stored)
if (valid === stored || enabledThemes.value.includes(stored)) {
const effectiveStored = resolveEffectiveTheme(valid) as string
if ((valid === stored || enabledThemes.value.includes(stored)) && effectiveStored !== 'dark') {
setTheme(stored)
watchSystemTheme()
return