feat(forum): add quick publish, captcha and hidden content
Port the reference inline quick-publish composer to the forum home: title/body inputs, image upload, plate/topic/access/hidden-content dropdowns and save/publish actions. Wire the site captcha into forum publishing through a new `forum_post` scene (admin + REST gate), and turn the hidden-content box into the theme's own visibility shortcodes (login/comment/vip/payshow) so the existing gate renderer unlocks them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5d3358d844
commit
7a59c65252
11 files changed
+204
-20
No files matched your search
@@ -84,6 +84,7 @@ export const permissionsSchemas = {
|
||||
{ label: '资源下载', value: 'download' },
|
||||
{ label: '每日签到', value: 'signin' },
|
||||
{ label: '前台投稿', value: 'front_submit' },
|
||||
{ label: '论坛发帖', value: 'forum_post' },
|
||||
{ label: '打赏用户', value: 'tip_user' },
|
||||
{ label: '提交工单', value: 'ticket_create' },
|
||||
{ label: '回复工单', value: 'ticket_reply' },
|
||||
|
||||
@@ -51,6 +51,22 @@
|
||||
}
|
||||
.quick-posts-box{border-radius:var(--main-radius);padding:15px}
|
||||
.quick-posts-box .title-theme{margin-bottom:10px}
|
||||
.quick-input-group{padding:15px;border:1px solid var(--main-border-color);border-radius:var(--main-radius)}
|
||||
.quick-posts-box .edit-posts-title{position:relative}
|
||||
.quick-posts-box .edit-posts-title .line-form-line{display:none}
|
||||
.quick-posts-box .edit-posts-title textarea{width:100%;color:var(--main-color);padding:0;margin-bottom:10px;font-weight:500;font-size:18px;border:0;border-bottom:1px solid var(--main-border-color);background:transparent;resize:none;outline:0}
|
||||
.quick-posts-box .edit-posts-content textarea{outline:0!important;border:none;display:block;width:100%;padding:0;background:transparent;color:var(--main-color);resize:vertical;min-height:88px}
|
||||
.quick-posts-box .preview .add,.quick-posts-box .preview .preview-item{width:90px;height:90px;border:1px dashed var(--main-border-color);background:none;margin:2px;border-radius:var(--main-radius);position:relative}
|
||||
.quick-posts-box .preview .add:before{content:"+";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:28px;color:var(--muted-3-color)}
|
||||
.quick-posts-box .drop-select .dropdown-menu{min-width:320px}
|
||||
.quick-more-btns{color:var(--muted-color);position:relative;flex-wrap:wrap;gap:6px}
|
||||
.quick-more-btns .drop-btn{padding:6px 4px;cursor:pointer}
|
||||
.quick-more-btns .drop-select{position:relative}
|
||||
.quick-posts-submit .but{padding:6px 5px;min-width:85px}
|
||||
.quick-posts-submit .quick-captcha{margin-bottom:8px}
|
||||
.hide-type-drop .select-drop-box .badg.active{--this-bg:var(--focus-color);--this-color:#fff}
|
||||
.hide-type-drop textarea{margin-top:8px;width:100%}
|
||||
.jio-forum__captcha{margin-bottom:15px}
|
||||
.forum-home .jio-widget-box{clear:both;background-color:var(--main-bg-color);padding:15px;box-shadow:0 0 10px var(--main-shadow);border-radius:var(--main-radius);margin-bottom:20px}
|
||||
.forum-home .jio-widget-box .btn-block{display:block;width:100%;text-align:center}
|
||||
.forum-home .jio-widget-box .title-theme{font-size:15px;font-weight:600}
|
||||
|
||||
@@ -134,6 +134,21 @@
|
||||
syncHidden('post_status', status.dataset.forumStatus)
|
||||
return
|
||||
}
|
||||
const hideType = event.target.closest('[data-forum-hide-type]')
|
||||
if (hideType) {
|
||||
root.querySelectorAll('[data-forum-hide-type]').forEach((item) => item.classList.toggle('active', item === hideType))
|
||||
syncHidden('hide_type', hideType.dataset.forumHideType)
|
||||
return
|
||||
}
|
||||
const topic = event.target.closest('[data-forum-topic],[data-forum-topic-none]')
|
||||
if (topic) {
|
||||
const name = topic.dataset.forumTopic || ''
|
||||
root.querySelectorAll('[data-forum-topic],[data-forum-topic-none]').forEach((item) => item.classList.toggle('active', item === topic))
|
||||
syncHidden('topics', name)
|
||||
const label = root.querySelector('[name="topics"]')
|
||||
if (label) label.lastChild.textContent = name || '话题'
|
||||
return
|
||||
}
|
||||
const pick = event.target.closest('[data-forum-cover-pick]')
|
||||
if (pick) {
|
||||
root.querySelector('[data-forum-cover-file]')?.click()
|
||||
|
||||
Reference in new issue
Block a user