From 9f72f84775d7ca8ac15b203b98d7c4cfd21d8626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 22 Sep 2022 15:43:42 -0400 Subject: [PATCH] fix: img-fluid --- install/package.json | 6 +++--- public/src/client/account/best.js | 2 +- public/src/client/account/bookmarks.js | 2 +- public/src/client/account/downvoted.js | 2 +- public/src/client/account/posts.js | 4 ++-- public/src/client/account/profile.js | 2 +- public/src/client/account/upvoted.js | 2 +- public/src/client/categories.js | 2 +- public/src/client/chats.js | 2 +- public/src/client/chats/messages.js | 2 +- public/src/client/groups/details.js | 2 +- public/src/client/post-queue.js | 2 +- public/src/client/topic/events.js | 2 +- public/src/client/topic/posts.js | 2 +- public/src/modules/search.js | 2 +- public/src/widgets.js | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/install/package.json b/install/package.json index fbbab964fb..1e841df4e6 100644 --- a/install/package.json +++ b/install/package.json @@ -89,16 +89,16 @@ "multiparty": "4.2.3", "nconf": "0.12.0", "nodebb-plugin-2factor": "6.0.0", - "nodebb-plugin-composer-default": "10.0.0", + "nodebb-plugin-composer-default": "10.0.1", "nodebb-plugin-dbsearch": "6.0.0", "nodebb-plugin-emoji": "5.0.2", "nodebb-plugin-emoji-android": "4.0.0", - "nodebb-plugin-markdown": "11.0.0", + "nodebb-plugin-markdown": "11.0.2", "nodebb-plugin-mentions": "4.0.1", "nodebb-plugin-spam-be-gone": "2.0.0", "nodebb-rewards-essentials": "0.2.1", "nodebb-theme-persona": "https://github.com/NodeBB/nodebb-theme-persona.git#bootstrap5", - "nodebb-widget-essentials": "7.0.0", + "nodebb-widget-essentials": "7.0.1", "nodemailer": "6.7.8", "nprogress": "0.2.0", "passport": "0.6.0", diff --git a/public/src/client/account/best.js b/public/src/client/account/best.js index b8327a3e39..4a6e212c38 100644 --- a/public/src/client/account/best.js +++ b/public/src/client/account/best.js @@ -7,7 +7,7 @@ define('forum/account/best', ['forum/account/header', 'forum/account/posts'], fu Best.init = function () { header.init(); - $('[component="post/content"] img:not(.not-responsive)').addClass('img-responsive'); + $('[component="post/content"] img:not(.not-responsive)').addClass('img-fluid'); posts.handleInfiniteScroll('account/best'); }; diff --git a/public/src/client/account/bookmarks.js b/public/src/client/account/bookmarks.js index 4959a24d73..913edd8edd 100644 --- a/public/src/client/account/bookmarks.js +++ b/public/src/client/account/bookmarks.js @@ -7,7 +7,7 @@ define('forum/account/bookmarks', ['forum/account/header', 'forum/account/posts' Bookmarks.init = function () { header.init(); - $('[component="post/content"] img:not(.not-responsive)').addClass('img-responsive'); + $('[component="post/content"] img:not(.not-responsive)').addClass('img-fluid'); posts.handleInfiniteScroll('account/bookmarks'); }; diff --git a/public/src/client/account/downvoted.js b/public/src/client/account/downvoted.js index 4ebf742237..113376bc3c 100644 --- a/public/src/client/account/downvoted.js +++ b/public/src/client/account/downvoted.js @@ -7,7 +7,7 @@ define('forum/account/downvoted', ['forum/account/header', 'forum/account/posts' Downvoted.init = function () { header.init(); - $('[component="post/content"] img:not(.not-responsive)').addClass('img-responsive'); + $('[component="post/content"] img:not(.not-responsive)').addClass('img-fluid'); posts.handleInfiniteScroll('account/downvoted'); }; diff --git a/public/src/client/account/posts.js b/public/src/client/account/posts.js index a0c0a3e92f..fbd7f555c7 100644 --- a/public/src/client/account/posts.js +++ b/public/src/client/account/posts.js @@ -10,7 +10,7 @@ define('forum/account/posts', ['forum/account/header', 'forum/infinitescroll', ' AccountPosts.init = function () { header.init(); - $('[component="post/content"] img:not(.not-responsive)').addClass('img-responsive'); + $('[component="post/content"] img:not(.not-responsive)').addClass('img-fluid'); AccountPosts.handleInfiniteScroll('account/posts'); }; @@ -43,7 +43,7 @@ define('forum/account/posts', ['forum/account/header', 'forum/infinitescroll', ' function onPostsLoaded(posts, callback) { app.parseAndTranslate(template, 'posts', { posts: posts }, function (html) { $('[component="posts"]').append(html); - html.find('img:not(.not-responsive)').addClass('img-responsive'); + html.find('img:not(.not-responsive)').addClass('img-fluid'); html.find('.timeago').timeago(); utils.makeNumbersHumanReadable(html.find('.human-readable-number')); hooks.fire('action:posts.loaded', { posts: posts }); diff --git a/public/src/client/account/profile.js b/public/src/client/account/profile.js index 63024e4d04..03a91066e1 100644 --- a/public/src/client/account/profile.js +++ b/public/src/client/account/profile.js @@ -23,7 +23,7 @@ define('forum/account/profile', [ }; function processPage() { - $('[component="posts"] [component="post/content"] img:not(.not-responsive), [component="aboutme"] img:not(.not-responsive)').addClass('img-responsive'); + $('[component="posts"] [component="post/content"] img:not(.not-responsive), [component="aboutme"] img:not(.not-responsive)').addClass('img-fluid'); } function onUserStatusChange(data) { diff --git a/public/src/client/account/upvoted.js b/public/src/client/account/upvoted.js index 274cdfb025..a2712c229e 100644 --- a/public/src/client/account/upvoted.js +++ b/public/src/client/account/upvoted.js @@ -7,7 +7,7 @@ define('forum/account/upvoted', ['forum/account/header', 'forum/account/posts'], Upvoted.init = function () { header.init(); - $('[component="post/content"] img:not(.not-responsive)').addClass('img-responsive'); + $('[component="post/content"] img:not(.not-responsive)').addClass('img-fluid'); posts.handleInfiniteScroll('account/upvoted'); }; diff --git a/public/src/client/categories.js b/public/src/client/categories.js index bbe3d7dab5..831eb73172 100644 --- a/public/src/client/categories.js +++ b/public/src/client/categories.js @@ -46,7 +46,7 @@ define('forum/categories', ['components', 'categorySelector', 'hooks'], function const recentPosts = category.find('[component="category/posts"]'); app.parseAndTranslate('partials/categories/lastpost', 'posts', { posts: [post] }, function (html) { - html.find('.post-content img:not(.not-responsive)').addClass('img-responsive'); + html.find('.post-content img:not(.not-responsive)').addClass('img-fluid'); html.hide(); if (recentPosts.length === 0) { html.appendTo(category); diff --git a/public/src/client/chats.js b/public/src/client/chats.js index 5cb2d57d52..7063055c5d 100644 --- a/public/src/client/chats.js +++ b/public/src/client/chats.js @@ -166,7 +166,7 @@ define('forum/chats', [ html = $(html); el.prepend(html); html.find('.timeago').timeago(); - html.find('img:not(.not-responsive)').addClass('img-responsive'); + html.find('img:not(.not-responsive)').addClass('img-fluid'); el.scrollTop((el[0].scrollHeight - previousHeight) + currentScrollTop); loading = false; }); diff --git a/public/src/client/chats/messages.js b/public/src/client/chats/messages.js index 06ebd8f1a0..77be135621 100644 --- a/public/src/client/chats/messages.js +++ b/public/src/client/chats/messages.js @@ -76,7 +76,7 @@ define('forum/chats/messages', [ const isAtBottom = messages.isAtBottom(chatContentEl); newMessage.appendTo(chatContentEl); newMessage.find('.timeago').timeago(); - newMessage.find('img:not(.not-responsive)').addClass('img-responsive'); + newMessage.find('img:not(.not-responsive)').addClass('img-fluid'); if (isAtBottom) { messages.scrollToBottom(chatContentEl); } diff --git a/public/src/client/groups/details.js b/public/src/client/groups/details.js index 4942e0b3e1..e85e02e028 100644 --- a/public/src/client/groups/details.js +++ b/public/src/client/groups/details.js @@ -67,7 +67,7 @@ define('forum/groups/details', [ handleMemberInvitations(); - components.get('groups/activity').find('.content img:not(.not-responsive)').addClass('img-responsive'); + components.get('groups/activity').find('.content img:not(.not-responsive)').addClass('img-fluid'); detailsPage.on('click', '[data-action]', function () { const btnEl = $(this); diff --git a/public/src/client/post-queue.js b/public/src/client/post-queue.js index 5c75743912..5fe557c69f 100644 --- a/public/src/client/post-queue.js +++ b/public/src/client/post-queue.js @@ -101,7 +101,7 @@ define('forum/post-queue', [ return false; }); - $('[component="post/content"] img:not(.not-responsive)').addClass('img-responsive'); + $('[component="post/content"] img:not(.not-responsive)').addClass('img-fluid'); }; function confirmReject(msg) { diff --git a/public/src/client/topic/events.js b/public/src/client/topic/events.js index 53037e8bfa..bdb4b29486 100644 --- a/public/src/client/topic/events.js +++ b/public/src/client/topic/events.js @@ -138,7 +138,7 @@ define('forum/topic/events', [ if (data.post.changed) { editedPostEl.fadeOut(250, function () { editedPostEl.html(translator.unescape(data.post.content)); - editedPostEl.find('img:not(.not-responsive)').addClass('img-responsive'); + editedPostEl.find('img:not(.not-responsive)').addClass('img-fluid'); images.wrapImagesInLinks(editedPostEl.parent()); posts.addBlockquoteEllipses(editedPostEl.parent()); editedPostEl.fadeIn(250); diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index ba48d05445..dc0200f779 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -286,7 +286,7 @@ define('forum/topic/posts', [ images.wrapImagesInLinks(posts); hideDuplicateSignatures(posts); Posts.showBottomPostBar(); - posts.find('[component="post/content"] img:not(.not-responsive)').addClass('img-responsive'); + posts.find('[component="post/content"] img:not(.not-responsive)').addClass('img-fluid'); Posts.addBlockquoteEllipses(posts); hidePostToolsForDeletedPosts(posts); addNecroPostMessage(); diff --git a/public/src/modules/search.js b/public/src/modules/search.js index 63ff00463d..cb1307c48d 100644 --- a/public/src/modules/search.js +++ b/public/src/modules/search.js @@ -337,7 +337,7 @@ define('search', ['translator', 'storage', 'hooks', 'alerts'], function (transla }); }); - $('.search-result-text').find('img:not(.not-responsive)').addClass('img-responsive'); + $('.search-result-text').find('img:not(.not-responsive)').addClass('img-fluid'); }; return Search; diff --git a/public/src/widgets.js b/public/src/widgets.js index 85cabdf0bb..494546c023 100644 --- a/public/src/widgets.js +++ b/public/src/widgets.js @@ -37,7 +37,7 @@ module.exports.render = function (template) { area = $('#content [widget-area="' + location + '"],#content [data-widget-area="' + location + '"]').eq(0); if (html && area.length) { area.html(html); - area.find('img:not(.not-responsive)').addClass('img-responsive'); + area.find('img:not(.not-responsive)').addClass('img-fluid'); } if (widgetsAtLocation.length) {