77 >
88 <!-- PPT 风格:单张卡片占据全页面,鼠标滚轮切换 -->
99 <WrappedDeckBackground />
10- <!-- CRT 叠加层仅用于“像素屏”类主题,Win98 等桌面 GUI 主题不应开启 -->
11- <WrappedCRTOverlay v-if =" theme === ' gameboy' " />
1210
13- <!-- 左上角:刷新 + 复古模式开关 -->
11+ <!-- 左上角:返回 + 刷新 -->
1412 <div class =" absolute top-6 left-6 z-20 select-none" >
1513 <div class =" flex items-center gap-3" >
1614 <button
5957 </svg >
6058 </button >
6159
62- <button
63- type =" button"
64- class =" pointer-events-auto inline-flex items-center justify-center w-9 h-9 rounded-full bg-transparent transition disabled:opacity-60 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-[#07C160]/30"
65- :class =" isRetro ? 'text-[#07C160] hover:bg-[#07C160]/10' : 'text-[#00000055] hover:bg-[#000000]/5'"
66- :aria-pressed =" isRetro ? 'true' : 'false'"
67- :aria-label =" `复古模式(当前:${theme === 'off' ? 'Modern' : theme.toUpperCase()})`"
68- :title =" `复古模式:${theme === 'off' ? 'Modern' : theme.toUpperCase()}(点击切换)`"
69- @click =" cycleTheme"
70- >
71- <img
72- src =" /assets/images/wechat-audio-dark.png"
73- class =" w-4 h-4 transition"
74- :style =" { filter: isRetro ? 'none' : 'grayscale(1)', opacity: isRetro ? '1' : '0.55' }"
75- alt =" "
76- aria-hidden =" true"
77- draggable =" false"
78- />
79- </button >
8060 </div >
8161
8262 <div v-if =" error" class =" mt-2 pointer-events-auto bg-white/90 backdrop-blur rounded-xl border border-red-200 px-3 py-2" >
205185 </section >
206186 </div >
207187
208- <!-- Win98:底部任务栏 -->
209- <WrappedWin98Taskbar
210- v-if =" theme === ' win98' "
211- :title =" taskbarTitle "
212- />
213188 </div >
214189</template >
215190
@@ -229,8 +204,8 @@ const year = ref(Number(route.query?.year) || new Date().getFullYear())
229204// 分享视图不展示账号信息:默认让后端自动选择;需要指定时可用 query ?account=wxid_xxx
230205const account = ref (typeof route .query ? .account === ' string' ? route .query .account : ' ' )
231206
232- // 主题管理:modern / gameboy / win98
233- const { theme , cycleTheme , isRetro , themeClass } = useWrappedTheme ()
207+ // 主题:仅保留 Modern
208+ const { isRetro , themeClass } = useWrappedTheme ()
234209
235210 const accounts = ref ([])
236211 const accountsLoading = ref (true )
@@ -262,29 +237,14 @@ const wheelAcc = ref(0)
262237let navUnlockTimer = null
263238let deckResizeObserver = null
264239
265- // 各主题的背景颜色
266- const THEME_BG = {
267- off: ' #F3FFF8' , // Modern: 浅绿
268- gameboy: ' #9bbc0f' , // Game Boy: 亮绿
269- win98: ' #008080' // Win98: 经典桌面青色
270- }
271-
272240const slides = computed (() => {
273241 const cards = Array .isArray (report .value ? .cards ) ? report .value .cards : []
274242 const out = [{ key: ' cover' }]
275243 for (const c of cards) out .push ({ key: ` card-${ c? .id ?? out .length }` })
276244 return out
277245})
278246
279- const taskbarTitle = computed(() => {
280- if (theme.value !== 'win98') return ''
281- if (activeIndex.value === 0) return ` ${year .value } WeChat Wrapped`
282- const idx = activeIndex.value - 1
283- const c = report.value?.cards?.[idx]
284- return String(c?.title || 'WeChat Wrapped')
285- })
286-
287- const currentBg = computed(() => THEME_BG[theme.value] || THEME_BG.off)
247+ const currentBg = computed(() => '#F3FFF8')
288248const deckTrackClass = computed(() => 'z-10')
289249
290250const applyViewportBg = () => {
@@ -423,11 +383,8 @@ const onTouchEnd = (e) => {
423383const updateViewport = () => {
424384 const h = Math.round(deckEl.value?.getBoundingClientRect?.().height || deckEl.value?.clientHeight || window.innerHeight || 0)
425385 if (!h) return
426- // Reserve space for the Win98 taskbar at the bottom.
427- const offset = theme.value === 'win98' ? 40 : 0
428- const effective = Math.max(0, h - offset)
429386 // Avoid endless reflows from 1px rounding errors (especially in Electron).
430- if (Math.abs(viewportHeight.value - effective ) > 1) viewportHeight.value = effective
387+ if (Math.abs(viewportHeight.value - h ) > 1) viewportHeight.value = h
431388}
432389
433390const loadAccounts = async () => {
@@ -592,12 +549,6 @@ onMounted(async () => {
592549 }
593550})
594551
595- // Theme switch may change reserved UI space (e.g., Win98 taskbar)
596- watch(theme, () => {
597- applyViewportBg()
598- updateViewport()
599- })
600-
601552onBeforeUnmount(() => {
602553 if (import.meta.client) {
603554 document.documentElement.style.backgroundColor = ''
0 commit comments