Files
WeChatDataAnalysis/frontend/components/wrapped/shared/WrappedThemeSwitcherGameboy.vue
2977094657 980f15d0a4 feat(wrapped-ui): 新增 Win98 主题与桌面化外观
- 主题系统新增 win98(显示名 Windows 98,快捷键扩展到 F1-F4),并区分 retro(pixel/CRT) 与桌面 GUI 主题
- 年度总结页新增 Win98 桌面背景与底部任务栏(背景色/视口高度适配)
- 封面与卡片 slide 形态支持 Win98 窗口外观(title bar/icon/controls)
- 主题切换器补充 Win98 选项并新增 Win98 专属切换器
- 新增 Win98 图标资源(Start + 桌面图标)
2026-02-02 00:07:09 +08:00

99 lines
1.9 KiB
Vue

<template>
<div class="gameboy-menu select-none">
<!-- 像素风格菜单框 -->
<div class="gameboy-menu-box">
<div class="gameboy-menu-title">SELECT THEME</div>
<div class="gameboy-menu-items">
<button
v-for="t in themes"
:key="t.value"
class="gameboy-menu-item"
:class="{ 'is-active': theme === t.value }"
@click="selectTheme(t.value)"
>
<span class="gameboy-cursor">{{ theme === t.value ? '▶' : ' ' }}</span>
<span class="gameboy-label">{{ t.label }}</span>
</button>
</div>
</div>
</div>
</template>
<script setup>
const { theme, setTheme } = useWrappedTheme()
const themes = [
{ value: 'off', label: 'MODERN' },
{ value: 'gameboy', label: 'GAME BOY' },
{ value: 'dos', label: 'DOS' },
{ value: 'win98', label: 'WIN98' }
]
const selectTheme = (value) => {
setTheme(value)
}
</script>
<style scoped>
.gameboy-menu {
font-family: 'Press Start 2P', 'Courier New', monospace;
font-size: 8px;
line-height: 1.5;
}
.gameboy-menu-box {
background: #0f380f;
border: 3px solid #306230;
padding: 8px;
box-shadow:
inset 2px 2px 0 #9bbc0f,
inset -2px -2px 0 #0f380f;
}
.gameboy-menu-title {
color: #9bbc0f;
text-align: center;
margin-bottom: 8px;
padding-bottom: 4px;
border-bottom: 2px dashed #306230;
}
.gameboy-menu-items {
display: flex;
flex-direction: column;
gap: 2px;
}
.gameboy-menu-item {
display: flex;
align-items: center;
gap: 4px;
padding: 4px 6px;
color: #9bbc0f;
background: transparent;
border: none;
cursor: pointer;
text-align: left;
transition: background-color 0.1s;
font-family: inherit;
font-size: inherit;
}
.gameboy-menu-item:hover {
background: #306230;
}
.gameboy-menu-item.is-active {
color: #8bac0f;
}
.gameboy-cursor {
width: 10px;
display: inline-block;
}
.gameboy-label {
letter-spacing: 1px;
}
</style>