mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	closes #4503, /cc @BenLubar
This commit is contained in:
		| @@ -56,8 +56,8 @@ | |||||||
|     "nodebb-plugin-spam-be-gone": "0.4.6", |     "nodebb-plugin-spam-be-gone": "0.4.6", | ||||||
|     "nodebb-rewards-essentials": "0.0.8", |     "nodebb-rewards-essentials": "0.0.8", | ||||||
|     "nodebb-theme-lavender": "3.0.9", |     "nodebb-theme-lavender": "3.0.9", | ||||||
|     "nodebb-theme-persona": "4.0.117", |     "nodebb-theme-persona": "4.0.118", | ||||||
|     "nodebb-theme-vanilla": "5.0.62", |     "nodebb-theme-vanilla": "5.0.63", | ||||||
|     "nodebb-widget-essentials": "2.0.9", |     "nodebb-widget-essentials": "2.0.9", | ||||||
|     "nodemailer": "2.0.0", |     "nodemailer": "2.0.0", | ||||||
|     "nodemailer-sendmail-transport": "1.0.0", |     "nodemailer-sendmail-transport": "1.0.0", | ||||||
|   | |||||||
| @@ -104,6 +104,9 @@ | |||||||
| 	"enable_topic_searching": "Enable In-Topic Searching", | 	"enable_topic_searching": "Enable In-Topic Searching", | ||||||
| 	"topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", | 	"topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen", | ||||||
|  |  | ||||||
|  | 	"delay_image_loading": "Delay Image Loading", | ||||||
|  | 	"image_load_delay_help": "If enabled, images in topics will not load until they are scrolled into view", | ||||||
|  |  | ||||||
| 	"scroll_to_my_post": "After posting a reply, show the new post", | 	"scroll_to_my_post": "After posting a reply, show the new post", | ||||||
|  |  | ||||||
| 	"follow_topics_you_reply_to": "Follow topics that you reply to", | 	"follow_topics_you_reply_to": "Follow topics that you reply to", | ||||||
|   | |||||||
| @@ -263,7 +263,7 @@ define('forum/topic/posts', [ | |||||||
|  |  | ||||||
| 			var images = components.get('post/content').find('img[data-state="unloaded"]'), | 			var images = components.get('post/content').find('img[data-state="unloaded"]'), | ||||||
| 				visible = images.filter(function() { | 				visible = images.filter(function() { | ||||||
| 					return utils.isElementInViewport(this); | 					return config.delayImageLoading ? utils.isElementInViewport(this) : true; | ||||||
| 				}), | 				}), | ||||||
| 				scrollTop = $(window).scrollTop(), | 				scrollTop = $(window).scrollTop(), | ||||||
| 				adjusting = false, | 				adjusting = false, | ||||||
|   | |||||||
| @@ -79,6 +79,7 @@ apiController.getConfig = function(req, res, next) { | |||||||
| 				config.topicPostSort = settings.topicPostSort || config.topicPostSort; | 				config.topicPostSort = settings.topicPostSort || config.topicPostSort; | ||||||
| 				config.categoryTopicSort = settings.categoryTopicSort || config.categoryTopicSort; | 				config.categoryTopicSort = settings.categoryTopicSort || config.categoryTopicSort; | ||||||
| 				config.topicSearchEnabled = settings.topicSearchEnabled || false; | 				config.topicSearchEnabled = settings.topicSearchEnabled || false; | ||||||
|  | 				config.delayImageLoading = settings.delayImageLoading !== undefined ? settings.delayImageLoading : true; | ||||||
| 				config.bootswatchSkin = settings.bootswatchSkin || config.bootswatchSkin; | 				config.bootswatchSkin = settings.bootswatchSkin || config.bootswatchSkin; | ||||||
| 				next(null, config); | 				next(null, config); | ||||||
| 			}); | 			}); | ||||||
|   | |||||||
| @@ -75,6 +75,7 @@ module.exports = function(User) { | |||||||
| 			settings.sendPostNotifications = parseInt(getSetting(settings, 'sendPostNotifications', 0), 10) === 1; | 			settings.sendPostNotifications = parseInt(getSetting(settings, 'sendPostNotifications', 0), 10) === 1; | ||||||
| 			settings.restrictChat = parseInt(getSetting(settings, 'restrictChat', 0), 10) === 1; | 			settings.restrictChat = parseInt(getSetting(settings, 'restrictChat', 0), 10) === 1; | ||||||
| 			settings.topicSearchEnabled = parseInt(getSetting(settings, 'topicSearchEnabled', 0), 10) === 1; | 			settings.topicSearchEnabled = parseInt(getSetting(settings, 'topicSearchEnabled', 0), 10) === 1; | ||||||
|  | 			settings.delayImageLoading = parseInt(getSetting(settings, 'delayImageLoading', 1), 10) === 1; | ||||||
| 			settings.bootswatchSkin = settings.bootswatchSkin || 'default'; | 			settings.bootswatchSkin = settings.bootswatchSkin || 'default'; | ||||||
| 			settings.scrollToMyPost = parseInt(getSetting(settings, 'scrollToMyPost', 1), 10) === 1; | 			settings.scrollToMyPost = parseInt(getSetting(settings, 'scrollToMyPost', 1), 10) === 1; | ||||||
|  |  | ||||||
| @@ -120,6 +121,7 @@ module.exports = function(User) { | |||||||
| 			sendPostNotifications: data.sendPostNotifications, | 			sendPostNotifications: data.sendPostNotifications, | ||||||
| 			restrictChat: data.restrictChat, | 			restrictChat: data.restrictChat, | ||||||
| 			topicSearchEnabled: data.topicSearchEnabled, | 			topicSearchEnabled: data.topicSearchEnabled, | ||||||
|  | 			delayImageLoading: data.delayImageLoading, | ||||||
| 			groupTitle: data.groupTitle, | 			groupTitle: data.groupTitle, | ||||||
| 			homePageRoute: data.homePageCustom || data.homePageRoute, | 			homePageRoute: data.homePageCustom || data.homePageRoute, | ||||||
| 			scrollToMyPost: data.scrollToMyPost | 			scrollToMyPost: data.scrollToMyPost | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user