del:移除了美西螈彩蛋
Some checks failed
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled

This commit is contained in:
2026-09-12 23:35:57 +08:00
parent ceda000578
commit ea80a98143
16 changed files with 75 additions and 1374 deletions

View File

@ -0,0 +1,53 @@
<!--
彩蛋占位组件Easter Egg Placeholder
======================================
原来的美西螈合成小游戏已被移除这里预留给自定义彩蛋
触发方式沿用原框架 AboutSettings.vue
1. 输入暗号'cyf112233' 'cxkcxkckx'
2. Konami 秘技BA
3. 长按关于页某位开发者名字 about-member-experiences.ts
如何改造成你自己的彩蛋
- 直接在下方 <template> 里写你的内容游戏 / 动画 / 展示页都行
- 如需全屏沿用根容器的 absolute inset-0 布局
- 组件通过 defineEmits 暴露 exit 事件调用它会关闭弹窗
- 若彩蛋需要独立的静态资源图片/HTML/JS放到 public/easteregg/
`${window.location.origin}/easteregg/...` 引用或直接在 <template> 内联
当前状态空占位仅显示一行提示
-->
<script setup lang="ts">
import { defineMessages, useVIntl } from '@modrinth/ui'
const emit = defineEmits<{ exit: [] }>()
const { formatMessage } = useVIntl()
const messages = defineMessages({
placeholder: {
id: 'app.settings.about.easteregg.placeholder',
defaultMessage: 'Easter egg goes here.',
},
exit: {
id: 'app.settings.about.easteregg.exit',
defaultMessage: 'Close',
},
})
</script>
<template>
<div class="absolute inset-0 z-10 flex flex-col items-center justify-center gap-4 bg-surface-1">
<p class="m-0 text-sm text-secondary">
{{ formatMessage(messages.placeholder) }}
</p>
<button
type="button"
class="rounded-lg bg-surface-3 px-4 py-1.5 text-sm font-medium text-contrast transition-colors hover:bg-surface-4"
@click.stop="emit('exit')"
>
{{ formatMessage(messages.exit) }}
</button>
</div>
</template>

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,10 @@
<script setup lang="ts">
import { defineMessages, NewModal, useVIntl } from '@modrinth/ui'
import { ref } from 'vue'
import AboutEasterEgg from '../AboutEasterEgg.vue'
const { formatMessage } = useVIntl()
const messages = defineMessages({
@ -14,8 +17,6 @@ const messages = defineMessages({
const modal = ref<InstanceType<typeof NewModal> | null>(null)
const gameVisible = ref(false)
const gameUrl = `${window.location.origin}/easteregg/games/game.html`
function show() {
gameVisible.value = true
modal.value?.show()
@ -25,6 +26,10 @@ function onHide() {
gameVisible.value = false
}
function closeGame() {
modal.value?.hide()
}
defineExpose({ show })
</script>
@ -37,13 +42,8 @@ defineExpose({ show })
noblur
:on-hide="onHide"
>
<div class="flex flex-col items-center py-2">
<iframe
v-if="gameVisible"
:src="gameUrl"
title="Mini Game"
class="h-[600px] w-[800px] max-w-full rounded-xl border-none bg-black"
/>
<div class="relative h-[600px] w-[800px] max-w-full overflow-hidden rounded-xl bg-surface-1">
<AboutEasterEgg v-if="gameVisible" @exit="closeGame" />
</div>
</NewModal>
</template>

View File

@ -1,19 +1,23 @@
import type { Component } from 'vue'
import AboutMergeGame from '../AboutMergeGame.vue'
import AboutEasterEgg from '../AboutEasterEgg.vue'
export type AboutMemberExperience = {
component: Component
longPressDuration: number
}
// 长按「关于」页成员名字触发的彩蛋体验。
// 原 'axolotl-merge' 彩蛋已移除,改为通用占位组件 AboutEasterEgg.vue。
// 若要为特定成员挂载自定义彩蛋,在这里新增条目即可。
const memberExperiences: Record<string, AboutMemberExperience> = {
'axolotl-merge': {
component: AboutMergeGame,
'easter-egg': {
component: AboutEasterEgg,
longPressDuration: 800,
},
}
export function getAboutMemberExperience(experience: unknown): AboutMemberExperience | undefined {
return typeof experience === 'string' ? memberExperiences[experience] : undefined
}
}