按新的顺序重写 main 导览(10 个内容点,导航 + 高亮共 16 步): 主页、登录 StarLight、侧栏公告、创建 StarLight 实例、发现内容、 皮肤选择器、实例库、实验室、下载、设置的更新页。 - onboardingConfig.ts 重写 onboardingTours.main,并新增 home-intro/ account-login/announcement/create-starlight/settings-updates 文案; - HomeAnnouncementEntry.vue 增加 data-onboarding-id="home-announcement" 锚点; - en-US / zh-CN 补齐上述新增文案。
33 lines
1.0 KiB
Vue
33 lines
1.0 KiB
Vue
<script setup lang="ts">
|
|
import { NewspaperIcon, RightArrowIcon } from '@modrinth/assets'
|
|
import { inject } from 'vue'
|
|
|
|
const showAnnouncement = inject<(() => void) | undefined>('showStartupAnnouncement')
|
|
|
|
function open() {
|
|
showAnnouncement?.()
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<section
|
|
data-onboarding-id="home-announcement"
|
|
class="flex min-w-0 flex-col gap-3 border-0 border-b-[1px] border-solid border-[--brand-gradient-border] p-4"
|
|
>
|
|
<button
|
|
type="button"
|
|
class="group flex w-full cursor-pointer flex-col gap-2 border-0 bg-transparent p-0 text-left"
|
|
@click="open"
|
|
>
|
|
<div class="flex items-center gap-2">
|
|
<NewspaperIcon class="size-4 shrink-0 text-secondary" aria-hidden="true" />
|
|
<h2 class="m-0 truncate text-lg">公告</h2>
|
|
<RightArrowIcon
|
|
class="ml-auto size-4 shrink-0 text-secondary transition-transform group-hover:translate-x-0.5"
|
|
aria-hidden="true"
|
|
/>
|
|
</div>
|
|
<p class="m-0 text-sm leading-relaxed text-secondary">点击查看最新公告</p>
|
|
</button>
|
|
</section>
|
|
</template> |