fix: 在线玩家提示渲染 MOTD 颜色
Sync source to CNB / Sync Git ref (push) Skipped

This commit is contained in:
AxTps committed 2026-10-19 22:36:32 +08:00
1 parent 9c530247ef
commit 79d49d7916
1 file changed
+7 -4
@@ -34,6 +34,7 @@ import {
useVIntl,
} from '@modrinth/ui'
import { getPingLevel } from '@modrinth/utils'
import { autoToHTML } from '@sfirew/minecraft-motd-parser'
import dayjs from 'dayjs'
import { Tooltip } from 'floating-vue'
import type { Component } from 'vue'
@@ -360,10 +361,12 @@ const messages = defineMessages({
}}
</span>
<template #popper>
<div class="flex flex-col gap-1">
<span v-for="player in serverStatus.players?.sample" :key="player.name">
{{ player.name }}
</span>
<div class="flex flex-col gap-1 font-minecraft">
<span
v-for="player in serverStatus.players?.sample"
:key="player.name"
v-html="autoToHTML(player.name)"
/>
</div>
</template>
</Tooltip>