mirror of
https://github.com/discourse/discourse.git
synced 2025-02-01 11:35:15 +08:00
REFACTOR: Remove Discourse.SiteSettings
from initializers
This commit is contained in:
parent
f5adf6d183
commit
fa74f28a51
|
@ -10,8 +10,9 @@ export default {
|
|||
// for mobile we use the window width as a safeguard
|
||||
// This rule should never really be at play unless for some reason images do not have dimensions
|
||||
|
||||
var width = Discourse.SiteSettings.max_image_width;
|
||||
var height = Discourse.SiteSettings.max_image_height;
|
||||
const siteSettings = container.lookup("site-settings:main");
|
||||
let width = siteSettings.max_image_width;
|
||||
let height = siteSettings.max_image_height;
|
||||
|
||||
const site = container.lookup("site:main");
|
||||
if (site.mobileView) {
|
||||
|
|
|
@ -45,9 +45,7 @@ export default {
|
|||
const body = quote ? `${quote} \n\n ${link}` : link;
|
||||
return (
|
||||
"mailto:?to=&subject=" +
|
||||
encodeURIComponent(
|
||||
"[" + Discourse.SiteSettings.title + "] " + title
|
||||
) +
|
||||
encodeURIComponent("[" + siteSettings.title + "] " + title) +
|
||||
"&body=" +
|
||||
encodeURIComponent(body)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user