feat: full parity pass - suspend enforcement, report modal polish, wechat notify

- Restriction: add is_suspended/get_active_suspend; comment block now covers
  suspend (小黑屋) in addition to mute, with reason in the deny message
- FrontSubmitSave::persist: block post/draft/edit submission for suspended
  users (reference-theme semantics: 小黑屋 loses all publishing rights)
- report.js: close icon switched from fa-times to the SVG sprite ic-close
  (#icon-close), same as reference theme; textareas gain autoHeight growth
  (hidden 'other reason' box skips the first measurement)
- WeChatNotify: NOTIFY_TYPES now includes report/system so report results
  and account restriction notices fan out to WeChat template messages;
  generic title/description fallback for template values
- contract tests: +3 tests (suspend enforcement, modal polish, wechat types)
This commit is contained in:
2026-09-20 16:09:12 +08:00
parent c38616b290
commit 0df6e760e3
5 changed files with 121 additions and 8 deletions
+10
View File
@@ -43,6 +43,16 @@ trait FrontSubmitSave {
}
}
// 小黑屋(suspend):剥夺发布权限,发帖/草稿/编辑均拦截(对齐参考主题)。
if (!$is_guest && \AKSRT\User\Restriction::get_instance()->is_suspended($user_id)) {
$suspend = \AKSRT\User\Restriction::get_instance()->get_active_suspend($user_id);
$message = __('您已被关入小黑屋,暂时无法发布内容', 'aksrt');
if (!empty($suspend['reason'])) {
$message .= ',原因:' . $suspend['reason'];
}
return ['success' => false, 'message' => $message];
}
if ($is_edit) {
if (!$this->can_edit_post($posts_id, $user_id)) {
return ['success' => false, 'message' => __('没有编辑权限', 'aksrt')];