feat(user): wear badge modal and user-center entry
Expose 我的徽章 modal on profile header with REST wear actions and update SPA badge help for icon_url + grant/wear flows.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="aksrt-page-container">
|
||||
<PageHeader
|
||||
title="用户徽章"
|
||||
desc="维护公开徽章字典、展示数量和前台展示位。具体授予逻辑可以后续再接业务,但字段和展示契约已经固定。"
|
||||
desc="维护徽章字典(含可选 icon_url)、展示数量。授予/收回在 WP 用户资料页;用户前台可佩戴徽章。"
|
||||
>
|
||||
<template #actions>
|
||||
<n-space>
|
||||
@@ -65,11 +65,11 @@
|
||||
v-model:value="form.user_badge_dictionary"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 5, maxRows: 10 }"
|
||||
placeholder="founder|创始成员|warning staff|站务团队|info"
|
||||
placeholder="founder|创始成员|warning staff|站务团队|info|https://example.com/medal.png"
|
||||
:disabled="!form.user_badge_enabled"
|
||||
/>
|
||||
<template #feedback>
|
||||
<span class="aksrt-hint-text">每行一个徽章,格式 `slug|显示文案|色调`,色调支持 `neutral / info / success / warning / brand`。</span>
|
||||
<span class="aksrt-hint-text">每行:`slug|显示文案|色调|图标URL(可选)`。色调:neutral/info/success/warning/brand。授予在用户资料页;前台「我的徽章」可佩戴。</span>
|
||||
</template>
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
<n-card class="aksrt-section-card">
|
||||
<n-alert type="info" :show-icon="false">
|
||||
前台从 `aksrt_user_badges` user meta 读取已授予徽章列表,并在公开主页和本人中心头部展示。这里只负责定义合法徽章字典和展示上限。
|
||||
字典定义合法徽章;`aksrt_user_badges` 存已授予 slug;`aksrt_wear_badge` 为当前佩戴。公开页/评论通过 identity chips 展示(有 icon_url 时为勋章图)。
|
||||
</n-alert>
|
||||
</n-card>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user