feat(frontend): upgrade report dialog experience
Replace manual report links with automatic target association, improve validation and evidence uploads, and remove retired report UI code. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
59ddf677b6
commit
80aecab586
10 files changed
+1121
-462
No files matched your search
@@ -107,12 +107,10 @@ $show_cover_menu = $has_more_details || $show_cover_report || $cover_ban_html !=
|
||||
<?php if ($has_more_details) : ?><button type="button" role="menuitem" data-aksrt-profile-details><i class="fa fas fa-address-card" aria-hidden="true"></i><?php esc_html_e('更多资料', 'aksrt'); ?></button><?php endif; ?>
|
||||
<?php if ($show_cover_report) : ?>
|
||||
<?php
|
||||
// 统一举报契约:report.js 弹窗展示被举报对象(头像 + 名称)。
|
||||
$report_payload = [
|
||||
'target_type' => 'user',
|
||||
'target_id' => $user_id,
|
||||
'target_name' => $user->display_name,
|
||||
'target_avatar' => get_avatar_url($user_id, ['size' => 40]),
|
||||
'target_type' => 'user',
|
||||
'target_id' => $user_id,
|
||||
'target_name' => $user->display_name,
|
||||
];
|
||||
?>
|
||||
<?php if (is_user_logged_in()) : ?><button type="button" role="menuitem" data-aksrt-report="<?php echo esc_attr(wp_json_encode($report_payload)); ?>"><i class="fa fas fa-flag" aria-hidden="true"></i><?php esc_html_e('举报用户', 'aksrt'); ?></button>
|
||||
|
||||
Reference in new issue
Block a user