feat(single): identity chips, comment 神评, reward open from author bar

Share VIP/verify/level/badge chrome via aksrt-identity helpers on author
bar, author card, and comments; mark hot comments; open reward modal from
author actions; admin threshold for 神评; task list go-to actions.
This commit is contained in:
2026-07-16 20:32:46 +08:00
parent a0748c08fe
commit defb64fd89
9 changed files with 166 additions and 26 deletions
@@ -20,6 +20,7 @@ export const commentSchema = {
comment_img: true,
comment_upload_img: false,
comment_like_s: true,
comment_hot_threshold: 10,
comment_quick_s: true,
comment_city_s: true,
comment_author_tag: true,
@@ -78,6 +79,7 @@ export const commentSchema = {
title: '互动功能',
icon: 'fas fa-heart',
fields: [
{ key: 'comment_hot_threshold', label: '神评点赞阈值', type: 'number', default: 10, min: 1, max: 999, help: '点赞数达到该值后显示「神评」徽章', dependsOn: { key: 'comment_like_s', value: true } },
{ key: 'comment_like_s', label: '评论点赞', type: 'switch', default: true },
{ key: 'comment_quick_s', label: '快捷回复', type: 'switch', default: true },
{ key: 'comment_city_s', label: '评论城市', type: 'switch', default: true },
+31
View File
@@ -671,3 +671,34 @@ body.dark-theme .comment-login-prompt__inner {
margin-bottom: 0;
opacity: 0.9;
}
/* Identity chips + 神评 */
.aksrt-identity-chip {
display: inline-flex;
align-items: center;
gap: 3px;
vertical-align: middle;
max-width: 9em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.aksrt-identity-chip--comment {
font-size: 11px;
padding: 0 6px;
}
.aksrt-comment__badge--hot {
color: #ea580c;
background: rgba(234, 88, 12, 0.1);
border-radius: 999px;
padding: 0 6px;
margin-left: 4px;
font-size: 11px;
}
.aksrt-comment__header .author-box {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 4px;
}
+7
View File
@@ -40,6 +40,13 @@
}
btn.addEventListener('click', openReward);
document.querySelectorAll('[data-aksrt-reward-open]').forEach(function (el) {
if (el === btn) return;
el.addEventListener('click', function (e) {
e.preventDefault();
openReward();
});
});
if (closeBtn) closeBtn.addEventListener('click', closeReward);
if (overlay) overlay.addEventListener('click', closeReward);