0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-26 02:50:28 +01:00

Merge pull request #51 from paviliondev/add-helper-context

FIX: discourse now uses helperContext to fetch siteSettings on frontend
Dieser Commit ist enthalten in:
Angus McLeod 2020-08-03 10:38:19 +10:00 committet von GitHub
Commit 6410ac7133
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -22,6 +22,7 @@ export default {
const Singleton = requirejs("discourse/mixins/singleton").default;
const Store = requirejs("discourse/models/store").default;
const registerRawHelpers = requirejs("discourse-common/lib/raw-handlebars-helpers").registerRawHelpers;
const createHelperContext = requirejs("discourse-common/lib/helpers").createHelperContext;
const RawHandlebars = requirejs("discourse-common/lib/raw-handlebars").default;
const Site = requirejs("discourse/plugins/discourse-custom-wizard/wizard/models/site").default;
const RestAdapter = requirejs("discourse/adapters/rest").default;
@ -49,6 +50,7 @@ export default {
const siteSettings = Wizard.SiteSettings;
app.register("site-settings:main", siteSettings, { instantiate: false });
createHelperContext(siteSettings);
targets.forEach(t => app.inject(t, "siteSettings", "site-settings:main"));
app.register("service:store", Store);