feat: 用户徽章与等级体系,积分经济管理重构
- 新增徽章系统:badge 服务与 handler、管理端配置页、BadgeChip/LevelBadge 展示组件 - 新增等级模型:model/level 及前端 levels 元数据 - 管理端经济模块拆分为 points/badges/levels 独立页面,EconomySettings 迁入设置 - 积分、签到、评论等服务适配等级与徽章逻辑
This commit is contained in:
@@ -21,6 +21,7 @@ import { getMeCached, getPublicSettingsCached } from "@/lib/serverData";
|
||||
import { TOKEN_COOKIE, authCookieHeader } from "@/lib/cookies";
|
||||
import { accentStyleCSS } from "@/lib/theme";
|
||||
import { bgConfigFromSettings, bgStyleCSS } from "@/lib/bg";
|
||||
import { levelVarsCSS } from "@/lib/levels";
|
||||
import { siteDocumentTitle } from "@/lib/brand";
|
||||
import { motionConfigFromSettings } from "@/lib/motion";
|
||||
import { peekPublicMetaSnapshot, publishPublicMetaSnapshot } from "@/lib/publicMetaSnapshot";
|
||||
@@ -126,6 +127,7 @@ export default async function RootLayout({
|
||||
<html
|
||||
lang="zh-CN"
|
||||
data-j13-chrome={isAdmin ? "admin" : "site"}
|
||||
data-lv-fx={settings.levels_fx === false ? "off" : "on"}
|
||||
className={`${theme === "dark" ? "dark" : ""} ${motionHtmlClass} ${jakarta.variable} ${notoSC.variable} ${jetbrainsMono.variable}`.trim()}
|
||||
>
|
||||
<body className="min-h-screen flex flex-col">
|
||||
@@ -144,6 +146,12 @@ export default async function RootLayout({
|
||||
dangerouslySetInnerHTML={{ __html: bgCSS }}
|
||||
/>
|
||||
) : null}
|
||||
{/* 等级配色变量(--lv-N-fg/-bg,引用设计 token 随明暗主题切换);恒渲染兼作兜底 */}
|
||||
<style
|
||||
id="j13-level-vars"
|
||||
data-level-source="ssr"
|
||||
dangerouslySetInnerHTML={{ __html: levelVarsCSS(settings.levels) }}
|
||||
/>
|
||||
<a href="#main" className="skip-link">
|
||||
跳到主要内容
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user