DEV: migrates private-message-glyph to gjs (#27858)
This commit is contained in:
parent
d5dd5bfb55
commit
478b096286
|
@ -0,0 +1,20 @@
|
||||||
|
import icon from "discourse-common/helpers/d-icon";
|
||||||
|
import i18n from "discourse-common/helpers/i18n";
|
||||||
|
|
||||||
|
const PrivateMessageGlyph = <template>
|
||||||
|
{{#if @shouldShow}}
|
||||||
|
{{#if @href}}
|
||||||
|
<a href={{@href}} title={{i18n @title}} aria-label={{i18n @ariaLabel}}>
|
||||||
|
<span class="private-message-glyph-wrapper">
|
||||||
|
{{icon "envelope" class="private-message-glyph"}}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
{{~else}}
|
||||||
|
<span class="private-message-glyph-wrapper">
|
||||||
|
{{icon "envelope" class="private-message-glyph"}}
|
||||||
|
</span>
|
||||||
|
{{~/if}}
|
||||||
|
{{/if}}
|
||||||
|
</template>;
|
||||||
|
|
||||||
|
export default PrivateMessageGlyph;
|
|
@ -1,17 +0,0 @@
|
||||||
{{#if this.shouldShow}}
|
|
||||||
{{#if this.href}}
|
|
||||||
<a
|
|
||||||
href={{this.href}}
|
|
||||||
title={{i18n this.title}}
|
|
||||||
aria-label={{i18n this.ariaLabel}}
|
|
||||||
>
|
|
||||||
<span class="private-message-glyph-wrapper">
|
|
||||||
{{d-icon "envelope" class="private-message-glyph"}}
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
{{~else}}
|
|
||||||
<span class="private-message-glyph-wrapper">
|
|
||||||
{{d-icon "envelope" class="private-message-glyph"}}
|
|
||||||
</span>
|
|
||||||
{{~/if}}
|
|
||||||
{{/if}}
|
|
|
@ -1,9 +0,0 @@
|
||||||
import Component from "@ember/component";
|
|
||||||
|
|
||||||
export default Component.extend({
|
|
||||||
tagName: null,
|
|
||||||
href: null,
|
|
||||||
title: null,
|
|
||||||
ariaLabel: null,
|
|
||||||
shouldShow: null,
|
|
||||||
});
|
|
|
@ -50,10 +50,7 @@
|
||||||
>
|
>
|
||||||
{{#if this.editingTopic}}
|
{{#if this.editingTopic}}
|
||||||
<div class="edit-topic-title">
|
<div class="edit-topic-title">
|
||||||
<PrivateMessageGlyph
|
<PrivateMessageGlyph @shouldShow={{this.model.isPrivateMessage}} />
|
||||||
@shouldShow={{this.model.isPrivateMessage}}
|
|
||||||
@tagName=""
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextField
|
<TextField
|
||||||
@id="edit-title"
|
@id="edit-title"
|
||||||
|
@ -129,12 +126,10 @@
|
||||||
@href={{this.pmPath}}
|
@href={{this.pmPath}}
|
||||||
@title="topic_statuses.personal_message.title"
|
@title="topic_statuses.personal_message.title"
|
||||||
@ariaLabel="user.messages.inbox"
|
@ariaLabel="user.messages.inbox"
|
||||||
@tagName=""
|
|
||||||
/>
|
/>
|
||||||
{{else}}
|
{{else}}
|
||||||
<PrivateMessageGlyph
|
<PrivateMessageGlyph
|
||||||
@shouldShow={{this.model.isPrivateMessage}}
|
@shouldShow={{this.model.isPrivateMessage}}
|
||||||
@tagName=""
|
|
||||||
/>
|
/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
Loading…
Reference in New Issue