feat(ux): forum pay-hide depth, clogin OAuth, ban appeals admin, posts-navs widget

- Forum compose/save/draft: VIP prices, partial hide, coupons + shortcode tools
- Rainbow clogin aggregate login (rewrite + schema + CLoginClient)
- Native ban appeals tab: approve/reject + lift ban + notify
- WidgetPostsNavs + register missing forum widgets
- Submit editor shortcodes: login/reply/vip/payshow
This commit is contained in:
kate522 committed 2026-07-18 23:31:57 +08:00
1 parent 25aabb71a3
commit 24330653f0
15 files changed
+834 -35

No files matched your search

+38
View File
@@ -621,6 +621,44 @@
});
}
function insertForumEditorContent(html) {
if (window.tinymce) {
var ed = window.tinymce.get('compose-content') || window.tinymce.get('post_content');
if (ed && !ed.isHidden()) {
ed.focus();
ed.execCommand('mceInsertContent', false, html);
return;
}
}
var ta = document.getElementById('compose-content') || document.getElementById('post_content');
if (!ta) return;
var start = ta.selectionStart || 0;
var end = ta.selectionEnd || 0;
var val = ta.value || '';
ta.value = val.slice(0, start) + html + val.slice(end);
ta.focus();
}
function bindComposeShortcodeTools(root) {
root = root || document;
root.addEventListener('click', function (e) {
var btn = e.target.closest('[data-insert-shortcode]');
if (!btn) return;
e.preventDefault();
var type = btn.getAttribute('data-insert-shortcode');
if (type === 'hide') {
insertForumEditorContent('[hidecontent type="login"]隐藏内容[/hidecontent]');
} else if (type === 'reply') {
insertForumEditorContent('[hidecontent type="reply"]回复后可见[/hidecontent]');
} else if (type === 'payshow') {
insertForumEditorContent('[hidecontent type="payshow"]付费可见内容[/hidecontent]');
} else if (type === 'vip') {
insertForumEditorContent('[vip]VIP 可见内容[/vip]');
}
});
}
function bindComposeVisibilityToggle(form) {
var visSelect = form.querySelector('#compose-visibility');
var creditsField = form.querySelector('#compose-credits-cost-field');
+6 -2
View File
@@ -543,9 +543,13 @@
e.preventDefault();
var type = btn.getAttribute('data-insert-shortcode');
if (type === 'hide') {
insertEditorContent('[hidecontent type="logged"]hidden[/hidecontent]');
insertEditorContent('[hidecontent type="login"]' + (i18n.hidePlaceholder || '隐藏内容') + '[/hidecontent]');
} else if (type === 'payshow') {
insertEditorContent('[hidecontent type="payshow"]paid content[/hidecontent]');
insertEditorContent('[hidecontent type="payshow"]' + (i18n.payPlaceholder || '付费可见内容') + '[/hidecontent]');
} else if (type === 'reply') {
insertEditorContent('[hidecontent type="reply"]' + (i18n.replyPlaceholder || '回复后可见') + '[/hidecontent]');
} else if (type === 'vip') {
insertEditorContent('[vip]' + (i18n.vipPlaceholder || 'VIP 可见内容') + '[/vip]');
}
});
},