mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-02 03:47:34 -05:00
19 lines
451 B
JavaScript
19 lines
451 B
JavaScript
export default {
|
|
name: "banner",
|
|
after: "message-bus",
|
|
|
|
initialize(container) {
|
|
|
|
const banner = Em.Object.create(PreloadStore.get("banner")),
|
|
site = container.lookup('site:main');
|
|
|
|
site.set("banner", banner);
|
|
|
|
const messageBus = container.lookup('message-bus:main');
|
|
if (!messageBus) { return; }
|
|
|
|
messageBus.subscribe("/site/banner", function (ban) {
|
|
site.set("banner", Em.Object.create(ban));
|
|
});
|
|
}
|
|
};
|