mirror of
https://github.com/discourse/discourse.git
synced 2025-03-31 06:15:52 +08:00
REFACTOR: Remove Discourse.SiteSettings
from PostCooked
widget
This commit is contained in:
parent
531793e98f
commit
9dd6367d81
@ -83,7 +83,7 @@ class DecoratorHelper {
|
||||
* ```
|
||||
**/
|
||||
cooked(cooked) {
|
||||
return new PostCooked({ cooked });
|
||||
return new PostCooked({ cooked }, this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -93,8 +93,12 @@ export default class PostCooked {
|
||||
}
|
||||
|
||||
_fixImageSizes($html) {
|
||||
const maxImageWidth = Discourse.SiteSettings.max_image_width;
|
||||
const maxImageHeight = Discourse.SiteSettings.max_image_height;
|
||||
if (!this.decoratorHelper || !this.decoratorHelper.widget) {
|
||||
return;
|
||||
}
|
||||
let siteSettings = this.decoratorHelper.widget.siteSettings;
|
||||
const maxImageWidth = siteSettings.max_image_width;
|
||||
const maxImageHeight = siteSettings.max_image_height;
|
||||
|
||||
let maxWindowWidth;
|
||||
$html.find("img:not(.avatar)").each((idx, img) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user