mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
24 lines
466 B
JavaScript
24 lines
466 B
JavaScript
export default Ember.Service.extend({
|
|
settings: null,
|
|
|
|
init() {
|
|
this._super(...arguments);
|
|
this._settings = {};
|
|
},
|
|
|
|
registerSettings(themeId, settingsObject) {
|
|
this._settings[themeId] = settingsObject;
|
|
},
|
|
|
|
getSetting(themeId, settingsKey) {
|
|
if (this._settings[themeId]) {
|
|
return Ember.get(this._settings[themeId], settingsKey);
|
|
}
|
|
return null;
|
|
},
|
|
|
|
getObjectForTheme(themeId) {
|
|
return this._settings[themeId];
|
|
}
|
|
});
|