fix: only show category selector on quickreply on /world

This commit is contained in:
Julian Lam
2026-03-17 12:06:43 -04:00
parent 902533db06
commit 27b0fbe685
2 changed files with 4 additions and 3 deletions

View File

@@ -108,10 +108,10 @@
"nodebb-plugin-spam-be-gone": "2.3.2",
"nodebb-plugin-web-push": "0.7.7",
"nodebb-rewards-essentials": "1.0.2",
"nodebb-theme-harmony": "2.2.59",
"nodebb-theme-harmony": "2.2.60",
"nodebb-theme-lavender": "7.1.21",
"nodebb-theme-peace": "2.2.57",
"nodebb-theme-persona": "14.2.32",
"nodebb-theme-persona": "14.2.33",
"nodebb-widget-essentials": "7.0.43",
"nodemailer": "8.0.2",
"nprogress": "0.2.0",

View File

@@ -19,7 +19,7 @@ define('quickreply', [
return;
}
if ($('[component="topic/quickreply/container"] [component="category-selector"]')) {
if (opts?.body?.cid && $('[component="topic/quickreply/container"] [component="category-selector"]')) {
categorySelector.init($('[component="category-selector"]'), {
privilege: 'topics:create',
selectedCategory: ajaxify.data.selectedCategory,
@@ -28,6 +28,7 @@ define('quickreply', [
opts.body.cid = category.cid;
},
});
$('[component="topic/quickreply/container"] [component="topic/quickreply/category-selector"').removeClass('hidden');
}
const qrDraftId = ajaxify.data.tid ? `qr:draft:tid:${ajaxify.data.tid}` : `qr:draft:cid:${opts?.body?.cid || -1}`;