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:
+18
-1
@@ -79,7 +79,7 @@
|
||||
|
||||
// 弹窗头:参考主题 edit-header 同构(关闭钮 + 红色警示徽标 + 标题)。
|
||||
html += '<div class="mb10 edit-header touch">';
|
||||
html += '<button type="button" class="close" data-aksrt-modal-close aria-label="关闭"><i class="fa fa-times" aria-hidden="true"></i></button>';
|
||||
html += '<button type="button" class="close" data-aksrt-modal-close aria-label="关闭"><svg class="ic-close" aria-hidden="true"><use xlink:href="#icon-close"></use></svg></button>';
|
||||
html += '<b class="flex ac c-red"><span class="toggle-radius mr10 c-red"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i></span>' + escapeHtml(title) + '</b>';
|
||||
html += '</div>';
|
||||
|
||||
@@ -284,7 +284,24 @@
|
||||
});
|
||||
}
|
||||
|
||||
function bindAutoHeight(textarea) {
|
||||
// 对齐参考主题 autoHeight 行为:随内容自动增高,最小保持初始行数高度。
|
||||
// 隐藏中的 textarea(如“其它原因”)跳过首次计算,待可见后按实际高度增长。
|
||||
if (!textarea || textarea.dataset.aksrtAutoHeight === '1') return;
|
||||
textarea.dataset.aksrtAutoHeight = '1';
|
||||
var minHeight = 0;
|
||||
var grow = function () {
|
||||
if (!minHeight) minHeight = textarea.offsetHeight || 0;
|
||||
textarea.style.height = 'auto';
|
||||
textarea.style.height = Math.max(textarea.scrollHeight, minHeight) + 'px';
|
||||
};
|
||||
textarea.addEventListener('input', grow);
|
||||
if (textarea.offsetHeight > 0) grow();
|
||||
}
|
||||
|
||||
function bindReportModal(shell) {
|
||||
shell.querySelectorAll('textarea.form-control').forEach(bindAutoHeight);
|
||||
|
||||
shell.addEventListener('click', function (event) {
|
||||
// 原因徽章:单选 active(参考主题 .active.badg 焦点色),其它原因展开文本框。
|
||||
// 参考主题行为:重复点击已选徽章保持选中(先全清再激活),不做反选。
|
||||
|
||||
Reference in New Issue
Block a user