FIX: remove anchors from banner headings.
Else it will create UX issues when the banner is visible on top of the banner topic.
This commit is contained in:
parent
53054b41d2
commit
7a054fc142
|
@ -2,6 +2,14 @@ import discourseComputed from "discourse-common/utils/decorators";
|
|||
import Component from "@ember/component";
|
||||
|
||||
export default Component.extend({
|
||||
@discourseComputed("banner.html")
|
||||
content(bannerHtml) {
|
||||
const $div = $("<div>");
|
||||
$div.append(bannerHtml);
|
||||
$div.find("[id^='heading--']").removeAttr("id");
|
||||
return $div.html();
|
||||
},
|
||||
|
||||
@discourseComputed("user.dismissed_banner_key", "banner.key", "hide")
|
||||
visible(dismissedBannerKey, bannerKey, hide) {
|
||||
dismissedBannerKey =
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div id="banner" class={{overlay}}>
|
||||
{{d-button icon="times" action="dismiss" class="btn btn-flat close" title="banner.close"}}
|
||||
<div id="banner-content">
|
||||
{{{banner.html}}}
|
||||
{{{content}}}
|
||||
{{#if currentUser.staff}}
|
||||
<p><a href="{{banner.url}}">{{{i18n "banner.edit"}}}</a></p>
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in New Issue