Help us test the new header code!

It’s different now. So far it’s possible to add an admin links:

<script type="text/discourse-plugin" version="0.3">
  api.decorateWidget('hamburger-menu:admin-links', helper => {
    var links = [];
    links.push({ href: 'http://example.com/events/',
                 rawLabel: "Events",
                 className: "events-link",
                 contents: () => "Events" });

    return links.map(l => helper.attach('link', l));
  });
</script>

It’s not possible to decorate other place yet. And I am not sure how to capture click event for this.

I can submit a PR to add a decorator for the right spot. Moreover, I wish I can decorate panel (panelContents) at will, i.e. messing around order, stuffs other than links. Don’t know whether this idea makes any sense.

3개의 좋아요