From c68e4fffebf6788447be74b0f52f826bec906f35 Mon Sep 17 00:00:00 2001 From: 2977094657 <2977094657@qq.com> Date: Wed, 18 Feb 2026 19:11:47 +0800 Subject: [PATCH] =?UTF-8?q?improvement(wrapped):=20=E5=B9=B4=E5=BA=A6?= =?UTF-8?q?=E6=80=BB=E7=BB=93=E4=BB=85=E4=BF=9D=E7=95=99=20Modern=20?= =?UTF-8?q?=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除复古主题切换入口(控制面板/左上角按钮)与 Win98/CRT 相关 UI - 简化 useWrappedTheme:仅保留 off(Modern),历史主题值自动回退 - Modern 下也展示 LuckyBlock 占位图,并同步更新 README 说明 --- README.md | 16 +-- .../wrapped/cards/Card03ReplySpeed.vue | 3 +- .../wrapped/shared/WrappedControls.vue | 71 ------------- frontend/composables/useWrappedTheme.js | 100 ++---------------- frontend/pages/wrapped/index.vue | 59 +---------- 5 files changed, 22 insertions(+), 227 deletions(-) diff --git a/README.md b/README.md index a577ea2..002d712 100644 --- a/README.md +++ b/README.md @@ -65,26 +65,18 @@ ## 年度总结 -年度总结现在支持 3 种不同风格(style1、style2、style3)。如果你对某个风格有更好的修改建议,或有新风格的点子,欢迎到 Issue 区反馈:https://github.com/LifeArchiveProject/WeChatDataAnalysis/issues +年度总结目前只保留「现代(Modern)」风格。如果你对年度总结有更好的修改建议,欢迎到 Issue 区反馈:https://github.com/LifeArchiveProject/WeChatDataAnalysis/issues -> ⚠️ **提醒**:年度总结目前还不是最终版本,后续还会增加新总结或新风格。 +> ⚠️ **提醒**:年度总结目前还不是最终版本,后续还会增加新总结或新内容。 也欢迎加入下方 QQ 群一起讨论。 - - + - - - - - - - - +
Style 1Style 2Modern
年度总结 Style 1年度总结 Style 2
Style 3
年度总结 Style 3年度总结 Modern
diff --git a/frontend/components/wrapped/cards/Card03ReplySpeed.vue b/frontend/components/wrapped/cards/Card03ReplySpeed.vue index 66ae36c..d196b72 100644 --- a/frontend/components/wrapped/cards/Card03ReplySpeed.vue +++ b/frontend/components/wrapped/cards/Card03ReplySpeed.vue @@ -115,7 +115,7 @@ @error="onShownAvatarError" /> Lucky Block theme.value === 'gameboy') +const isModern = computed(() => theme.value === 'off') const isRetro = computed(() => isGameboy.value) const nfInt = new Intl.NumberFormat('zh-CN', { maximumFractionDigits: 0 }) diff --git a/frontend/components/wrapped/shared/WrappedControls.vue b/frontend/components/wrapped/shared/WrappedControls.vue index 8ab5b8e..9cdb4ad 100644 --- a/frontend/components/wrapped/shared/WrappedControls.vue +++ b/frontend/components/wrapped/shared/WrappedControls.vue @@ -39,7 +39,6 @@
- -
@@ -205,11 +185,6 @@
- - @@ -229,8 +204,8 @@ const year = ref(Number(route.query?.year) || new Date().getFullYear()) // 分享视图不展示账号信息:默认让后端自动选择;需要指定时可用 query ?account=wxid_xxx const account = ref(typeof route.query?.account === 'string' ? route.query.account : '') -// 主题管理:modern / gameboy / win98 -const { theme, cycleTheme, isRetro, themeClass } = useWrappedTheme() +// 主题:仅保留 Modern +const { isRetro, themeClass } = useWrappedTheme() const accounts = ref([]) const accountsLoading = ref(true) @@ -262,13 +237,6 @@ const wheelAcc = ref(0) let navUnlockTimer = null let deckResizeObserver = null -// 各主题的背景颜色 -const THEME_BG = { - off: '#F3FFF8', // Modern: 浅绿 - gameboy: '#9bbc0f', // Game Boy: 亮绿 - win98: '#008080' // Win98: 经典桌面青色 -} - const slides = computed(() => { const cards = Array.isArray(report.value?.cards) ? report.value.cards : [] const out = [{ key: 'cover' }] @@ -276,15 +244,7 @@ const slides = computed(() => { return out }) -const taskbarTitle = computed(() => { - if (theme.value !== 'win98') return '' - if (activeIndex.value === 0) return `${year.value} WeChat Wrapped` - const idx = activeIndex.value - 1 - const c = report.value?.cards?.[idx] - return String(c?.title || 'WeChat Wrapped') -}) - -const currentBg = computed(() => THEME_BG[theme.value] || THEME_BG.off) +const currentBg = computed(() => '#F3FFF8') const deckTrackClass = computed(() => 'z-10') const applyViewportBg = () => { @@ -423,11 +383,8 @@ const onTouchEnd = (e) => { const updateViewport = () => { const h = Math.round(deckEl.value?.getBoundingClientRect?.().height || deckEl.value?.clientHeight || window.innerHeight || 0) if (!h) return - // Reserve space for the Win98 taskbar at the bottom. - const offset = theme.value === 'win98' ? 40 : 0 - const effective = Math.max(0, h - offset) // Avoid endless reflows from 1px rounding errors (especially in Electron). - if (Math.abs(viewportHeight.value - effective) > 1) viewportHeight.value = effective + if (Math.abs(viewportHeight.value - h) > 1) viewportHeight.value = h } const loadAccounts = async () => { @@ -592,12 +549,6 @@ onMounted(async () => { } }) -// Theme switch may change reserved UI space (e.g., Win98 taskbar) -watch(theme, () => { - applyViewportBg() - updateViewport() -}) - onBeforeUnmount(() => { if (import.meta.client) { document.documentElement.style.backgroundColor = ''