From 810969e98700ac3b24a04006d9ff916c94438d1e Mon Sep 17 00:00:00 2001 From: njouud <156097454+njouud@users.noreply.github.com> Date: Sun, 27 Oct 2024 22:25:25 +0300 Subject: [PATCH] Revert "Re-adding front-end changes" --- .../static/lib/composer.js | 13 ----------- .../partials/composer-title-container.tpl | 5 ----- .../partials/topic/emoji-dropdown.tpl | 22 ------------------- .../templates/partials/topic/post.tpl | 1 - .../nodebb-theme-harmony/templates/topic.tpl | 10 --------- 5 files changed, 51 deletions(-) delete mode 100644 node_modules/nodebb-theme-harmony/templates/partials/topic/emoji-dropdown.tpl diff --git a/node_modules/nodebb-plugin-composer-default/static/lib/composer.js b/node_modules/nodebb-plugin-composer-default/static/lib/composer.js index 336f6a5543..70e381b8b4 100644 --- a/node_modules/nodebb-plugin-composer-default/static/lib/composer.js +++ b/node_modules/nodebb-plugin-composer-default/static/lib/composer.js @@ -32,8 +32,6 @@ define('composer', [ formatting: undefined, }; - var isAnonymous = false; - $(window).off('resize', onWindowResize).on('resize', onWindowResize); onWindowResize(); @@ -205,7 +203,6 @@ define('composer', [ tags: data.tags || [], modified: !!((data.title && data.title.length) || (data.body && data.body.length)), isMain: true, - isAnonymous: isAnonymous, }; ({ pushData } = await hooks.fire('filter:composer.topic.push', { @@ -281,7 +278,6 @@ define('composer', [ body: translated, modified: !!(translated && translated.length), isMain: false, - isAnonymous: isAnonymous, }); }); }; @@ -304,7 +300,6 @@ define('composer', [ postData.title = data.title; postData.modified = true; } - postData.isAnonymous = isAnonymous; push(postData); }); }; @@ -357,10 +352,6 @@ define('composer', [ composer.posts[post_uuid].modified = true; }); - postContainer.on('change', '#anonymousToggle', function () { - isAnonymous = $(this).is(':checked'); - }); - postContainer.on('click', '.composer-submit', function (e) { e.preventDefault(); e.stopPropagation(); // Other click events bring composer back to active state which is undesired on submit @@ -713,7 +704,6 @@ define('composer', [ let composerData = { uuid: post_uuid, - isAnonymous: isAnonymous, }; let method = 'post'; let route = ''; @@ -729,7 +719,6 @@ define('composer', [ cid: categoryList.getSelectedCid(), tags: tags.getTags(post_uuid), timestamp: scheduler.getTimestamp(), - isAnonymous: isAnonymous, }; } else if (action === 'posts.reply') { route = `/topics/${postData.tid}`; @@ -739,7 +728,6 @@ define('composer', [ handle: handleEl ? handleEl.val() : undefined, content: bodyEl.val(), toPid: postData.toPid, - isAnonymous: isAnonymous, }; } else if (action === 'posts.edit') { method = 'put'; @@ -753,7 +741,6 @@ define('composer', [ thumb: thumbEl.val() || '', tags: tags.getTags(post_uuid), timestamp: scheduler.getTimestamp(), - isAnonymous: isAnonymous, }; } var submitHookData = { diff --git a/node_modules/nodebb-plugin-composer-default/static/templates/partials/composer-title-container.tpl b/node_modules/nodebb-plugin-composer-default/static/templates/partials/composer-title-container.tpl index 5818e782c3..185393f285 100644 --- a/node_modules/nodebb-plugin-composer-default/static/templates/partials/composer-title-container.tpl +++ b/node_modules/nodebb-plugin-composer-default/static/templates/partials/composer-title-container.tpl @@ -26,11 +26,6 @@